[epiphany] Stop lowercasing locales
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Stop lowercasing locales
- Date: Wed, 14 Nov 2018 21:35:28 +0000 (UTC)
commit 16e946201fa9f15d2e10146f535e3ce41271dbbb
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Nov 14 13:50:48 2018 -0600
Stop lowercasing locales
Other browsers don't do this and there's no clear reason to do so.
Related to: https://bugs.webkit.org/show_bug.cgi?id=191614
embed/ephy-embed-prefs.c | 2 +-
lib/ephy-langs.c | 12 +++---------
2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 7b34f3a2f..9a61c5d2f 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -245,7 +245,7 @@ webkit_pref_callback_accept_languages (GSettings *settings,
if (!g_strcmp0 (languages[i], "system")) {
ephy_langs_append_languages (array);
} else if (languages[i][0] != '\0') {
- char *str = g_ascii_strdown (languages[i], -1);
+ char *str = g_strdup (languages[i]);
g_array_append_val (array, str);
}
}
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index 37516d7e2..b061411b8 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -106,9 +106,8 @@ ephy_langs_append_languages (GArray *array)
if (strstr (languages[i], ".") == 0 &&
strstr (languages[i], "@") == 0 &&
strcmp (languages[i], "C") != 0) {
- /* change to lowercase and '_' to '-' */
- lang = g_strdelimit (g_ascii_strdown
- (languages[i], -1), "_", '-');
+ /* change '_' to '-' */
+ lang = g_strdelimit (g_strdup (languages[i]), "_", '-');
g_array_append_val (array, lang);
}
@@ -187,12 +186,7 @@ read_iso_3166_entry (xmlTextReaderPtr reader,
name = xmlTextReaderGetAttribute (reader, (const xmlChar *)"name");
if (code != NULL && code[0] != '\0' && name != NULL && name[0] != '\0') {
- char *lcode;
-
- lcode = g_ascii_strdown ((char *)code, -1);
- xmlFree (code);
-
- g_hash_table_insert (table, lcode, name);
+ g_hash_table_insert (table, code, name);
} else {
xmlFree (code);
xmlFree (name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]