Gunnar Hjalmarsson has proposed merging 
~gunnarhj/ubuntu/+source/gnome-control-center:serbian-fix-2 into 
~ubuntu-desktop/ubuntu/+source/gnome-control-center:ubuntu/master.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)
Related bugs:
  Bug #1823778 in gnome-control-center (Ubuntu): "Unable to set Serbian as 
Language"
  https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1823778

For more details, see:
https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-control-center/+git/gnome-control-center/+merge/365920

This proposal fixes the language labels for languages represented by locales 
with a modifier. So it looks better if you have languages like Serbian or 
Catalan installed.

However, if you try to select a language with a modifier from Region & 
Language, the language without the modifier is still set. So some further fix 
is needed before this gets correct.
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~gunnarhj/ubuntu/+source/gnome-control-center:serbian-fix-2 into 
~ubuntu-desktop/ubuntu/+source/gnome-control-center:ubuntu/master.
diff --git a/debian/patches/52_region_language.patch b/debian/patches/52_region_language.patch
index 5ee0883..dcf1e20 100644
--- a/debian/patches/52_region_language.patch
+++ b/debian/patches/52_region_language.patch
@@ -299,7 +299,32 @@ Index: gnome-control-center-3.32.1/panels/common/cc-language-chooser.c
 ===================================================================
 --- gnome-control-center-3.32.1.orig/panels/common/cc-language-chooser.c
 +++ gnome-control-center-3.32.1/panels/common/cc-language-chooser.c
-@@ -166,7 +166,7 @@ add_languages (CcLanguageChooser *choose
+@@ -62,16 +62,21 @@ language_widget_new (const gchar *locale_id,
+         g_autofree gchar *country = NULL;
+         g_autofree gchar *language_local = NULL;
+         g_autofree gchar *country_local = NULL;
++        g_autofree gchar *language_tmp = NULL;
++        g_autofree gchar *language_loc_tmp = NULL;
++        g_autofree gchar *modifier = NULL;
+         GtkWidget *row;
+         GtkWidget *box;
+         GtkWidget *language_label;
+         GtkWidget *check;
+         GtkWidget *country_label;
+ 
+-        gnome_parse_locale (locale_id, &language_code, &country_code, NULL, NULL);
+-        language = gnome_get_language_from_code (language_code, locale_id);
++        gnome_parse_locale (locale_id, &language_code, &country_code, NULL, &modifier);
++        language_tmp = gnome_get_language_from_code (language_code, locale_id);
++        language = g_strdup_printf ("%s%s%s", language_tmp, modifier ? " - " : "", modifier ? modifier : "");
+         country = gnome_get_country_from_code (country_code, locale_id);
+-        language_local = gnome_get_language_from_code (language_code, NULL);
++        language_loc_tmp = gnome_get_language_from_code (language_code, NULL);
++        language_local = g_strdup_printf ("%s%s%s", language_loc_tmp, modifier ? " - " : "", modifier ? modifier : "");
+         country_local = gnome_get_country_from_code (country_code, NULL);
+ 
+         row = gtk_list_box_row_new ();
+@@ -166,7 +171,7 @@ add_languages (CcLanguageChooser *choose
                  gtk_container_add (GTK_CONTAINER (chooser->language_listbox), widget);
          }
  
@@ -308,7 +333,7 @@ Index: gnome-control-center-3.32.1/panels/common/cc-language-chooser.c
  }
  
  static void
-@@ -392,7 +392,7 @@ cc_language_chooser_init (CcLanguageChoo
+@@ -392,7 +397,7 @@ cc_language_chooser_init (CcLanguageChoo
          gtk_widget_init_template (GTK_WIDGET (chooser));
  
          chooser->more_item = more_widget_new ();
-- 
ubuntu-desktop mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Reply via email to