summaryrefslogtreecommitdiff
path: root/gtk/language-names.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-09-19 09:45:17 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-09-19 09:47:15 -0400
commit0485a6c0087516f8a64c249b0d407fa6f8ef69ba (patch)
tree5f95dac7f5930305965f646c4b09826968df3b74 /gtk/language-names.c
parent7b2c4fdb6acf0c3a85a5b458cca335e98826b243 (diff)
downloadgtk+-0485a6c0087516f8a64c249b0d407fa6f8ef69ba.tar.gz
Improve language names
Shorten a few of the names we pick up by removing parentheses that make them excessively long.
Diffstat (limited to 'gtk/language-names.c')
-rw-r--r--gtk/language-names.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/language-names.c b/gtk/language-names.c
index 8928366ab7..087f86b922 100644
--- a/gtk/language-names.c
+++ b/gtk/language-names.c
@@ -85,6 +85,15 @@ languages_parse_start_tag (GMarkupParseContext *ctx,
const char *ccode_id;
const char *lang_name;
char *display_name;
+ const char *long_names[] = {
+ "Dogri",
+ "Greek, Modern",
+ "Interlingua",
+ "Konkani",
+ "Tonga",
+ "Turkish, Ottoman",
+ };
+ int i;
if (!(g_str_equal (element_name, "iso_639_entry") ||
g_str_equal (element_name, "iso_639_3_entry")) ||
@@ -151,6 +160,14 @@ languages_parse_start_tag (GMarkupParseContext *ctx,
display_name = get_display_name (lang_name);
+ /* Fix up some egregious names */
+ for (i = 0; i < G_N_ELEMENTS (long_names); i++)
+ {
+ if (g_str_has_prefix (display_name, long_names[i]))
+ display_name[strlen (long_names[i]) + 1] = '\0';
+ }
+
+
if (ccode != NULL)
g_hash_table_insert (language_map,
pango_language_from_string (ccode),