Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-02-13 00:13:42 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-02-13 00:15:27 +0300
commit61e2e609a168cf12f107dbf9a24d94cca17d4c58 (patch)
tree47f75855b3a42647ffcea5dabcfd8814e231bf5f /source/blender/editors/object
parent62f8c55a75489634a20962302ef155b0d4d3def6 (diff)
I18N Messages: fix confusion with Light meanings.
Using ID_LIGHT or ID_ID for "Lamp" meaning, "Light" without context being for 'not heavy'. That rename of data-block was not really nice on that side of things :/ Related to T43295.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c3
-rw-r--r--source/blender/editors/object/object_select.c1
-rw-r--r--source/blender/editors/object/object_shader_fx.c10
3 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 71575c31937..2931fb89d7e 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -464,7 +464,8 @@ void OBJECT_OT_add(wmOperatorType *ot)
/* properties */
ED_object_add_unit_props_radius(ot);
- RNA_def_enum(ot->srna, "type", rna_enum_object_type_items, 0, "Type", "");
+ PropertyRNA *prop = RNA_def_enum(ot->srna, "type", rna_enum_object_type_items, 0, "Type", "");
+ RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_ID);
ED_object_add_generic_props(ot, true);
}
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 1eccdfbd519..aed074907b7 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -427,6 +427,7 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_object_type_items, 1, "Type", "");
+ RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_ID);
}
/*********************** Selection by Links *********************/
diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c
index 7a70e9136f9..a19c79d2829 100644
--- a/source/blender/editors/object/object_shader_fx.c
+++ b/source/blender/editors/object/object_shader_fx.c
@@ -36,6 +36,8 @@
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
+#include "BLT_translation.h"
+
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_shader_fx.h"
@@ -254,8 +256,6 @@ static const EnumPropertyItem *shaderfx_add_itemf(
void OBJECT_OT_shaderfx_add(wmOperatorType *ot)
{
- PropertyRNA *prop;
-
/* identifiers */
ot->name = "Add Effect";
ot->description = "Add a visual effect to the active object";
@@ -270,9 +270,9 @@ void OBJECT_OT_shaderfx_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop = RNA_def_enum(ot->srna, "type", rna_enum_object_shaderfx_type_items, eShaderFxType_Blur, "Type", "");
- RNA_def_enum_funcs(prop, shaderfx_add_itemf);
- ot->prop = prop;
+ ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_object_shaderfx_type_items, eShaderFxType_Blur, "Type", "");
+ RNA_def_enum_funcs(ot->prop, shaderfx_add_itemf);
+ RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_ID); /* Abused, for "Light"... */
}
/************************ generic functions for operators using names and data context *********************/