diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-29 15:10:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-29 15:11:35 +0300 |
commit | 3b6c75dc318223a7e559805ed9802c46c73f2f28 (patch) | |
tree | ef5de922cfbfcacb8e69ed7fd0290b53ccce2784 /source/blender/blentranslation | |
parent | b83a1b62c7db4e11c96b65cb68b2a88eeab7fcbc (diff) |
Fix T67620: Font preview translations malfunction in Blender 2.8
We cannot reliably use translations API from non-main threads.
Now storing translated strings in a static cache, with basic mechanism
to update it on language change.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5350
Diffstat (limited to 'source/blender/blentranslation')
-rw-r--r-- | source/blender/blentranslation/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/blentranslation/intern/blt_lang.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blentranslation/CMakeLists.txt b/source/blender/blentranslation/CMakeLists.txt index 34952911dce..70e68ca06d7 100644 --- a/source/blender/blentranslation/CMakeLists.txt +++ b/source/blender/blentranslation/CMakeLists.txt @@ -22,6 +22,7 @@ set(INC . ../blenkernel ../blenlib + ../imbuf ../makesdna ../makesrna ../../../intern/guardedalloc diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c index 75a4681deb2..82386a17776 100644 --- a/source/blender/blentranslation/intern/blt_lang.c +++ b/source/blender/blentranslation/intern/blt_lang.c @@ -42,6 +42,8 @@ #include "BKE_appdir.h" +#include "IMB_thumbs.h" + #include "DNA_userdef_types.h" #include "MEM_guardedalloc.h" @@ -288,6 +290,7 @@ void BLT_lang_set(const char *str) (void)str; #endif blt_lang_check_ime_supported(); + IMB_thumb_clear_translations(); } /* Get the current locale (short code, e.g. es_ES). */ |