#194595 report by hass, patch by myself: native language name is required, so we need to fill it in the updates - also omit it in user listing if the same as the translated language name
parent
8baa1261ed
commit
5f1d0bf343
|
@ -60,7 +60,7 @@ function locale_update_6001() {
|
|||
}
|
||||
|
||||
// Save the languages
|
||||
$ret[] = update_sql("INSERT INTO {languages} (language, name, native, direction, enabled, plurals, formula, domain, prefix, weight) SELECT locale, name, '', 0, enabled, plurals, formula, '', locale, 0 FROM {locales_meta}");
|
||||
$ret[] = update_sql("INSERT INTO {languages} (language, name, native, direction, enabled, plurals, formula, domain, prefix, weight) SELECT locale, name, name, 0, enabled, plurals, formula, '', locale, 0 FROM {locales_meta}");
|
||||
|
||||
// Save the language count in the variable table
|
||||
$count = db_result(db_query('SELECT COUNT(*) FROM {languages} WHERE enabled = 1'));
|
||||
|
|
|
@ -203,7 +203,8 @@ function locale_user($type, $edit, &$user, $category = NULL) {
|
|||
|
||||
$names = array();
|
||||
foreach ($languages as $langcode => $language) {
|
||||
$names[$langcode] = t($language->name) .' ('. $language->native .')';
|
||||
$name = t($language->name);
|
||||
$names[$langcode] = $name . ($language->native != $name ? ' ('. $language->native .')' : '');
|
||||
}
|
||||
$form['locale'] = array(
|
||||
'#type' => 'fieldset',
|
||||
|
|
Loading…
Reference in New Issue