From 2e2dc9b9e32d104a0f7c3241ea0c11b57a37fd5b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Aug 2015 17:32:01 +1000 Subject: Refactor translation code out of blenfont - Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`. --- source/blender/editors/interface/CMakeLists.txt | 1 + source/blender/editors/interface/SConscript | 1 + source/blender/editors/interface/interface.c | 8 +-- .../editors/interface/interface_eyedropper.c | 2 +- .../blender/editors/interface/interface_handlers.c | 78 +++++++++++----------- .../blender/editors/interface/interface_layout.c | 2 +- source/blender/editors/interface/interface_ops.c | 8 +-- source/blender/editors/interface/interface_panel.c | 2 +- .../blender/editors/interface/interface_regions.c | 2 +- source/blender/editors/interface/interface_style.c | 2 +- .../editors/interface/interface_templates.c | 62 ++++++++--------- source/blender/editors/interface/interface_utils.c | 2 +- 12 files changed, 86 insertions(+), 84 deletions(-) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt index 972eca747b9..3efb4921bbe 100644 --- a/source/blender/editors/interface/CMakeLists.txt +++ b/source/blender/editors/interface/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../imbuf ../../makesdna diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript index 7584fd8ad46..ea6f35c54e6 100644 --- a/source/blender/editors/interface/SConscript +++ b/source/blender/editors/interface/SConscript @@ -37,6 +37,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 31976c7b78a..8efa14a5358 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -59,7 +59,7 @@ #include "BIF_gl.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "UI_interface.h" @@ -4568,7 +4568,7 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...) } } else if (type == BUT_GET_RNA_LABEL_CONTEXT) { - const char *_tmp = BLF_I18NCONTEXT_DEFAULT; + const char *_tmp = BLT_I18NCONTEXT_DEFAULT; if (but->rnaprop) _tmp = RNA_property_translation_context(but->rnaprop); else if (but->optype) @@ -4578,8 +4578,8 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...) if (mt) _tmp = RNA_struct_translation_context(mt->ext.srna); } - if (BLF_is_default_context(_tmp)) { - _tmp = BLF_I18NCONTEXT_DEFAULT_BPYRNA; + if (BLT_is_default_context(_tmp)) { + _tmp = BLT_I18NCONTEXT_DEFAULT_BPYRNA; } tmp = BLI_strdup(_tmp); } diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index 97aa865c287..ceea4ff42d9 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -36,7 +36,7 @@ #include "BLI_blenlib.h" #include "BLI_math_vector.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_screen.h" diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 4adc866d3a7..231ba03000b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -56,7 +56,7 @@ #include "BLI_rect.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" @@ -2849,7 +2849,7 @@ static bool ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, const in * avoid weird character drawing if IME inputs non-ascii chars */ static bool ui_ime_is_lang_supported(void) { - const char *uilng = BLF_lang_get(); + const char *uilng = BLT_lang_get(); const bool is_lang_supported = STREQ(uilng, "zh_CN") || STREQ(uilng, "zh_TW") || STREQ(uilng, "ja_JP"); @@ -6508,19 +6508,19 @@ static bool ui_but_menu(bContext *C, uiBut *but) if (but->flag & UI_BUT_ANIMATED_KEY) { /* replace/delete keyfraemes */ if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframes"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Single Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframes"), ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframe"), ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 1); } @@ -6534,26 +6534,26 @@ static bool ui_but_menu(bContext *C, uiBut *but) } else if (is_anim) { if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframes"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Single Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); } } if ((but->flag & UI_BUT_ANIMATED) && (but->rnapoin.type != &RNA_NlaStrip)) { if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Single Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Single Keyframes"), ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 1); } } @@ -6563,20 +6563,20 @@ static bool ui_but_menu(bContext *C, uiBut *but) uiItemS(layout); if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Drivers"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Drivers"), ICON_NONE, "ANIM_OT_driver_button_remove", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Driver"), ICON_NONE, "ANIM_OT_driver_button_remove", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Driver"), ICON_NONE, "ANIM_OT_driver_button_remove", "all", 1); } - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Driver"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Driver"), ICON_NONE, "ANIM_OT_copy_driver_button"); if (ANIM_driver_can_paste()) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), ICON_NONE, "ANIM_OT_paste_driver_button"); } } @@ -6587,18 +6587,18 @@ static bool ui_but_menu(bContext *C, uiBut *but) uiItemS(layout); if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Drivers"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Drivers"), ICON_NONE, "ANIM_OT_driver_button_add", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single Driver"), ICON_NONE, "ANIM_OT_driver_button_add", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Driver"), ICON_NONE, "ANIM_OT_driver_button_add", "all", 1); } if (ANIM_driver_can_paste()) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), ICON_NONE, "ANIM_OT_paste_driver_button"); } } @@ -6609,17 +6609,17 @@ static bool ui_but_menu(bContext *C, uiBut *but) uiItemS(layout); if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add All to Keying Set"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add All to Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single to Keying Set"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single to Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 0); - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_remove"); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add to Keying Set"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add to Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 1); - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_remove"); } } @@ -6632,23 +6632,23 @@ static bool ui_but_menu(bContext *C, uiBut *but) * Paste Property Value */ if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset All to Default Values"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset All to Default Values"), ICON_NONE, "UI_OT_reset_default_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset Single to Default Value"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset Single to Default Value"), ICON_NONE, "UI_OT_reset_default_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset to Default Value"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset to Default Value"), ICON_NONE, "UI_OT_reset_default_button", "all", 1); } if (is_editable /*&& is_idprop*/ && is_set) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Unset"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Unset"), ICON_NONE, "UI_OT_unset_property_button"); } - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Data Path"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Data Path"), ICON_NONE, "UI_OT_copy_data_path_button"); - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy To Selected"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy To Selected"), ICON_NONE, "UI_OT_copy_to_selected_button"); uiItemS(layout); @@ -6673,17 +6673,17 @@ static bool ui_but_menu(bContext *C, uiBut *but) /* would rather use a block but, but gets weirdly positioned... */ //uiDefBlockBut(block, menu_change_shortcut, but, "Change Shortcut", 0, 0, uiLayoutGetWidth(layout), UI_UNIT_Y, ""); - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"), + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, popup_change_shortcut_func, but, NULL); - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Remove Shortcut"), + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, remove_shortcut_func, but, NULL); } /* only show 'add' if there's a suitable key map for it to go in */ else if (WM_keymap_guess_opname(C, but->optype->idname)) { - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Shortcut"), + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, popup_add_shortcut_func, but, NULL); } @@ -6705,12 +6705,12 @@ static bool ui_but_menu(bContext *C, uiBut *but) PointerRNA ptr_props; if (UI_but_online_manual_id(but, buf, sizeof(buf))) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"), ICON_NONE, "WM_OT_doc_view_manual_ui_context"); WM_operator_properties_create(&ptr_props, "WM_OT_doc_view"); RNA_string_set(&ptr_props, "doc_id", buf); - uiItemFullO(layout, "WM_OT_doc_view", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Online Python Reference"), + uiItemFullO(layout, "WM_OT_doc_view", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Python Reference"), ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0); /* XXX inactive option, not for public! */ diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 6b16bc95d7f..d746acc14a1 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -43,7 +43,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index c3f178d9ef2..6ac657fa7a3 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -39,7 +39,7 @@ #include "BLI_math_color.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_lang.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -830,7 +830,7 @@ static int edittranslation_exec(bContext *C, wmOperator *op) PointerRNA ptr; char popath[FILE_MAX]; const char *root = U.i18ndir; - const char *uilng = BLF_lang_get(); + const char *uilng = BLT_lang_get(); uiStringInfo but_label = {BUT_GET_LABEL, NULL}; uiStringInfo rna_label = {BUT_GET_RNA_LABEL, NULL}; @@ -925,9 +925,9 @@ static void UI_OT_edittranslation_init(wmOperatorType *ot) static int reloadtranslation_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) { - BLF_lang_init(); + BLT_lang_init(); BLF_cache_clear(); - BLF_lang_set(NULL); + BLT_lang_set(NULL); UI_reinit_font(); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index c69aed76b22..f4970ceb35e 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -43,7 +43,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_userdef_types.h" diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 6552625c911..c9b15f05519 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -62,7 +62,7 @@ #include "UI_view2d.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "ED_screen.h" diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 10575fcbc54..8dca148ffe6 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -49,7 +49,7 @@ #include "BLF_api.h" #ifdef WITH_INTERNATIONAL -# include "BLF_translation.h" +# include "BLT_translation.h" #endif #include "UI_interface.h" diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 80e098cfdc9..6b2f12eef45 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -47,7 +47,7 @@ #include "BLI_fnmatch.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_colortools.h" #include "BKE_context.h" @@ -372,7 +372,7 @@ static const char *template_id_context(StructRNA *type) if (type) { return BKE_idcode_to_translation_context(RNA_type_to_ID_code(type)); } - return BLF_I18NCONTEXT_DEFAULT; + return BLT_I18NCONTEXT_DEFAULT; } #endif @@ -485,31 +485,31 @@ static void template_ID( int w = id ? UI_UNIT_X : (flag & UI_ID_OPEN) ? UI_UNIT_X * 3 : UI_UNIT_X * 6; /* i18n markup, does nothing! */ - BLF_I18N_MSGID_MULTI_CTXT("New", BLF_I18NCONTEXT_DEFAULT, - BLF_I18NCONTEXT_ID_SCENE, - BLF_I18NCONTEXT_ID_OBJECT, - BLF_I18NCONTEXT_ID_MESH, - BLF_I18NCONTEXT_ID_CURVE, - BLF_I18NCONTEXT_ID_METABALL, - BLF_I18NCONTEXT_ID_MATERIAL, - BLF_I18NCONTEXT_ID_TEXTURE, - BLF_I18NCONTEXT_ID_IMAGE, - BLF_I18NCONTEXT_ID_LATTICE, - BLF_I18NCONTEXT_ID_LAMP, - BLF_I18NCONTEXT_ID_CAMERA, - BLF_I18NCONTEXT_ID_WORLD, - BLF_I18NCONTEXT_ID_SCREEN, - BLF_I18NCONTEXT_ID_TEXT, + BLT_I18N_MSGID_MULTI_CTXT("New", BLT_I18NCONTEXT_DEFAULT, + BLT_I18NCONTEXT_ID_SCENE, + BLT_I18NCONTEXT_ID_OBJECT, + BLT_I18NCONTEXT_ID_MESH, + BLT_I18NCONTEXT_ID_CURVE, + BLT_I18NCONTEXT_ID_METABALL, + BLT_I18NCONTEXT_ID_MATERIAL, + BLT_I18NCONTEXT_ID_TEXTURE, + BLT_I18NCONTEXT_ID_IMAGE, + BLT_I18NCONTEXT_ID_LATTICE, + BLT_I18NCONTEXT_ID_LAMP, + BLT_I18NCONTEXT_ID_CAMERA, + BLT_I18NCONTEXT_ID_WORLD, + BLT_I18NCONTEXT_ID_SCREEN, + BLT_I18NCONTEXT_ID_TEXT, ); - BLF_I18N_MSGID_MULTI_CTXT("New", BLF_I18NCONTEXT_ID_SPEAKER, - BLF_I18NCONTEXT_ID_SOUND, - BLF_I18NCONTEXT_ID_ARMATURE, - BLF_I18NCONTEXT_ID_ACTION, - BLF_I18NCONTEXT_ID_NODETREE, - BLF_I18NCONTEXT_ID_BRUSH, - BLF_I18NCONTEXT_ID_PARTICLESETTINGS, - BLF_I18NCONTEXT_ID_GPENCIL, - BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE, + BLT_I18N_MSGID_MULTI_CTXT("New", BLT_I18NCONTEXT_ID_SPEAKER, + BLT_I18NCONTEXT_ID_SOUND, + BLT_I18NCONTEXT_ID_ARMATURE, + BLT_I18NCONTEXT_ID_ACTION, + BLT_I18NCONTEXT_ID_NODETREE, + BLT_I18NCONTEXT_ID_BRUSH, + BLT_I18NCONTEXT_ID_PARTICLESETTINGS, + BLT_I18NCONTEXT_ID_GPENCIL, + BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, ); if (newop) { @@ -943,21 +943,21 @@ static uiLayout *draw_modifier( if (!(ob->mode & OB_MODE_PARTICLE_EDIT)) { if (ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB)) - uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, + uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, "OBJECT_OT_duplicates_make_real"); else if (psys->part->ren_as == PART_DRAW_PATH && psys->pathcache) - uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, + uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, "OBJECT_OT_modifier_convert"); } } else { uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT); - uiItemEnumO(row, "OBJECT_OT_modifier_apply", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"), + uiItemEnumO(row, "OBJECT_OT_modifier_apply", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"), 0, "apply_as", MODIFIER_APPLY_DATA); if (modifier_isSameTopology(md) && !modifier_isNonGeometrical(md)) { uiItemEnumO(row, "OBJECT_OT_modifier_apply", - CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Apply as Shape Key"), + CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply as Shape Key"), 0, "apply_as", MODIFIER_APPLY_SHAPE); } } @@ -968,7 +968,7 @@ static uiLayout *draw_modifier( if (!ELEM(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth, eModifierType_Smoke)) { - uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE, + uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE, "OBJECT_OT_modifier_copy"); } } diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 0823238fcb1..1d51c0588b6 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -41,7 +41,7 @@ #include "BLI_string.h" #include "BLI_listbase.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_report.h" -- cgit v1.2.3