i18n: replace some bit checks from U.transopts with utility functions UI_translate*
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 20 Sep 2011 07:47:27 +0000 (07:47 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 20 Sep 2011 07:47:27 +0000 (07:47 +0000)
source/blender/editors/interface/interface.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/transform/transform_orientations.c

index a850fa993f07973485953c5a3595a62d9b9536da..2ff77d255c6b5c372241f5b6075986de62d71fbb 100644 (file)
@@ -96,12 +96,20 @@ static void ui_free_but(const bContext *C, uiBut *but);
 
 int UI_translate_iface(void)
 {
+#ifdef INTERNATIONAL
        return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE);
+#else
+       return 0;
+#endif
 }
 
 int UI_translate_tooltips(void)
 {
+#ifdef INTERNATIONAL
        return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS);
+#else
+       return 0;
+#endif
 }
 
 const char *UI_translate_do_iface(const char *msgid)
index 22146a22b9b4bec4e8a741d73dead0a7bd1134bb..55b30aec804f5b6a2ba089bb0f4faeb6fec80643 100644 (file)
@@ -470,7 +470,7 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
        }
 }
 
-#define TIP_(msgid) (((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_TOOLTIPS))?BLF_gettext(msgid):(msgid))
+#define TIP_(msgid) UI_translate_do_tooltip(msgid)
 void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
 {
        bScreen *screen= CTX_wm_screen(C);
index 3ee4c30192e7a7c4fe37c2a25e23bb0bce13e512..cd4cbc77c49ddf015b34c58df651e52d43d4276f 100644 (file)
@@ -415,8 +415,8 @@ const char * BIF_menustringTransformOrientation(const bContext *C, const char *t
        TransformOrientation *ts;
        int i = V3D_MANIP_CUSTOM;
        char *str_menu, *p;
-       
-       if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) {
+
+       if(UI_translate_iface()) {
                title= BLF_gettext(title);
                menu= BLF_gettext(menu);
        }