fixed a language import a export bug

This commit is contained in:
Erik Amaru Ortiz
2011-01-21 16:26:36 +00:00
parent c63467510b
commit 6bc8b9574d
2 changed files with 6 additions and 5 deletions

View File

@@ -330,8 +330,9 @@ class languages {
$oLanguage = new Language();
$oLanguage->update(array('LAN_ID' => $languageID, 'LAN_ENABLED' => '1'));
Translation::generateFileTranslation($LOCALE);
Translation::addTranslationEnvironment($LOCALE, $POHeaders, $countItemsSuccess);
$trn = new Translation();
$trn->generateFileTranslation($LOCALE);
$trn->addTranslationEnvironment($LOCALE, $POHeaders, $countItemsSuccess);
$this->log( "checking and updating CONTENT");
$content = new Content();

View File

@@ -223,7 +223,7 @@ foreach ($aXMLForms as $xmlFormPath) {
$aMsgids[$msgid] = true;
//if it is a dropdown field
//if this node has options child nodes
if( isset($arrayNode[$_BASE_LANG]) && isset($arrayNode[$_BASE_LANG][0]) && isset($arrayNode[$_BASE_LANG][0]['option']) ){
$originOptionNode = $arrayNode[$_BASE_LANG][0]['option']; //get the options
@@ -256,8 +256,8 @@ foreach ($aXMLForms as $xmlFormPath) {
$targetOptionValue = $originOptionValue;
}
$targetOptionValue = ($targetOptionValue != '') ? $targetOptionValue : "''";
$optionName = ($optionName != '') ? $optionName : "''";
//$targetOptionValue = ($targetOptionValue != '') ? $targetOptionValue : "''";
//$optionName = ($optionName != '') ? $optionName : "''";
$msgid = '[' . $xmlFormFile . '?' . $nodeName . '-' . $optionName . ']';
/*g::dump($xmlFormFile . '?' . $nodeName . '-'. $originOptionValue);