diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-16 10:32:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-18 00:01:26 +0300 |
commit | 2e2dc9b9e32d104a0f7c3241ea0c11b57a37fd5b (patch) | |
tree | a6830032130d13dcbfa522ed6889fe6f141f99f3 /source/blender/editors/space_view3d | |
parent | 3047b96eaa962fe45d2333f5ea4be809e02787cd (diff) |
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`.
Diffstat (limited to 'source/blender/editors/space_view3d')
8 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt index d8d29d63686..181a0adfd28 100644 --- a/source/blender/editors/space_view3d/CMakeLists.txt +++ b/source/blender/editors/space_view3d/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../gpu ../../imbuf diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript index 2ec9aa7e4af..6e4e47e22a4 100644 --- a/source/blender/editors/space_view3d/SConscript +++ b/source/blender/editors/space_view3d/SConscript @@ -42,6 +42,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 1a6bbfe77bb..d5fd18a77db 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -45,7 +45,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_math.h" #include "BLI_blenlib.h" @@ -1178,7 +1178,7 @@ void view3d_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel object"); strcpy(pt->idname, "VIEW3D_PT_transform"); strcpy(pt->label, N_("Transform")); /* XXX C panels not available through RNA (bpy.types)! */ - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = view3d_panel_transform; pt->poll = view3d_panel_transform_poll; BLI_addtail(&art->paneltypes, pt); @@ -1186,7 +1186,7 @@ void view3d_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel vgroup"); strcpy(pt->idname, "VIEW3D_PT_vgroup"); strcpy(pt->label, N_("Vertex Weights")); /* XXX C panels are not available through RNA (bpy.types)! */ - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = view3d_panel_vgroup; pt->poll = view3d_panel_vgroup_poll; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 7f553fe8836..9fb7bce9372 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -80,7 +80,7 @@ #include "WM_api.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "ED_armature.h" #include "ED_keyframing.h" diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 6a020251fca..e6910cf9303 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -39,7 +39,7 @@ #include "BKE_context.h" #include "BKE_report.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BIF_gl.h" diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index f8912345e1c..42895a7530b 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -37,7 +37,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_depsgraph.h" diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index af24a99a6f2..065c336d001 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -43,7 +43,7 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -234,7 +234,7 @@ void view3d_toolshelf_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel tools"); strcpy(pt->idname, "VIEW3D_PT_tool_shelf"); strcpy(pt->label, N_("Tool Shelf")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = view3d_panel_tool_shelf; BLI_addtail(&art->paneltypes, pt); } @@ -246,7 +246,7 @@ void view3d_tool_props_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel last operator"); strcpy(pt->idname, "VIEW3D_PT_last_operator"); strcpy(pt->label, N_("Operator")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw_header = view3d_panel_operator_redo_header; pt->draw = view3d_panel_operator_redo; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 243c6e5c8c3..e2bb3660332 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -38,7 +38,7 @@ #include "BKE_context.h" #include "BKE_report.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BIF_gl.h" |