Fixing problem with locale update for 'en' -> 'en-local' translations. (patch by killes)

4.5.x
Steven Wittens 2004-09-06 12:40:12 +00:00
parent 7c4f8bae87
commit 55f5bd85ed
1 changed files with 8 additions and 2 deletions

View File

@ -1498,7 +1498,13 @@ function update_101() {
$lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", $entry->location, $entry->string));
foreach ($fields as $key => $value) {
// insert translation if non-empty
db_query("INSERT INTO {locales_target} (lid, translation, locale) VALUES (%d, '%s', '%s')", $lid->lid, $entry->$key, $key);
if ($key == 'en') {
$keynew = 'en-local';
}
else {
$keynew = $key;
}
db_query("INSERT INTO {locales_target} (lid, translation, locale) VALUES (%d, '%s', '%s')", $lid->lid, $entry->$key, $keynew);
}
}
}