This commit is contained in:
Roly Rudy Gutierrez Pinto
2015-09-15 11:50:23 -04:00
committed by Enrique Ponce De Leon
parent b8e7ce738e
commit a644c18fa5
6 changed files with 72 additions and 56 deletions

View File

@@ -129,6 +129,21 @@ class Language extends BaseLanguage
public function import ($sLanguageFile, $updateXml = true, $updateDB = true, $generateMafe = true)
{
try {
//get labels MichelangeloFE
try {
$oTranslation = new Translation();
$MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
if (file_exists($MichelangeloFE)) {
$labels = $this->readLabelsDirectory($MichelangeloFE, true);
foreach ($labels as $label) {
$oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
}
}
} catch (Exception $e) {
error_log($e->getMessage());
}
G::LoadSystem( 'i18n_po' );
$POFile = new i18n_PO( $sLanguageFile );
$POFile->readInit();
@@ -297,7 +312,7 @@ class Language extends BaseLanguage
try {
$oTranslation = new Translation();
$MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
if ($_GET['LOCALE'] === "en" & file_exists($MichelangeloFE)) {
if (file_exists($MichelangeloFE)) {
$labels = $this->readLabelsDirectory($MichelangeloFE, true);
foreach ($labels as $label) {
$oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);