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>2021-02-02 21:56:18 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-02-02 21:58:02 +0300
commitf2781e1c7c82294c0dbf5d31160313c95ff4ad94 (patch)
tree32cdee722a8fee39e54888f87148cafc5c566ff3 /source/blender/blentranslation
parentb3f9895ab0fd92c4f8b4d37a93822e06b5c8353b (diff)
Fix for T82459 - Input Language Independent of Display Language
Allow OS input language to initiate IME, regardless of Blender output language. Differential Revision: https://developer.blender.org/D10268 Reviewed by Julian Eisel
Diffstat (limited to 'source/blender/blentranslation')
-rw-r--r--source/blender/blentranslation/intern/blt_lang.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c
index bd0352d3e80..6de1d85a6a8 100644
--- a/source/blender/blentranslation/intern/blt_lang.c
+++ b/source/blender/blentranslation/intern/blt_lang.c
@@ -48,10 +48,6 @@
#include "MEM_guardedalloc.h"
-/* Cached IME support flags */
-static bool ime_is_lang_supported = false;
-static void blt_lang_check_ime_supported(void);
-
#ifdef WITH_INTERNATIONAL
# include "BLI_fileops.h"
@@ -286,7 +282,6 @@ void BLT_lang_set(const char *str)
#else
(void)str;
#endif
- blt_lang_check_ime_supported();
IMB_thumb_clear_translations();
}
@@ -380,24 +375,13 @@ void BLT_lang_locale_explode(const char *locale,
}
}
-/**
- * Test if the translation context allows IME input - used to
- * avoid weird character drawing if IME inputs non-ascii chars.
- */
-static void blt_lang_check_ime_supported(void)
-{
-#ifdef WITH_INPUT_IME
- const char *uilng = BLT_lang_get();
- ime_is_lang_supported = STR_ELEM(uilng, "zh_CN", "zh_TW", "ja_JP");
-#else
- ime_is_lang_supported = false;
-#endif
-}
-
+/* Note that "lang" here is the _output_ display language. We used to restrict
+ * IME for keyboard _input_ language because our multilingual font was only used
+ * when some output languages were selected. That font is used all the time now. */
bool BLT_lang_is_ime_supported(void)
{
#ifdef WITH_INPUT_IME
- return ime_is_lang_supported;
+ return true;
#else
return false;
#endif