diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 38e5f5719d4..64dc64cd525 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later from bpy.types import Panel +from bpy.app.translations import contexts as i18n_contexts class ObjectConstraintPanel: @@ -397,7 +398,7 @@ class ConstraintButtonsPanel: sub.prop(con, "invert_z", text="Z", toggle=True) row.label(icon='BLANK1') - layout.prop(con, "mix_mode", text="Mix") + layout.prop(con, "mix_mode", text="Mix", text_ctxt=i18n_contexts.constraint) self.space_template(layout, con) @@ -488,7 +489,7 @@ class ConstraintButtonsPanel: self.target_template(layout, con) layout.prop(con, "remove_target_shear") - layout.prop(con, "mix_mode", text="Mix") + layout.prop(con, "mix_mode", text="Mix", text_ctxt=i18n_contexts.constraint) self.space_template(layout, con) @@ -513,7 +514,7 @@ class ConstraintButtonsPanel: subsub.prop(con, "eval_time", text="") row.prop_decorator(con, "eval_time") - layout.prop(con, "mix_mode", text="Mix") + layout.prop(con, "mix_mode", text="Mix", text_ctxt=i18n_contexts.constraint) self.draw_influence(layout, con) @@ -1024,7 +1025,7 @@ class ConstraintButtonsSubPanel: col.prop(con, "to_min_z" + ext, text="Min") col.prop(con, "to_max_z" + ext, text="Max") - layout.prop(con, "mix_mode" + ext, text="Mix") + layout.prop(con, "mix_mode" + ext, text="Mix", text_ctxt=i18n_contexts.constraint) def draw_armature_bones(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index a7e9663d186..85313b14341 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -8,6 +8,8 @@ from bpy_extras import ( asset_utils, ) +from bpy.app.translations import contexts as i18n_contexts + class FILEBROWSER_HT_header(Header): bl_space_type = 'FILE_BROWSER' @@ -229,6 +231,7 @@ class FILEBROWSER_PT_bookmarks_volumes(Panel): bl_region_type = 'TOOLS' bl_category = "Bookmarks" bl_label = "Volumes" + bl_translation_context = i18n_contexts.editor_filebrowser @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index dfe73356bcd..8b08ec99d89 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1579,7 +1579,7 @@ class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, Panel): subsub.prop(strip, "shadow_color", text="") row.prop_decorator(strip, "shadow_color") - row = layout.row(align=True, heading="Box") + row = layout.row(align=True, heading="Box", heading_ctxt=i18n_contexts.id_sequence) row.use_property_decorate = False sub = row.row(align=True) sub.prop(strip, "use_box", text="") @@ -1996,7 +1996,7 @@ class SEQUENCER_PT_adjust_sound(SequencerButtonsPanel, Panel): split = col.split(factor=0.4) split.alignment = 'RIGHT' - split.label(text="Pan") + split.label(text="Pan", heading_ctxt=i18n_contexts.id_sound) split.prop(strip, "pan", text="") split.enabled = pan_enabled diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index cccb5389037..50629e70aae 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2246,6 +2246,7 @@ class VIEW3D_MT_camera_add(Menu): class VIEW3D_MT_volume_add(Menu): bl_idname = "VIEW3D_MT_volume_add" bl_label = "Volume" + bl_translation_context = i18n_contexts.id_id def draw(self, _context): layout = self.layout @@ -6293,7 +6294,7 @@ class VIEW3D_PT_overlay_guides(Panel): (view.region_3d.is_orthographic_side_view and not view.region_3d.is_perspective) ) row_el.active = grid_active - row.prop(overlay, "show_floor", text="Floor") + row.prop(overlay, "show_floor", text="Floor", text_ctxt=i18n_contexts.editor_view3d) if overlay.show_floor or overlay.show_ortho_grid: sub = col.row(align=True) diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index a4554c4e0bd..b85169fb03c 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -124,6 +124,7 @@ const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid /* Editors-types contexts. */ #define BLT_I18NCONTEXT_EDITOR_VIEW3D "View3D" +#define BLT_I18NCONTEXT_EDITOR_FILEBROWSER "File browser" /* Helper for bpy.app.i18n object... */ typedef struct { @@ -188,6 +189,7 @@ typedef struct { BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORKSPACE, "id_workspace"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_VIEW3D, "editor_view3d"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_FILEBROWSER, "editor_filebrowser"), \ { \ NULL, NULL, NULL \ } \ diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index 0bdee957af2..9f70a2dd72b 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -11,6 +11,8 @@ #include "BLI_rand.h" +#include "BLT_translation.h" + #include "BKE_object.h" #include "DEG_depsgraph_query.h" @@ -174,7 +176,7 @@ static void eevee_cache_finish(void *vedata) } if (g_data->queued_shaders_count > 0) { - SNPRINTF(ved->info, "Compiling Shaders (%d remaining)", g_data->queued_shaders_count); + SNPRINTF(ved->info, TIP_("Compiling Shaders (%d remaining)"), g_data->queued_shaders_count); } } diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 7874f06da47..d1b601e6f96 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -13,6 +13,8 @@ #include "BLI_math.h" +#include "BLT_translation.h" + #include "BKE_customdata.h" #include "RNA_define.h" @@ -530,6 +532,7 @@ static void rna_def_material_greasepencil(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "mix_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Mix", "Mix Factor"); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_GPENCIL); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); /* Stroke Mix factor */ @@ -537,6 +540,7 @@ static void rna_def_material_greasepencil(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "mix_stroke_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Mix", "Mix Stroke Factor"); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_GPENCIL); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); /* Texture angle */ diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 0639ad29db4..aa7b1ae01dc 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -6826,7 +6826,7 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna) prop = RNA_def_property(srna, "mix_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_range(prop, 0.0, 1.0); RNA_def_property_ui_text( - prop, "Mix Factor", "How much of generated normals to mix with exiting ones"); + prop, "Mix Factor", "How much of generated normals to mix with existing ones"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "mix_limit", PROP_FLOAT, PROP_ANGLE); diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 3d8b5159323..b53b055cda8 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -954,7 +954,7 @@ static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "NlaStrips"); srna = RNA_def_struct(brna, "NlaStrips", NULL); RNA_def_struct_sdna(srna, "NlaTrack"); - RNA_def_struct_ui_text(srna, "Nla Strips", "Collection of Nla Strips"); + RNA_def_struct_ui_text(srna, "NLA Strips", "Collection of NLA Strips"); func = RNA_def_function(srna, "new", "rna_NlaStrip_new"); RNA_def_function_flag(func, @@ -994,7 +994,7 @@ static void rna_def_nlatrack(BlenderRNA *brna) srna = RNA_def_struct(brna, "NlaTrack", NULL); RNA_def_struct_ui_text( - srna, "NLA Track", "A animation layer containing Actions referenced as NLA strips"); + srna, "NLA Track", "An animation layer containing Actions referenced as NLA strips"); RNA_def_struct_ui_icon(srna, ICON_NLA); /* strips collection */ diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index e007457297e..7ba3971b4ea 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4968,6 +4968,7 @@ static void def_float_to_int(StructRNA *srna) RNA_def_property_enum_items(prop, rna_enum_node_float_to_int_items); RNA_def_property_ui_text( prop, "Rounding Mode", "Method used to convert the float to an integer"); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_NODETREE); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -4979,6 +4980,7 @@ static void def_vector_math(StructRNA *srna) RNA_def_property_enum_sdna(prop, NULL, "custom1"); RNA_def_property_enum_items(prop, rna_enum_node_vec_math_items); RNA_def_property_ui_text(prop, "Operation", ""); + RNA_def_struct_translation_context(srna, BLT_I18NCONTEXT_ID_NODETREE); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNode_socket_update"); } diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 868fc98db40..7149ae7bf64 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -2840,6 +2840,7 @@ static void rna_def_sound(BlenderRNA *brna) RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, -2, 2, 1, 2); RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)"); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); RNA_def_property_float_funcs(prop, NULL, NULL, "rna_Sequence_pan_range"); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_audio_update"); @@ -3223,6 +3224,7 @@ static void rna_def_text(StructRNA *srna) prop = RNA_def_property(srna, "use_box", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_TEXT_BOX); RNA_def_property_ui_text(prop, "Box", "Display colored box behind text"); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SEQUENCE); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update"); prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 38625c7416a..7bdbfe75684 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -5934,7 +5934,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) /* Overlay settings. */ prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_OVERLAY); - RNA_def_property_ui_text(prop, "Show Overlay", ""); + RNA_def_property_ui_text(prop, "Show Overlays", ""); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); prop = RNA_def_property(srna, "preview_overlay", PROP_POINTER, PROP_NONE);