[gimp] app: locales without ISO-639-1 codes should not be ignored
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: locales without ISO-639-1 codes should not be ignored
- Date: Sat, 20 Jul 2013 06:17:36 +0000 (UTC)
commit 0e93e181a277c3d15429d0ab81b120999c8bf302
Author: Jehan <jehan girinstud io>
Date: Sat Jul 20 15:08:49 2013 +0900
app: locales without ISO-639-1 codes should not be ignored
Some languages have no 2-letter ISO-639-1. This is the case in particular
for 3 languages we have translations for: ast (Asturian), csb (Kashubian)
and nds (Low German), which have only 3-letter ISO-639-2/3 codes.
They were not visible in the list of languages in the Preferences dialog
until now.
app/widgets/gimplanguagestore-parser.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimplanguagestore-parser.c b/app/widgets/gimplanguagestore-parser.c
index c237666..28bcf09 100644
--- a/app/widgets/gimplanguagestore-parser.c
+++ b/app/widgets/gimplanguagestore-parser.c
@@ -155,6 +155,18 @@ iso_codes_parser_entry (IsoCodesParser *parser,
{
lang = *values;
}
+ else if (strcmp (*names, "iso_639_2B_code") == 0 && code == NULL)
+ {
+ /* 2-letter ISO 639-1 codes have priority.
+ * But some languages have no 2-letter code.
+ * Ex: Asturian (ast).
+ */
+ code = *values;
+ }
+ else if (strcmp (*names, "iso_639_2T_code") == 0 && code == NULL)
+ {
+ code = *values;
+ }
else if (strcmp (*names, "iso_639_1_code") == 0)
{
code = *values;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]