From 95a414955ce2d15c62adde665ced18804ca98945 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 20 Oct 2012 08:52:54 +0000 Subject: Remove six languages from Blender UI (rational: very low level of translation, 1-2% at most, and no commit done in branch since more than one year): fi (Finnish), ca (Catalan), bg (Bulgarian), el (Greek), ne (Nepali) and pl (Polish). Also fix compile in paranoid warning=errors mode for own last commit. --- source/blender/blenfont/intern/blf_lang.c | 33 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'source/blender/blenfont') 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 { -- cgit v1.2.3