[gnome-desktop] Consequential change for Language
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] Consequential change for Language
- Date: Fri, 19 Jul 2019 20:59:31 +0000 (UTC)
commit a336ab4d08912054b1a74aa61f88f172adae5512
Author: Gunnar Hjalmarsson <gunnarhj ubuntu com>
Date: Fri Jul 19 20:59:23 2019 +0000
Consequential change for Language
Corresponding change in `gnome_get_language_from_locale()` to match GNOME/gnome-control-center!507
libgnome-desktop/gnome-languages.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/libgnome-desktop/gnome-languages.c b/libgnome-desktop/gnome-languages.c
index f9bb960e..e27ccbd2 100644
--- a/libgnome-desktop/gnome-languages.c
+++ b/libgnome-desktop/gnome-languages.c
@@ -1126,6 +1126,11 @@ gnome_get_language_from_locale (const char *locale,
goto out;
}
+ if (modifier != NULL)
+ translated_modifier = gnome_get_translated_modifier (modifier, translation);
+ if (translated_modifier != NULL)
+ g_string_append_printf (full_language, " — %s", translated_modifier);
+
if (territory_code != NULL) {
translated_territory = get_translated_territory (territory_code, translation);
}
@@ -1147,13 +1152,6 @@ gnome_get_language_from_locale (const char *locale,
codeset_code);
}
- if (modifier != NULL) {
- translated_modifier = gnome_get_translated_modifier (modifier, translation);
- }
- if (translated_modifier != NULL) {
- g_string_append_printf (full_language, " — %s", translated_modifier);
- }
-
out:
if (full_language->len == 0) {
g_string_free (full_language, TRUE);
@@ -1216,22 +1214,23 @@ gnome_get_country_from_locale (const char *locale,
goto out;
}
- if (modifier != NULL) {
- translated_modifier = gnome_get_translated_modifier (modifier, translation);
- }
- if (translated_modifier != NULL) {
- g_string_append_printf (full_name, " — %s", translated_modifier);
- }
-
if (language_code != NULL) {
translated_language = get_translated_language (language_code, translation);
}
if (translated_language != NULL) {
g_string_append_printf (full_name,
- " (%s)",
+ " (%s",
translated_language);
}
+ if (modifier != NULL)
+ translated_modifier = gnome_get_translated_modifier (modifier, translation);
+ if (translated_modifier != NULL)
+ g_string_append_printf (full_name, " — %s", translated_modifier);
+
+ if (translated_language != NULL)
+ g_string_append_printf (full_name, ")");
+
language_name_get_codeset_details (translation, &langinfo_codeset, &is_utf8);
if (codeset_code == NULL && langinfo_codeset != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]