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/object/CMakeLists.txt | 2 +- source/blender/editors/object/SConscript | 2 +- source/blender/editors/object/object_add.c | 20 ++++++++++---------- source/blender/editors/object/object_constraint.c | 2 +- source/blender/editors/object/object_edit.c | 2 +- source/blender/editors/object/object_relations.c | 2 +- source/blender/editors/object/object_select.c | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index 79437bb05b9..b3d02d45e13 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../gpu ../../ikplugin diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index db30fae1f84..914ffa3061c 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -33,9 +33,9 @@ incs = [ '#/extern/recastnavigation', '#/intern/guardedalloc', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../ikplugin', diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 075e382f628..615fbb527b3 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -55,7 +55,7 @@ #include "BLI_math.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_anim.h" @@ -509,7 +509,7 @@ static int effector_add_exec(bContext *C, wmOperator *op) if (type == PFIELD_GUIDE) { Curve *cu; - const char *name = CTX_DATA_(BLF_I18NCONTEXT_ID_OBJECT, "CurveGuide"); + const char *name = CTX_DATA_(BLT_I18NCONTEXT_ID_OBJECT, "CurveGuide"); ob = ED_object_add_type(C, OB_CURVE, name, loc, rot, false, layer); cu = ob->data; @@ -521,7 +521,7 @@ static int effector_add_exec(bContext *C, wmOperator *op) ED_object_editmode_exit(C, EM_FREEDATA); } else { - const char *name = CTX_DATA_(BLF_I18NCONTEXT_ID_OBJECT, "Field"); + const char *name = CTX_DATA_(BLT_I18NCONTEXT_ID_OBJECT, "Field"); ob = ED_object_add_type(C, OB_EMPTY, name, loc, rot, false, layer); BKE_object_obdata_size_init(ob, dia); if (ELEM(type, PFIELD_WIND, PFIELD_VORTEX)) @@ -898,13 +898,13 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot) static const char *get_lamp_defname(int type) { switch (type) { - case LA_LOCAL: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Point"); - case LA_SUN: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Sun"); - case LA_SPOT: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Spot"); - case LA_HEMI: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Hemi"); - case LA_AREA: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Area"); + case LA_LOCAL: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Point"); + case LA_SUN: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Sun"); + case LA_SPOT: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Spot"); + case LA_HEMI: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Hemi"); + case LA_AREA: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Area"); default: - return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Lamp"); + return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Lamp"); } } @@ -952,7 +952,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); - RNA_def_property_translation_context(ot->prop, BLF_I18NCONTEXT_ID_LAMP); + RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_LAMP); ED_object_add_unit_props(ot); ED_object_add_generic_props(ot, false); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index e14674ef517..2697a5e5fb1 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -40,7 +40,7 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_constraint_types.h" diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 3499a3cc364..67edf0db2d7 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -42,7 +42,7 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_armature_types.h" #include "DNA_curve_types.h" diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 8da535315b2..e21f58d8a38 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -56,7 +56,7 @@ #include "BLI_kdtree.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_animsys.h" diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index a8e4eec640b..83334e4e6a3 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -47,7 +47,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_group.h" -- cgit v1.2.3