Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrelease/scripts/modules/bl_i18n_utils/import_po_from_branches.py4
-rw-r--r--release/scripts/modules/bl_i18n_utils/settings.py3
-rw-r--r--source/blender/blenfont/intern/blf_lang.c33
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c16
4 files changed, 32 insertions, 24 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/import_po_from_branches.py b/release/scripts/modules/bl_i18n_utils/import_po_from_branches.py
index a15bea9ef0d..533dded3c57 100755
--- a/release/scripts/modules/bl_i18n_utils/import_po_from_branches.py
+++ b/release/scripts/modules/bl_i18n_utils/import_po_from_branches.py
@@ -39,6 +39,8 @@ except:
TRUNK_PO_DIR = settings.TRUNK_PO_DIR
BRANCHES_DIR = settings.BRANCHES_DIR
+IMPORT_LANGUAGES_SKIP = settings.IMPORT_LANGUAGES_SKIP
+
RTL_PREPROCESS_FILE = settings.RTL_PREPROCESS_FILE
PY3 = settings.PYTHON3_EXEC
@@ -63,7 +65,7 @@ def main():
threshold = float(args.threshold) / 100.0
for lang in os.listdir(BRANCHES_DIR):
- if args.langs and lang not in args.langs:
+ if (args.langs and lang not in args.langs) or lang in IMPORT_LANGUAGES_SKIP:
continue
po = os.path.join(BRANCHES_DIR, lang, ".".join((lang, "po")))
if os.path.exists(po):
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py
index 5db8f9c7c94..26a4cbaeb01 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -35,6 +35,9 @@ import os.path
# into /trunk, as a percentage. -1 means "import everything".
IMPORT_MIN_LEVEL = -1
+# Languages in /branches we do not want to import in /trunk currently...
+IMPORT_LANGUAGES_SKIP = {'bg', 'ca', 'fi', 'el', 'ko', 'ne', 'pl', 'ro'}
+
# The comment prefix used in generated messages.txt file.
COMMENT_PREFIX = "#~ "
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index d251542ead0..af2f9df3c00 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -171,7 +171,6 @@ void BLF_lang_set(const char *str)
char *locreturn;
const char *short_locale;
int ok = 1;
- const char *long_locale = locales[2 * U.language];
if ((U.transopts & USER_DOTRANSLATE) == 0)
return;
@@ -182,25 +181,29 @@ void BLF_lang_set(const char *str)
short_locale = locales[2 * U.language + 1];
#if defined(_WIN32) && !defined(FREE_WINDOWS)
- if (short_locale) {
- char *envStr;
+ {
+ const char *long_locale = locales[2 * U.language];
- if (U.language == 0) /* Use system setting. */
- envStr = BLI_sprintfN("LANG=%s", getenv("LANG"));
- else
- envStr = BLI_sprintfN("LANG=%s", short_locale);
+ if (short_locale) {
+ char *envStr;
- gettext_putenv(envStr);
- MEM_freeN(envStr);
- }
+ if (U.language == 0) /* Use system setting. */
+ envStr = BLI_sprintfN("LANG=%s", getenv("LANG"));
+ else
+ envStr = BLI_sprintfN("LANG=%s", short_locale);
+
+ gettext_putenv(envStr);
+ MEM_freeN(envStr);
+ }
- locreturn = setlocale(LC_ALL, long_locale);
+ locreturn = setlocale(LC_ALL, long_locale);
- if (locreturn == NULL) {
- if (G.debug & G_DEBUG)
- printf("Could not change locale to %s\n", long_locale);
+ if (locreturn == NULL) {
+ if (G.debug & G_DEBUG)
+ printf("Could not change locale to %s\n", long_locale);
- ok = 0;
+ ok = 0;
+ }
}
#else
{
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index e98004db5b7..614029e12ec 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3005,27 +3005,27 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh_TW"},
{18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"},
{ 0, "", 0, N_("In Progress"), ""},
- {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"},
- {10, "CATALAN", 0, "Catalan (Català)", "ca_AD"},
+/* {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"},*/ /* XXX Not active nor enough translated. */
+/* {10, "CATALAN", 0, "Catalan (Català)", "ca_AD"},*/ /* XXX Not active nor enough translated. */
{16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"},
{11, "CZECH", 0, "Czech (Český)", "cs_CZ"},
{ 3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},
{35, "ESPERANTO", 0, "Esperanto (Esperanto)", "eo"},
{34, "ESTONIAN", 0, "Estonian (Eestlane)", "et_EE"},
- { 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
+/* { 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},*/ /* XXX Not active nor enough translated. */
{ 5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
- {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
+/* {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},*/ /* XXX Not active nor enough translated. */
/* using the utf8 flipped form of Hebrew (עִבְרִית)) */
{33, "HEBREW", 0, "Hebrew (תירִבְעִ)", "he_IL"},
{31, "HUNGARIAN", 0, "Hungarian (Magyar)", "hu_HU"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
{29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ky_KG"},
-/* {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"}, */ /* XXX No po's yet. */
- {25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},
+/* {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"}, */ /* XXX Not active nor enough translated. */
+/* {25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},*/ /* XXX Not active nor enough translated. */
/* using the utf8 flipped form of Persian (فارسی) */
{26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_IR"},
- {19, "POLISH", 0, "Polish (Polski)", "pl_PL"},
-/* {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"}, */ /* XXX No po's yet. */
+/* {19, "POLISH", 0, "Polish (Polski)", "pl_PL"},*/ /* XXX Not active nor enough translated. */
+/* {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"}, */ /* XXX Not active nor enough translated. */
{17, "SERBIAN", 0, "Serbian (Српски)", "sr_RS"},
{28, "SERBIAN_LATIN", 0, "Serbian Latin (Srpski latinica)", "sr_RS@latin"},
{ 7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"},