#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

6.x
Gábor Hojtsy 2007-11-23 12:15:12 +00:00
parent 8baa1261ed
commit 5f1d0bf343
2 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,7 @@ function locale_update_6001() {
} }
// Save the languages // 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 // Save the language count in the variable table
$count = db_result(db_query('SELECT COUNT(*) FROM {languages} WHERE enabled = 1')); $count = db_result(db_query('SELECT COUNT(*) FROM {languages} WHERE enabled = 1'));

View File

@ -203,7 +203,8 @@ function locale_user($type, $edit, &$user, $category = NULL) {
$names = array(); $names = array();
foreach ($languages as $langcode => $language) { 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( $form['locale'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',