Пример #1
0
 /**
  * Extracts gettext string from predefined areas within the project.
  * @return Translation
  */
 private function extractGettextStrings()
 {
     $translation = null;
     $translationObjects = array();
     $lookupDirectories = array(Strata::getVendorPath() . 'strata-mvc' . DIRECTORY_SEPARATOR . 'strata' . DIRECTORY_SEPARATOR . 'src', Strata::getSrcPath(), Strata::getThemesPath());
     foreach ($lookupDirectories as $directory) {
         $translationObjects = $this->recurseThroughDirectory($directory);
         // Merge all translation objects into a bigger one
         foreach ($translationObjects as $t) {
             if (is_null($translation)) {
                 $translation = $t;
             } else {
                 $translation->mergeWith($t);
             }
         }
     }
     return $translation;
 }