From 874c96a2b9b39a2518793bebaf747e955b43d435 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 20 Oct 2011 20:38:26 +0000 Subject: Cleaning i18n code. Previous state: Right now, there are "memories" of the "old" (less than a month!) translation way: * A few remaining calls to BLF_gettext() (only UI_translate_do_iface and UI_translate_do_tooltip should be used). * The _() macro still also calls BLF_gettext()! New state: Here are the changes made by the patch: * Removing the no more needed _() macro. * Removing most N_() and _() calls, only keeping the few needed ones (i.e. strings that are in no other way findable by xgettext and/or update_msg script). * Defining in UI_interface.h IFACE_() and TIP_() macros (resp. for UI_translate_do_iface and UI_translate_do_tooltip). * Replacing all calls to BLF_gettext by relevant IFACE_ or TIP_ one. * Replacing all calls to UI_translate_do_iface by IFACE_. * Replacing all calls to UI_translate_do_tooltip by TIP_. All this somewhat clarifies and simplifies the code. On the bf-translations scripts side, this only implies adding IFACE_ and TIP_ as detection markers for xgettext. It also allows to reduce POTFILES.in quite notably (only 20 files remaining in it). Please also have a look at those pages: * Coder POV: http://wiki.blender.org/index.php/Dev:2.5/Source/Interface/Internationalization * Translator POV: http://wiki.blender.org/index.php/Dev:2.5/Doc/How_to/Translate_Blender --- source/blender/makesrna/intern/rna_userdef.c | 54 ++++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'source/blender/makesrna/intern/rna_userdef.c') diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 0c3ff108c03..d579d00f6ce 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2512,36 +2512,36 @@ static void rna_def_userdef_system(BlenderRNA *brna) /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */ static EnumPropertyItem language_items[] = { {0, "", 0, "Nearly done", ""}, - {0, "DEFAULT", 0, N_("Default (Default)"), ""}, - {1, "ENGLISH", 0, N_("English (English)"), "en_US"}, - {8, "FRENCH", 0, N_("French (Français)"), "fr_FR"}, - {9, "SPANISH", 0, N_("Spanish (Español)"), "es_ES"}, - {13, "SIMPLIFIED_CHINESE", 0, N_("Simplified Chinese (简体中文)"), "zh_CN"}, + {0, "DEFAULT", 0, "Default (Default)", ""}, + {1, "ENGLISH", 0, "English (English)", "en_US"}, + {8, "FRENCH", 0, "French (Français)", "fr_FR"}, + {9, "SPANISH", 0, "Spanish (Español)", "es_ES"}, + {13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", "zh_CN"}, {0, "", 0, "In progress", ""}, - {2, "JAPANESE", 0, N_("Japanese (日本語)"), "ja_JP"}, - {3, "DUTCH", 0, N_("Dutch (Nederlandse taal)"), "nl_NL"}, - {4, "ITALIAN", 0, N_("Italian (Italiano)"), "it_IT"}, - {5, "GERMAN", 0, N_("German (Deutsch)"), "de_DE"}, - {6, "FINNISH", 0, N_("Finnish (Suomi)"), "fi_FI"}, - {7, "SWEDISH", 0, N_("Swedish (Svenska)"), "sv_SE"}, - {10, "CATALAN", 0, N_("Catalan (Català)"), "ca_AD"}, - {11, "CZECH", 0, N_("Czech (Český)"), "cs_CZ"}, - {12, "BRAZILIAN_PORTUGUESE", 0, N_("Brazilian Portuguese (Português do Brasil)"), "pt_BR"}, - {14, "TRADITIONAL_CHINESE", 0, N_("Traditional Chinese (繁體中文)"), "zh_TW"}, - {15, "RUSSIAN", 0, N_("Russian (Русский)"), "ru_RU"}, - {16, "CROATIAN", 0, N_("Croatian (Hrvatski)"), "hr_HR"}, - {17, "SERBIAN", 0, N_("Serbian (Српском језику)"), "sr_RS"}, - {18, "UKRAINIAN", 0, N_("Ukrainian (Український)"), "uk_UA"}, - {19, "POLISH", 0, N_("Polish (Polski)"), "pl_PL"}, - {20, "ROMANIAN", 0, N_("Romanian (Român)"), "ro_RO"}, + {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 (Deutsch)", "de_DE"}, + {6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"}, + {7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"}, + {10, "CATALAN", 0, "Catalan (Català)", "ca_AD"}, + {11, "CZECH", 0, "Czech (Český)", "cs_CZ"}, + {12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Português do Brasil)", "pt_BR"}, + {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh_TW"}, + {15, "RUSSIAN", 0, "Russian (Русский)", "ru_RU"}, + {16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"}, + {17, "SERBIAN", 0, "Serbian (Српском језику)", "sr_RS"}, + {18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"}, + {19, "POLISH", 0, "Polish (Polski)", "pl_PL"}, + {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"}, /* using the utf8 flipped form of Arabic (العربية) */ - {21, "ARABIC", 0, N_("Arabic (ﺔﻴﺑﺮﻌﻟﺍ)"), "ar_EG"}, - {22, "BULGARIAN", 0, N_("Bulgarian (Български)"), "bg_BG"}, - {23, "GREEK", 0, N_("Greek (Ελληνικά)"), "el_GR"}, - {24, "KOREAN", 0, N_("Korean (한국 언어)"), "ko_KR"}, - /*{25, "NEPALI", 0, N_("Nepali (नेपाली)"), "ne_NP"},*/ + {21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"}, + {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"}, + {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"}, + {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"}, + /*{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},*/ /* using the utf8 flipped form of Persian (فارسی) */ - {26, "PERSIAN", 0, N_("Persian (ﯽﺳﺭﺎﻓ)"), "fa_PE"}, + {26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_PE"}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL); -- cgit v1.2.3