small fix for the ui language selection
authorXiao Xiangquan <xiaoxiangquan@gmail.com>
Fri, 22 Jul 2011 16:34:23 +0000 (16:34 +0000)
committerXiao Xiangquan <xiaoxiangquan@gmail.com>
Fri, 22 Jul 2011 16:34:23 +0000 (16:34 +0000)
source/blender/blenfont/intern/blf_lang.c
source/blender/makesrna/intern/rna_userdef.c

index c40c98a3699dba500e40b990abe51f9bf6c1af8e..ccaab88a2480a10e468ae087c02829697957aaf4 100644 (file)
@@ -70,35 +70,55 @@ static char global_encoding_name[32];
 static char locale_default[] = "";
 static char locale_english[] = "en_US";
 static char locale_japanese[] = "ja_JP";
+static char locale_dutch[] = "nl_NL";
+static char locale_italian[] = "it_IT";
+static char locale_german[] = "de_DE";
+static char locale_finnish[] = "fi_FI";
+static char locale_swedish[] = "sv_SE";
+static char locale_french[] = "fr_FR";
+static char locale_spanish[] = "es_ES";
+static char locale_catalan[] = "ca_AD";
+static char locale_czech[] = "cs_CZ";
+static char locale_bra_portuguese[] = "pt_BR";
 static char locale_sim_chinese[] = "zh_CN";
 static char locale_tra_chinese[] = "zh_TW";
+static char locale_russian[] = "ru_RU";
+static char locale_croatian[] = "hr_HR";
+static char locale_serbian[] = "sr_RS";
+static char locale_ukrainian[] = "uk_UA";
+static char locale_polish[] = "pl_PL";
+static char locale_romanian[] = "ro_RO";
+static char locale_arabic[] = "ar_SA";
+static char locale_bulgarian[] = "bg_BG";
+static char locale_greek[] = "el_GR";
+static char locale_korean[] = "ko_KR";
 
 static char *lang_to_locale[] = {
                locale_default,
                locale_english, /* us english is the default language of blender */
                locale_japanese,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
+               locale_dutch,
+               locale_italian,
+               locale_german,
+               locale_finnish,
+               locale_swedish,
+               locale_french,
+               locale_spanish,
+               locale_catalan,
+               locale_czech,
+               locale_bra_portuguese,
                locale_sim_chinese,
                locale_tra_chinese,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
-               locale_default,
+               locale_russian,
+               locale_croatian,
+               locale_serbian,
+               locale_ukrainian,
+               locale_polish,
+               locale_romanian,
+               locale_arabic,
+               locale_bulgarian,
+               locale_greek,
+               locale_korean,
 };
 
 void BLF_lang_init(void)
index 5a29b4a82113f9c39d1c43fff223e0de49b24ff7..e7611e450357fd297294223a85b71a5a1874cf97 100644 (file)
@@ -2435,32 +2435,33 @@ static void rna_def_userdef_system(BlenderRNA *brna)
                {0, NULL, 0, NULL, NULL}};
        
                /* hardcoded here, could become dynamic somehow */
+       /* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
        static EnumPropertyItem language_items[] = {
                {0, "DEFAULT", 0, N_("Default"), ""},
-               {1, "ENGLISH", 0, "English (English)", ""},
-               {2, "JAPANESE", 0, "Japanese (日本語)", ""},
-               {3, "DUTCH", 0, "Dutch (Nederlandse taal)", ""},
-               {4, "ITALIAN", 0, "Italian (Italian)", ""},
-               {5, "GERMAN", 0, "German (German)", ""},
-               {6, "FINNISH", 0, "Finnish (Finnish)", ""},
-               {7, "SWEDISH", 0, "Swedish (Swedish)", ""},
-               {8, "FRENCH", 0, "French (French)", ""},
-               {9, "SPANISH", 0, "Spanish (Spanish)", ""},
-               {10, "CATALAN", 0, "Catalan (Catalan)", ""},
-               {11, "CZECH", 0, "Czech (Czech)", ""},
-               {12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Brazilian Portuguese)", ""},
-               {13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", ""},
-               {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", ""},
-               {15, "RUSSIAN", 0, "Russian (Russian)", ""},
-               {16, "CROATIAN", 0, "Croatian (Croatian)", ""},
-               {17, "SERBIAN", 0, "Serbian (Serbian)", ""},
-               {18, "UKRAINIAN", 0, "Ukrainian (Ukrainian)", ""},
-               {19, "POLISH", 0, "Polish (Polish)", ""},
-               {20, "ROMANIAN", 0, "Romanian (Român)", ""},
-               {21, "ARABIC", 0, "Arabic (العربية)", ""},
-               {22, "BULGARIAN", 0, "Bulgarian (Bulgarian)", ""},
-               {23, "GREEK", 0, "Greek (Greek)", ""},
-               {24, "KOREAN", 0, "Korean (한국 언어)", ""},
+               {1, "ENGLISH", 0, "English (English)", "en_US"},
+               {2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
+               {3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},
+               {4, "ITALIAN", 0, "Italian (Italiano)", "it_IT"},
+               {5, "GERMAN", 0, "German (German)", "de_DE"},
+               {6, "FINNISH", 0, "Finnish (Finnish)", "fi_FI"},
+               {7, "SWEDISH", 0, "Swedish (Swedish)", "sv_SE"},
+               {8, "FRENCH", 0, "French (French)", "fr_FR"},
+               {9, "SPANISH", 0, "Spanish (Spanish)", "es_ES"},
+               {10, "CATALAN", 0, "Catalan (Catalan)", "ca_AD"},
+               {11, "CZECH", 0, "Czech (Czech)", "cs_CZ"},
+               {12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Brazilian Portuguese)", "pt_BR"},
+               {13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", "zh_CN"},
+               {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh_TW"},
+               {15, "RUSSIAN", 0, "Russian (Russian)", "ru_RU"},
+               {16, "CROATIAN", 0, "Croatian (Croatian)", "hr_HR"},
+               {17, "SERBIAN", 0, "Serbian (Serbian)", "sr_RS"},
+               {18, "UKRAINIAN", 0, "Ukrainian (Ukrainian)", "uk_UA"},
+               {19, "POLISH", 0, "Polish (Polish)", "pl_PL"},
+               {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"},
+               {21, "ARABIC", 0, "Arabic (العربية)", "ar_SA"},
+               {22, "BULGARIAN", 0, "Bulgarian (Bulgarian)", "bg_BG"},
+               {23, "GREEK", 0, "Greek (Greek)", "el_GR"},
+               {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},
                {0, NULL, 0, NULL, NULL}};
 
        srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);