diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-13 12:27:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-13 12:27:38 +0300 |
commit | 2c4f091feb0b0eca4893bf6914f4698daf4556ed (patch) | |
tree | c1bc7caeb6bd47cb1209738b790f99a02c31d332 /source/blender/blentranslation/intern/blt_translation.c | |
parent | aacdd28edd838a011615af2a998aa2d90b4a75f3 (diff) | |
parent | 2be1d8bbafc8a3cedd4d2699ded260215bb07da2 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blentranslation/intern/blt_translation.c')
-rw-r--r-- | source/blender/blentranslation/intern/blt_translation.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blentranslation/intern/blt_translation.c b/source/blender/blentranslation/intern/blt_translation.c index 9175585f1b3..40d384dd0fe 100644 --- a/source/blender/blentranslation/intern/blt_translation.c +++ b/source/blender/blentranslation/intern/blt_translation.c @@ -41,6 +41,7 @@ #include "BLI_fileops.h" #include "BLI_path_util.h" #include "BLI_string.h" +#include "BLI_threads.h" #include "DNA_userdef_types.h" /* For user settings. */ @@ -91,7 +92,7 @@ const char *BLT_pgettext(const char *msgctxt, const char *msgid) bool BLT_translate(void) { #ifdef WITH_INTERNATIONAL - return (U.transopts & USER_DOTRANSLATE) != 0; + return BLI_thread_is_main() && (U.transopts & USER_DOTRANSLATE); #else return false; #endif @@ -100,7 +101,7 @@ bool BLT_translate(void) bool BLT_translate_iface(void) { #ifdef WITH_INTERNATIONAL - return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE); + return BLT_translate() && (U.transopts & USER_TR_IFACE); #else return false; #endif @@ -109,7 +110,7 @@ bool BLT_translate_iface(void) bool BLT_translate_tooltips(void) { #ifdef WITH_INTERNATIONAL - return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS); + return BLT_translate() && (U.transopts & USER_TR_TOOLTIPS); #else return false; #endif @@ -118,7 +119,7 @@ bool BLT_translate_tooltips(void) bool BLT_translate_new_dataname(void) { #ifdef WITH_INTERNATIONAL - return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_NEWDATANAME); + return BLT_translate() && (U.transopts & USER_TR_NEWDATANAME); #else return false; #endif |