summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-11-23 12:15:12 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-11-23 12:15:12 +0000
commit5f1d0bf3430afd130ca1a3e6d1b076d5c29c519e (patch)
tree6c48d4488705ea1965eb17c17ba890e2d8a52534
parent8baa1261ed69021d152541a64cdea8b46722d031 (diff)
downloadbrdo-5f1d0bf3430afd130ca1a3e6d1b076d5c29c519e.tar.gz
brdo-5f1d0bf3430afd130ca1a3e6d1b076d5c29c519e.tar.bz2
#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
-rw-r--r--modules/locale/locale.install2
-rw-r--r--modules/locale/locale.module3
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index f06c2ece3..239ff9fd6 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -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'));
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index abc878923..b06f75fd3 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -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',