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/space_text/CMakeLists.txt | 1 + source/blender/editors/space_text/SConscript | 1 + source/blender/editors/space_text/text_header.c | 8 ++++---- source/blender/editors/space_text/text_ops.c | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_text') diff --git a/source/blender/editors/space_text/CMakeLists.txt b/source/blender/editors/space_text/CMakeLists.txt index 5367efbf84b..de85ddc40ab 100644 --- a/source/blender/editors/space_text/CMakeLists.txt +++ b/source/blender/editors/space_text/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_text/SConscript b/source/blender/editors/space_text/SConscript index c3518f857b6..d11671fe743 100644 --- a/source/blender/editors/space_text/SConscript +++ b/source/blender/editors/space_text/SConscript @@ -40,6 +40,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 92a3cce12e6..91665f1a598 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -202,12 +202,12 @@ void TEXT_OT_start_find(wmOperatorType *ot) uiPopupMenu *pup; pup = UI_popup_menu_begin(C, IFACE_("Text"), ICON_NONE); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Top of File"), + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Top of File"), 0, "type", FILE_TOP); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Bottom of File"), + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Bottom of File"), 0, "type", FILE_BOTTOM); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Page Up"), 0, "type", PREV_PAGE); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Page Down"), + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Page Up"), 0, "type", PREV_PAGE); + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Page Down"), 0, "type", NEXT_PAGE); UI_popup_menu_end(C, pup); } diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index fce864d975f..2d480548898 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -39,7 +39,7 @@ #include "BLI_blenlib.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" @@ -1921,7 +1921,7 @@ void TEXT_OT_jump(wmOperatorType *ot) /* properties */ prop = RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to", 1, 10000); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_TEXT); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXT); } /******************* delete operator **********************/ -- cgit v1.2.3