/** * @param $f * @param $translatableProperties * @return tao_helpers_translation_POFile * @throws tao_helpers_translation_TranslationException */ protected function extractPoFileFromRDF($f, $translatableProperties) { $modelExtractor = new tao_helpers_translation_POExtractor(array($f)); $modelExtractor->setTranslatableProperties($translatableProperties); $modelExtractor->extract(); $translationFile = new tao_helpers_translation_POFile(); $translationFile->setSourceLanguage(tao_helpers_translation_Utils::getDefaultLanguage()); $translationFile->setTargetLanguage($this->options['language']); $translationFile->addTranslationUnits($modelExtractor->getTranslationUnits()); $translationFile->setExtensionId($this->options['extension']); $this->preparePOFile($translationFile); return $translationFile; }