Merge remote branch 'upstream/master' into BUG-10852
This commit is contained in:
@@ -508,7 +508,6 @@ class Configurations // extends Configuration
|
||||
$oConf = new Configurations();
|
||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
||||
$creationDateMask = isset($oConf->aConfig['dateFormat']) ? $oConf->aConfig['dateFormat'] : '';
|
||||
|
||||
if ($creationDateMask != '') {
|
||||
if (strpos($dateTime, ' ') !== false) {
|
||||
list ($date, $time) = explode(' ', $dateTime);
|
||||
@@ -517,7 +516,28 @@ class Configurations // extends Configuration
|
||||
$dateTime = date($creationDateMask, mktime($h, $i, $s, $m, $d, $y));
|
||||
} else {
|
||||
list ($y, $m, $d) = explode('-', $dateTime);
|
||||
$dateTime = date($creationDateMask, mktime(0, 0, 0, $m, $d, $y));
|
||||
$newCreation = '';
|
||||
$maskTime = array('d' => '%d', 'D' => '%a', 'j' => '%e', 'l' => '%A', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%h', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%P', 'A' => '%p', 'g' => '%l', 'G' => '%k', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S');
|
||||
$creationDateMask = trim($creationDateMask);
|
||||
for ($i = 0; $i < strlen($creationDateMask); $i++) {
|
||||
if ($creationDateMask[$i] == ' ' || $creationDateMask[$i] == ',') {
|
||||
$newCreation .= $creationDateMask[$i];
|
||||
} else {
|
||||
$newCreation .= $maskTime[$creationDateMask[$i]];
|
||||
}
|
||||
}
|
||||
|
||||
$langLocate = SYS_LANG;
|
||||
if (SYS_LANG == 'es') {
|
||||
$langLocate = 'es_ES';
|
||||
} else if (strlen(SYS_LANG) > 2) {
|
||||
$langLocate = str_replace('-', '_', SYS_LANG);
|
||||
} else {
|
||||
$langLocate = 'en_US';
|
||||
}
|
||||
|
||||
setlocale(LC_TIME, $langLocate);
|
||||
$dateTime = utf8_encode(strftime($newCreation, mktime(0, 0, 0, $m, $d, $y)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -302,15 +302,12 @@ class workspaceTools
|
||||
$names = explode(".", basename($poFile));
|
||||
$extension = array_pop($names);
|
||||
$langid = array_pop($names);
|
||||
if (strcasecmp($langid, "en") == 0) {
|
||||
CLI::logging("Updating database translations with $poName\n");
|
||||
Language::import($poFile, false, true);
|
||||
} elseif ($first) {
|
||||
if (strcasecmp($langid, "en") != 0 && $first) {
|
||||
CLI::logging("Updating XML form translations with $poName\n");
|
||||
Language::import($poFile, true, false);
|
||||
CLI::logging("Updating database translations with $poName\n");
|
||||
Language::import($poFile, false, true);
|
||||
}
|
||||
CLI::logging("Updating database translations with $poName\n");
|
||||
Language::import($poFile, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -275,9 +275,11 @@ class Language extends BaseLanguage
|
||||
$oLanguage->update( array ('LAN_ID' => $languageID,'LAN_ENABLED' => '1'
|
||||
) );
|
||||
|
||||
$trn = new Translation();
|
||||
$trn->generateFileTranslation( $LOCALE );
|
||||
$trn->addTranslationEnvironment( $LOCALE, $POHeaders, $countItemsSuccess );
|
||||
if ($updateXml) {
|
||||
$trn = new Translation();
|
||||
$trn->generateFileTranslation( $LOCALE );
|
||||
$trn->addTranslationEnvironment( $LOCALE, $POHeaders, $countItemsSuccess );
|
||||
}
|
||||
|
||||
//fill the results
|
||||
$results = new stdClass();
|
||||
|
||||
Reference in New Issue
Block a user