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:
Diffstat (limited to 'source/blender/blentranslation/intern/blt_lang.c')
-rw-r--r--source/blender/blentranslation/intern/blt_lang.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c
index 112c615fac2..a533d29b188 100644
--- a/source/blender/blentranslation/intern/blt_lang.c
+++ b/source/blender/blentranslation/intern/blt_lang.c
@@ -253,7 +253,8 @@ void BLT_lang_free(void)
}
#ifdef WITH_INTERNATIONAL
-# define ULANGUAGE ((U.language >= 0 && U.language < num_locales) ? U.language : 0)
+# define ULANGUAGE \
+ ((U.language >= ULANGUAGE_AUTO && U.language < num_locales) ? U.language : ULANGUAGE_ENGLISH)
# define LOCALE(_id) (locales ? locales[(_id)] : "")
#endif
@@ -264,7 +265,7 @@ void BLT_lang_set(const char *str)
const char *short_locale = str ? str : LOCALE(ulang);
const char *short_locale_utf8 = NULL;
- if ((U.transopts & USER_DOTRANSLATE) == 0) {
+ if (U.language == ULANGUAGE_ENGLISH) {
return;
}
@@ -388,13 +389,7 @@ static void blt_lang_check_ime_supported(void)
{
#ifdef WITH_INPUT_IME
const char *uilng = BLT_lang_get();
- if (U.transopts & USER_DOTRANSLATE) {
- ime_is_lang_supported = STREQ(uilng, "zh_CN") || STREQ(uilng, "zh_TW") ||
- STREQ(uilng, "ja_JP");
- }
- else {
- ime_is_lang_supported = false;
- }
+ ime_is_lang_supported = STREQ(uilng, "zh_CN") || STREQ(uilng, "zh_TW") || STREQ(uilng, "ja_JP");
#else
ime_is_lang_supported = false;
#endif