Fixing problem with locale update for 'en' -> 'en-local' translations. (patch by killes)
parent
7c4f8bae87
commit
55f5bd85ed
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue