diff options
Diffstat (limited to 'source/blender')
-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 |