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:
authorHarley Acheson <harley.acheson@gmail.com>2020-04-07 23:25:49 +0300
committerHarley Acheson <harley.acheson@gmail.com>2020-04-07 23:25:49 +0300
commit968619d03626c7e4d92d4cb383ac304b72595af3 (patch)
treefe9299f45a521c27f7241226fc0661654df0c2a6 /source/blender/blentranslation/intern/blt_lang.c
parent53981c7fb6fdd9973e40f81f867f25d10540c1d1 (diff)
UI: Language Selection Changes
Removal of 'Translation' checkbox. Enable translation options when selecting non-English languages. Differential Revision: https://developer.blender.org/D7210 Reviewed by Brecht Van Lommel
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