[Bf-blender-cvs] [aa39dcca375] temp-eevee-next-cryptomatte: I18n: systematically tag all messages in `RNA_ENUM_ITEM_HEADING`.

Bastien Montagne noreply at git.blender.org
Tue Aug 23 12:59:55 CEST 2022


Commit: aa39dcca37585ac62eca738906fcd551510c9017
Author: Bastien Montagne
Date:   Mon Aug 22 15:24:21 2022 +0200
Branches: temp-eevee-next-cryptomatte
https://developer.blender.org/rBaa39dcca37585ac62eca738906fcd551510c9017

I18n: systematically tag all messages in `RNA_ENUM_ITEM_HEADING`.

Add missing labels, and also add tooltips.

Unfortunately there is no way currently to extract two messages from a
single 'function' call, so unless those type of macros become very
widely used, would keep it as manual tagging.

Also disambiguate `case` in text context, pretty sure English is one of
the very rare languages to use this word for character case too.

===================================================================

M	release/scripts/startup/bl_ui/space_text.py
M	source/blender/editors/gpencil/gpencil_interpolate.c
M	source/blender/editors/object/object_data_transfer.c
M	source/blender/makesrna/intern/rna_curve.c
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index e6f4ea75189..d2db6ca8308 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -170,7 +170,8 @@ class TEXT_PT_find(Panel):
         row = layout.row(align=True)
         if not st.text:
             row.active = False
-        row.prop(st, "use_match_case", text="Case", toggle=True)
+        row.prop(st, "use_match_case", text="Case",
+                 text_ctxt=i18n_contexts.id_text, toggle=True)
         row.prop(st, "use_find_wrap", text="Wrap",
                  text_ctxt=i18n_contexts.id_text, toggle=True)
         row.prop(st, "use_find_all", text="All", toggle=True)
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index 94afc36f5ee..bf6616638c4 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -1484,7 +1484,7 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot)
   static const EnumPropertyItem gpencil_interpolation_type_items[] = {
       /* Interpolation. */
       RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_GPENCIL, "Interpolation"),
-                            "Standard transitions between keyframes"),
+                            N_("Standard transitions between keyframes")),
       {GP_IPO_LINEAR,
        "LINEAR",
        ICON_IPO_LINEAR,
@@ -1497,10 +1497,9 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot)
        "Custom interpolation defined using a curve map"},
 
       /* Easing. */
-      RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_GPENCIL,
-                                   "Easing (by strength)"),
-                            "Predefined inertial transitions, useful for motion graphics "
-                            "(from least to most \"dramatic\")"),
+      RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_GPENCIL, "Easing (by strength)"),
+                            N_("Predefined inertial transitions, useful for motion graphics "
+                               "(from least to most \"dramatic\")")),
       {GP_IPO_SINE,
        "SINE",
        ICON_IPO_SINE,
@@ -1518,7 +1517,7 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot)
        "Circular easing (strongest and most dynamic)"},
 
       RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_GPENCIL, "Dynamic Effects"),
-                            "Simple physics-inspired easing effects"),
+                            N_("Simple physics-inspired easing effects")),
       {GP_IPO_BACK, "BACK", ICON_IPO_BACK, "Back", "Cubic easing with overshoot and settle"},
       {GP_IPO_BOUNCE,
        "BOUNCE",
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index 4837b538bf6..78b059d5514 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -45,7 +45,7 @@
  * Note some are 'fake' ones, i.e. they are not hold by real CDLayers. */
 /* Not shared with modifier, since we use a usual enum here, not a multi-choice one. */
 static const EnumPropertyItem DT_layer_items[] = {
-    RNA_ENUM_ITEM_HEADING("Vertex Data", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Vertex Data"), NULL),
     {DT_TYPE_MDEFORMVERT,
      "VGROUP_WEIGHTS",
      0,
@@ -61,7 +61,7 @@ static const EnumPropertyItem DT_layer_items[] = {
 #endif
     {DT_TYPE_BWEIGHT_VERT, "BEVEL_WEIGHT_VERT", 0, "Bevel Weight", "Transfer bevel weights"},
 
-    RNA_ENUM_ITEM_HEADING("Edge Data", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Edge Data"), NULL),
     {DT_TYPE_SHARP_EDGE, "SHARP_EDGE", 0, "Sharp", "Transfer sharp mark"},
     {DT_TYPE_SEAM, "SEAM", 0, "UV Seam", "Transfer UV seam mark"},
     {DT_TYPE_CREASE, "CREASE", 0, "Subdivision Crease", "Transfer crease values"},
@@ -72,12 +72,12 @@ static const EnumPropertyItem DT_layer_items[] = {
      "Freestyle Mark",
      "Transfer Freestyle edge mark"},
 
-    RNA_ENUM_ITEM_HEADING("Face Corner Data", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Face Corner Data"), NULL),
     {DT_TYPE_LNOR, "CUSTOM_NORMAL", 0, "Custom Normals", "Transfer custom normals"},
     {DT_TYPE_MPROPCOL_LOOP | DT_TYPE_MLOOPCOL_LOOP, "VCOL", 0, "Colors", "Color Attributes"},
     {DT_TYPE_UV, "UV", 0, "UVs", "Transfer UV layers"},
 
-    RNA_ENUM_ITEM_HEADING("Face Data", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Face Data"), NULL),
     {DT_TYPE_SHARP_FACE, "SMOOTH", 0, "Smooth", "Transfer flat/smooth mark"},
     {DT_TYPE_FREESTYLE_FACE,
      "FREESTYLE_FACE",
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index c2967e30089..3a90d631c63 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -68,7 +68,7 @@ const EnumPropertyItem rna_enum_keyframe_handle_type_items[] = {
 const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = {
     /* Interpolation. */
     RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_ACTION, "Interpolation"),
-                          "Standard transitions between keyframes"),
+                          N_("Standard transitions between keyframes")),
     {BEZT_IPO_CONST,
      "CONSTANT",
      ICON_IPO_CONSTANT,
@@ -86,10 +86,9 @@ const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = {
      "Smooth interpolation between A and B, with some control over curve shape"},
 
     /* Easing. */
-    RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_ACTION,
-                                 "Easing (by strength)"),
-                          "Predefined inertial transitions, useful for motion graphics "
-                          "(from least to most \"dramatic\")"),
+    RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_ACTION, "Easing (by strength)"),
+                          N_("Predefined inertial transitions, useful for motion graphics "
+                             "(from least to most \"dramatic\")")),
     {BEZT_IPO_SINE,
      "SINE",
      ICON_IPO_SINE,
@@ -107,7 +106,7 @@ const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = {
      "Circular easing (strongest and most dynamic)"},
 
     RNA_ENUM_ITEM_HEADING(CTX_N_(BLT_I18NCONTEXT_ID_ACTION, "Dynamic Effects"),
-                          "Simple physics-inspired easing effects"),
+                          N_("Simple physics-inspired easing effects")),
     {BEZT_IPO_BACK, "BACK", ICON_IPO_BACK, "Back", "Cubic easing with overshoot and settle"},
     {BEZT_IPO_BOUNCE,
      "BOUNCE",
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index a84fbf13249..8e31c6cdfc7 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -88,7 +88,7 @@ const EnumPropertyItem rna_enum_space_type_items[] = {
     {SPACE_EMPTY, "EMPTY", ICON_NONE, "Empty", ""},
 
     /* General. */
-    RNA_ENUM_ITEM_HEADING("General", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("General"), NULL),
     {SPACE_VIEW3D,
      "VIEW_3D",
      ICON_VIEW3D,
@@ -108,7 +108,7 @@ const EnumPropertyItem rna_enum_space_type_items[] = {
     {SPACE_CLIP, "CLIP_EDITOR", ICON_TRACKER, "Movie Clip Editor", "Motion tracking tools"},
 
     /* Animation. */
-    RNA_ENUM_ITEM_HEADING("Animation", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Animation"), NULL),
 #if 0
     {SPACE_ACTION,
      "TIMELINE",
@@ -125,7 +125,7 @@ const EnumPropertyItem rna_enum_space_type_items[] = {
     {SPACE_NLA, "NLA_EDITOR", ICON_NLA, "Nonlinear Animation", "Combine and layer Actions"},
 
     /* Scripting. */
-    RNA_ENUM_ITEM_HEADING("Scripting", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Scripting"), NULL),
     {SPACE_TEXT,
      "TEXT_EDITOR",
      ICON_TEXT,
@@ -153,7 +153,7 @@ const EnumPropertyItem rna_enum_space_type_items[] = {
      "screen for general status information"},
 
     /* Data. */
-    RNA_ENUM_ITEM_HEADING("Data", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Data"), NULL),
     {SPACE_OUTLINER,
      "OUTLINER",
      ICON_OUTLINER,
@@ -435,31 +435,31 @@ static const EnumPropertyItem rna_enum_studio_light_items[] = {
 };
 
 static const EnumPropertyItem rna_enum_view3dshading_render_pass_type_items[] = {
-    RNA_ENUM_ITEM_HEADING("General", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("General"), NULL),
     {EEVEE_RENDER_PASS_COMBINED, "COMBINED", 0, "Combined", ""},
     {EEVEE_RENDER_PASS_EMIT, "EMISSION", 0, "Emission", ""},
     {EEVEE_RENDER_PASS_ENVIRONMENT, "ENVIRONMENT", 0, "Environment", ""},
     {EEVEE_RENDER_PASS_AO, "AO", 0, "Ambient Occlusion", ""},
     {EEVEE_RENDER_PASS_SHADOW, "SHADOW", 0, "Shadow", ""},
 
-    RNA_ENUM_ITEM_HEADING("Light", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Light"), NULL),
     {EEVEE_RENDER_PASS_DIFFUSE_LIGHT, "DIFFUSE_LIGHT", 0, "Diffuse Light", ""},
     {EEVEE_RENDER_PASS_DIFFUSE_COLOR, "DIFFUSE_COLOR", 0, "Diffuse Color", ""},
     {EEVEE_RENDER_PASS_SPECULAR_LIGHT, "SPECULAR_LIGHT", 0, "Specular Light", ""},
     {EEVEE_RENDER_PASS_SPECULAR_COLOR, "SPECULAR_COLOR", 0, "Specular Color", ""},
     {EEVEE_RENDER_PASS_VOLUME_LIGHT, "VOLUME_LIGHT", 0, "Volume Light", ""},
 
-    RNA_ENUM_ITEM_HEADING("Effects", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Effects"), NULL),
     {EEVEE_RENDER_PASS_BLOOM, "BLOOM", 0, "Bloom", ""},
 
-    RNA_ENUM_ITEM_HEADING("Data", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Data"), NULL),
     {EEVEE_RENDER_PASS_NORMAL, "NORMAL", 0, "Normal", ""},
     {EEVEE_RENDER_PASS_MIST, "MIST", 0, "Mist", ""},
     {EEVEE_RENDER_PASS_CRYPTOMATTE_OBJECT, "CryptoObject", 0, "CryptoObject", ""},
     {EEVEE_RENDER_PASS_CRYPTOMATTE_ASSET, "CryptoAsset", 0, "CryptoAsset", ""},
     {EEVEE_RENDER_PASS_CRYPTOMATTE_MATERIAL, "CryptoMaterial", 0, "CryptoMaterial", ""},
 
-    RNA_ENUM_ITEM_HEADING("Shader AOV", NULL),
+    RNA_ENUM_ITEM_HEADING(N_("Shader AOV"), NULL),
     {EEVEE_RENDER_PASS_AOV, "AOV", 0, "AOV", ""},
 
     {0, NULL, 0, NULL, NULL},



More information about the Bf-blender-cvs mailing list