From 62f8c55a75489634a20962302ef155b0d4d3def6 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 12 Feb 2019 21:51:51 +0100 Subject: Cleanup: rename `BLT_I18NCONTEXT_ID_LAMP` -> `BLT_I18NCONTEXT_ID_LIGHT`. --- source/blender/blenkernel/intern/idcode.c | 2 +- source/blender/blentranslation/BLT_translation.h | 4 ++-- .../blender/editors/interface/interface_templates.c | 2 +- source/blender/editors/object/object_add.c | 20 ++++++++++---------- source/blender/makesrna/intern/rna_lamp.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c index d057eae88a4..cecd5bf1322 100644 --- a/source/blender/blenkernel/intern/idcode.c +++ b/source/blender/blenkernel/intern/idcode.c @@ -58,7 +58,7 @@ static IDType idtypes[] = { {ID_IM, "Image", "images", BLT_I18NCONTEXT_ID_IMAGE, IDTYPE_FLAGS_ISLINKABLE}, {ID_IP, "Ipo", "ipos", "", IDTYPE_FLAGS_ISLINKABLE}, /* deprecated */ {ID_KE, "Key", "shape_keys", BLT_I18NCONTEXT_ID_SHAPEKEY, 0 }, - {ID_LA, "Light", "lights", BLT_I18NCONTEXT_ID_LAMP, IDTYPE_FLAGS_ISLINKABLE}, + {ID_LA, "Light", "lights", BLT_I18NCONTEXT_ID_LIGHT, IDTYPE_FLAGS_ISLINKABLE}, {ID_LI, "Library", "libraries", BLT_I18NCONTEXT_ID_LIBRARY, 0 }, {ID_LS, "FreestyleLineStyle", "linestyles", BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, IDTYPE_FLAGS_ISLINKABLE}, {ID_LT, "Lattice", "lattices", BLT_I18NCONTEXT_ID_LATTICE, IDTYPE_FLAGS_ISLINKABLE}, diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index bf1ce19f3a6..7e562aa8c02 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -120,7 +120,7 @@ bool BLT_lang_is_ime_supported(void); #define BLT_I18NCONTEXT_ID_IMAGE "Image" /*#define BLT_I18NCONTEXT_ID_IPO "Ipo"*/ /* Deprecated */ #define BLT_I18NCONTEXT_ID_SHAPEKEY "Key" -#define BLT_I18NCONTEXT_ID_LAMP "Lamp" +#define BLT_I18NCONTEXT_ID_LIGHT "Light" #define BLT_I18NCONTEXT_ID_LIBRARY "Library" #define BLT_I18NCONTEXT_ID_LATTICE "Lattice" #define BLT_I18NCONTEXT_ID_MATERIAL "Material" @@ -174,7 +174,7 @@ typedef struct { BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IMAGE, "id_image"), \ /*BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IPO, "id_ipo"),*/ \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SHAPEKEY, "id_shapekey"), \ - BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LAMP, "id_lamp"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIGHT, "id_lamp"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIBRARY, "id_library"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LATTICE, "id_lattice"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MASK, "id_mask"), \ diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 1b20b0cf726..bd2405ccae1 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -597,7 +597,7 @@ static uiBut *template_id_def_new_but( BLT_I18NCONTEXT_ID_TEXTURE, BLT_I18NCONTEXT_ID_IMAGE, BLT_I18NCONTEXT_ID_LATTICE, - BLT_I18NCONTEXT_ID_LAMP, + BLT_I18NCONTEXT_ID_LIGHT, BLT_I18NCONTEXT_ID_CAMERA, BLT_I18NCONTEXT_ID_WORLD, BLT_I18NCONTEXT_ID_SCREEN, diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 3d05f69192d..71575c31937 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -475,11 +475,11 @@ void OBJECT_OT_add(wmOperatorType *ot) static const char *get_lightprobe_defname(int type) { switch (type) { - case LIGHTPROBE_TYPE_GRID: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "IrradianceVolume"); - case LIGHTPROBE_TYPE_PLANAR: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "ReflectionPlane"); - case LIGHTPROBE_TYPE_CUBE: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "ReflectionCubemap"); + case LIGHTPROBE_TYPE_GRID: return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "IrradianceVolume"); + case LIGHTPROBE_TYPE_PLANAR: return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "ReflectionPlane"); + case LIGHTPROBE_TYPE_CUBE: return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "ReflectionCubemap"); default: - return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "LightProbe"); + return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "LightProbe"); } } @@ -1100,12 +1100,12 @@ void OBJECT_OT_gpencil_add(wmOperatorType *ot) static const char *get_light_defname(int type) { switch (type) { - 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_AREA: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Area"); + case LA_LOCAL: return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "Point"); + case LA_SUN: return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "Sun"); + case LA_SPOT: return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "Spot"); + case LA_AREA: return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "Area"); default: - return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Light"); + return CTX_DATA_(BLT_I18NCONTEXT_ID_LIGHT, "Light"); } } @@ -1167,7 +1167,7 @@ void OBJECT_OT_light_add(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_light_type_items, 0, "Type", ""); - RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_LAMP); + RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_LIGHT); ED_object_add_unit_props_radius(ot); ED_object_add_generic_props(ot, false); diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index e9181ed2d5b..8ee80cefda0 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -125,7 +125,7 @@ static void rna_def_light(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, rna_enum_light_type_items); RNA_def_property_ui_text(prop, "Type", "Type of Light"); - RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_LAMP); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_LIGHT); RNA_def_property_update(prop, 0, "rna_Light_draw_update"); prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE); -- cgit v1.2.3