[gtk+/gtk-2-22] Update list of US Letter locales
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-22] Update list of US Letter locales
- Date: Fri, 21 May 2010 10:15:16 +0000 (UTC)
commit 8cd4c387f0feb47947541d507da9fd5bebd90895
Author: Marek Kasik <mkasik redhat com>
Date: Fri May 21 12:14:30 2010 +0200
Update list of US Letter locales
Sync paper size fallbacks with the latest 1.8.1 CLDR table (#618000).
gtk/gtkpapersize.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c
index 7188cef..894dca0 100644
--- a/gtk/gtkpapersize.c
+++ b/gtk/gtkpapersize.c
@@ -669,10 +669,11 @@ gtk_paper_size_get_default (void)
if (!locale)
return GTK_PAPER_NAME_A4;
- if (g_str_has_prefix (locale, "en_CA") ||
- g_str_has_prefix (locale, "en_US") ||
- g_str_has_prefix (locale, "es_PR") ||
- g_str_has_prefix (locale, "es_US"))
+ /* CLDR 1.8.1
+ * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/territory_language_information.html
+ */
+ if (g_regex_match_simple("[^_ ]{2,3}_(BZ|CA|CL|CO|CR|GT|MX|NI|PA|PH|PR|SV|US|VE)",
+ locale, G_REGEX_ANCHORED, G_REGEX_MATCH_ANCHORED))
paper_size = GTK_PAPER_NAME_LETTER;
else
paper_size = GTK_PAPER_NAME_A4;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]