Merge remote branch 'upstream/master'
This commit is contained in:
@@ -177,8 +177,12 @@ class Translation extends BaseTranslation
|
||||
|
||||
//$json = new Services_JSON(); DEPRECATED
|
||||
$f = fopen( $cacheFileJS, 'w' );
|
||||
fwrite( $f, "var G_STRINGS =" . Bootstrap::json_encode( $translationJS ) . ";\n" );
|
||||
fclose( $f );
|
||||
if ($f == false) {
|
||||
error_log("Error: Cannot write into cachefilejs: $cacheFileJS\n");
|
||||
} else {
|
||||
fwrite( $f, "var G_STRINGS =" . Bootstrap::json_encode( $translationJS ) . ";\n");
|
||||
fclose( $f );
|
||||
}
|
||||
|
||||
$res['cacheFile'] = $cacheFile;
|
||||
$res['cacheFileJS'] = $cacheFileJS;
|
||||
@@ -409,7 +413,6 @@ class Translation extends BaseTranslation
|
||||
if (! file_exists( $filePath )) {
|
||||
//the transaltions table file doesn't exist, then build it
|
||||
|
||||
|
||||
if (! is_dir( dirname( $this->envFilePath ) )) {
|
||||
G::mk_dir( dirname( $this->envFilePath ) );
|
||||
}
|
||||
@@ -418,7 +421,7 @@ class Translation extends BaseTranslation
|
||||
|
||||
$params = self::getInfoFromPOFile( $basePOFile );
|
||||
$this->addTranslationEnvironment( $params['LOCALE'], $params['HEADERS'], $params['COUNT'] );
|
||||
//getting more lanuguage translations
|
||||
//getting more language translations
|
||||
$files = glob( $translationsPath . "*.po" );
|
||||
foreach ($files as $file) {
|
||||
$params = self::getInfoFromPOFile( $file );
|
||||
|
||||
Reference in New Issue
Block a user