From 56d52a707014e0f8efa9c137bfb5f9186cc99fb1 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Thu, 4 Sep 2025 14:05:06 +0200 Subject: [PATCH] I18n: Disambiguate "Value" in colors In some languages, a color value (as in Hue, Saturation, Value), is not the same as a numeric or other variable value. Pull Request: https://projects.blender.org/blender/blender/pulls/145839 --- scripts/startup/bl_ui/properties_paint_common.py | 2 +- .../editors/interface/regions/interface_region_color_picker.cc | 3 ++- .../interface/templates/interface_template_color_picker.cc | 2 +- source/blender/makesrna/intern/rna_sequencer.cc | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/startup/bl_ui/properties_paint_common.py b/scripts/startup/bl_ui/properties_paint_common.py index af9ed73f24b..98aa02ff808 100644 --- a/scripts/startup/bl_ui/properties_paint_common.py +++ b/scripts/startup/bl_ui/properties_paint_common.py @@ -1208,7 +1208,7 @@ def color_jitter_panel(layout, context, brush): row = col.row(align=True) row.enabled = prop_owner.use_color_jitter - row.prop(prop_owner, "value_jitter", slider=True, text="Value") + row.prop(prop_owner, "value_jitter", slider=True, text="Value", text_context=i18n_contexts.color) row.prop(prop_owner, "use_stroke_random_val", text="", icon='GP_SELECT_STROKES') row.prop(prop_owner, "use_random_press_val", text="", icon='STYLUS_PRESSURE') diff --git a/source/blender/editors/interface/regions/interface_region_color_picker.cc b/source/blender/editors/interface/regions/interface_region_color_picker.cc index 447c0838411..3848f08ad03 100644 --- a/source/blender/editors/interface/regions/interface_region_color_picker.cc +++ b/source/blender/editors/interface/regions/interface_region_color_picker.cc @@ -797,7 +797,8 @@ static void ui_block_colorpicker(const bContext * /*C*/, add_hsv_slider(IFACE_("Lightness:"), TIP_("Lightness"), 2, yco -= UI_UNIT_Y); } else { - add_hsv_slider(IFACE_("Value:"), TIP_("Value"), 2, yco -= UI_UNIT_Y); + add_hsv_slider( + IFACE_("Value:"), CTX_TIP_(BLT_I18NCONTEXT_COLOR, "Value"), 2, yco -= UI_UNIT_Y); } if (cpicker->has_alpha) { diff --git a/source/blender/editors/interface/templates/interface_template_color_picker.cc b/source/blender/editors/interface/templates/interface_template_color_picker.cc index f18efcd65a3..4497bcbaeb7 100644 --- a/source/blender/editors/interface/templates/interface_template_color_picker.cc +++ b/source/blender/editors/interface/templates/interface_template_color_picker.cc @@ -227,7 +227,7 @@ static void ui_template_palette_menu(bContext * /*C*/, uiLayout *layout, void * op_ptr = row->op("PALETTE_OT_sort", IFACE_("Saturation"), ICON_NONE); RNA_enum_set(&op_ptr, "type", 2); row = &layout->row(false); - op_ptr = row->op("PALETTE_OT_sort", IFACE_("Value"), ICON_NONE); + op_ptr = row->op("PALETTE_OT_sort", CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "Value"), ICON_NONE); RNA_enum_set(&op_ptr, "type", 3); row = &layout->row(false); op_ptr = row->op("PALETTE_OT_sort", IFACE_("Luminance"), ICON_NONE); diff --git a/source/blender/makesrna/intern/rna_sequencer.cc b/source/blender/makesrna/intern/rna_sequencer.cc index fd77547f1a5..831d6ca383d 100644 --- a/source/blender/makesrna/intern/rna_sequencer.cc +++ b/source/blender/makesrna/intern/rna_sequencer.cc @@ -3698,6 +3698,7 @@ static void rna_def_color_mix(StructRNA *srna) RNA_def_property_enum_items(prop, blend_color_items); RNA_def_property_ui_text( prop, "Blending Mode", "Method for controlling how the strip combines with other strips"); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_COLOR); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update"); prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_FACTOR);