fixed a language import a export bug
This commit is contained in:
@@ -330,8 +330,9 @@ class languages {
|
|||||||
$oLanguage = new Language();
|
$oLanguage = new Language();
|
||||||
$oLanguage->update(array('LAN_ID' => $languageID, 'LAN_ENABLED' => '1'));
|
$oLanguage->update(array('LAN_ID' => $languageID, 'LAN_ENABLED' => '1'));
|
||||||
|
|
||||||
Translation::generateFileTranslation($LOCALE);
|
$trn = new Translation();
|
||||||
Translation::addTranslationEnvironment($LOCALE, $POHeaders, $countItemsSuccess);
|
$trn->generateFileTranslation($LOCALE);
|
||||||
|
$trn->addTranslationEnvironment($LOCALE, $POHeaders, $countItemsSuccess);
|
||||||
|
|
||||||
$this->log( "checking and updating CONTENT");
|
$this->log( "checking and updating CONTENT");
|
||||||
$content = new Content();
|
$content = new Content();
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ foreach ($aXMLForms as $xmlFormPath) {
|
|||||||
|
|
||||||
$aMsgids[$msgid] = true;
|
$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']) ){
|
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
|
$originOptionNode = $arrayNode[$_BASE_LANG][0]['option']; //get the options
|
||||||
@@ -256,8 +256,8 @@ foreach ($aXMLForms as $xmlFormPath) {
|
|||||||
$targetOptionValue = $originOptionValue;
|
$targetOptionValue = $originOptionValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$targetOptionValue = ($targetOptionValue != '') ? $targetOptionValue : "''";
|
//$targetOptionValue = ($targetOptionValue != '') ? $targetOptionValue : "''";
|
||||||
$optionName = ($optionName != '') ? $optionName : "''";
|
//$optionName = ($optionName != '') ? $optionName : "''";
|
||||||
|
|
||||||
$msgid = '[' . $xmlFormFile . '?' . $nodeName . '-' . $optionName . ']';
|
$msgid = '[' . $xmlFormFile . '?' . $nodeName . '-' . $optionName . ']';
|
||||||
/*g::dump($xmlFormFile . '?' . $nodeName . '-'. $originOptionValue);
|
/*g::dump($xmlFormFile . '?' . $nodeName . '-'. $originOptionValue);
|
||||||
|
|||||||
Reference in New Issue
Block a user