Commit 5f1d0bf3 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#194595 report by hass, patch by myself: native language name is required, so...

#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 8baa1261
......@@ -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',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment