diff --git a/lib/linux_x64 b/lib/linux_x64 index 9897062edb2..3abcca1aa43 160000 --- a/lib/linux_x64 +++ b/lib/linux_x64 @@ -1 +1 @@ -Subproject commit 9897062edb26dc1889eacb09d9022a76e7906afb +Subproject commit 3abcca1aa43fe29f21cdf442d0cf412357cf4d25 diff --git a/scripts/addons_core/rigify/operators/action_layers.py b/scripts/addons_core/rigify/operators/action_layers.py index 1df2a76ca89..d17d5710a70 100644 --- a/scripts/addons_core/rigify/operators/action_layers.py +++ b/scripts/addons_core/rigify/operators/action_layers.py @@ -347,7 +347,7 @@ class RIGIFY_OT_jump_to_action_slot(Operator): self.report({'ERROR'}, "Failed to find Action Slot.") return {'CANCELLED'} - self.report({'INFO'}, f'Set active action set-up index to {i}.') + self.report({'INFO'}, rpt_("Set active action set-up index to {}.").format(i)) return {'FINISHED'} diff --git a/scripts/addons_core/viewport_vr_preview/gui.py b/scripts/addons_core/viewport_vr_preview/gui.py index ab90677c95e..51f38d67d63 100644 --- a/scripts/addons_core/viewport_vr_preview/gui.py +++ b/scripts/addons_core/viewport_vr_preview/gui.py @@ -10,6 +10,7 @@ else: import bpy from bpy.app.translations import ( + pgettext_n as n_, pgettext_iface as iface_, contexts as i18n_contexts, ) @@ -249,9 +250,9 @@ class VIEW3D_PT_vr_info(bpy.types.Panel): def draw(self, context): import platform layout = self.layout - missing_support_string = "Built without VR/OpenXR features" + missing_support_string = n_("Built without VR/OpenXR features") if platform.system() == "Darwin": - missing_support_string = "VR is not supported on macOS at the moment" + missing_support_string = n_("VR is not supported on macOS at the moment") layout.label(icon='ERROR', text=missing_support_string) diff --git a/scripts/modules/_bpy_types.py b/scripts/modules/_bpy_types.py index 7f6442d7e38..609392427e1 100644 --- a/scripts/modules/_bpy_types.py +++ b/scripts/modules/_bpy_types.py @@ -1209,6 +1209,7 @@ class Menu(_StructRNA, _GenericUI, metaclass=_RNAMeta): display_name=None, add_operator=None, add_operator_props=None, + translate=True, ): """ Populate a menu from a list of paths. @@ -1270,7 +1271,7 @@ class Menu(_StructRNA, _GenericUI, metaclass=_RNAMeta): name = display_name(filepath) if display_name else bpy.path.display_name(f) props = row.operator( operator, - text=iface_(name), + text=(iface_(name) if translate else name), translate=False, ) diff --git a/scripts/startup/bl_ui/space_text.py b/scripts/startup/bl_ui/space_text.py index 0078b8f7103..7604e1a94d7 100644 --- a/scripts/startup/bl_ui/space_text.py +++ b/scripts/startup/bl_ui/space_text.py @@ -289,6 +289,7 @@ class TEXT_MT_templates_py(Menu): "text.open", props_default={"internal": True}, filter_ext=lambda ext: (ext.lower() == ".py"), + translate=False, ) diff --git a/source/blender/editors/animation/anim_asset_ops.cc b/source/blender/editors/animation/anim_asset_ops.cc index aa7c4aa3d46..9f8b93b39a1 100644 --- a/source/blender/editors/animation/anim_asset_ops.cc +++ b/source/blender/editors/animation/anim_asset_ops.cc @@ -708,7 +708,7 @@ static std::string pose_asset_modify_description(bContext * /* C */, PointerRNA *ptr) { const int mode = RNA_enum_get(ptr, "mode"); - return std::string(prop_asset_overwrite_modes[mode].description); + return TIP_(std::string(prop_asset_overwrite_modes[mode].description)); } /* Calling it overwrite instead of save because we aren't actually saving an opened asset. */ diff --git a/source/blender/editors/geometry/node_group_operator.cc b/source/blender/editors/geometry/node_group_operator.cc index 0b3fe1983c1..79aba63660c 100644 --- a/source/blender/editors/geometry/node_group_operator.cc +++ b/source/blender/editors/geometry/node_group_operator.cc @@ -1486,7 +1486,7 @@ static void catalog_assets_draw_unassigned(const bContext *C, Menu *menu) MenuType node_group_operator_assets_menu_unassigned() { MenuType type{}; - STRNCPY_UTF8(type.label, "Unassigned Node Tools"); + STRNCPY_UTF8(type.label, N_("Unassigned Node Tools")); STRNCPY_UTF8(type.idname, "GEO_MT_node_operator_unassigned"); type.poll = asset_menu_poll; type.draw = catalog_assets_draw_unassigned; diff --git a/source/blender/editors/space_node/node_sync_sockets.cc b/source/blender/editors/space_node/node_sync_sockets.cc index 6d08070c1bd..f84991b07f7 100644 --- a/source/blender/editors/space_node/node_sync_sockets.cc +++ b/source/blender/editors/space_node/node_sync_sockets.cc @@ -18,6 +18,8 @@ #include "BKE_node_runtime.hh" #include "BKE_node_tree_update.hh" +#include "BLT_translation.hh" + #include "ED_node.hh" #include "ED_screen.hh" @@ -80,12 +82,12 @@ static std::string sockets_sync_get_description(bContext *C, wmOperatorType *ot, { Vector nodes_to_sync = get_nodes_to_sync(*C, ptr); if (nodes_to_sync.size() != 1) { - return ot->description; + return TIP_(ot->description); } const bNode &node = *nodes_to_sync.first(); std::string description = nodes::sync_node_description_get(*C, node); if (description.empty()) { - return ot->description; + return TIP_(ot->description); } return description; } diff --git a/source/blender/makesrna/intern/rna_scene.cc b/source/blender/makesrna/intern/rna_scene.cc index 85ddc7f4f93..ea986f64c7d 100644 --- a/source/blender/makesrna/intern/rna_scene.cc +++ b/source/blender/makesrna/intern/rna_scene.cc @@ -8767,6 +8767,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_enum_items(prop, time_jump_unit_items); RNA_def_property_ui_text( prop, "Time Jump Unit", "Which unit to use for time jumps in the timeline"); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UNIT); RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, nullptr); prop = RNA_def_property(srna, "time_jump_delta", PROP_FLOAT, PROP_TIME); diff --git a/source/blender/makesrna/intern/rna_sequencer.cc b/source/blender/makesrna/intern/rna_sequencer.cc index 58018d6fd4c..1c62112584b 100644 --- a/source/blender/makesrna/intern/rna_sequencer.cc +++ b/source/blender/makesrna/intern/rna_sequencer.cc @@ -2442,6 +2442,7 @@ static void rna_def_strip(BlenderRNA *brna) RNA_def_property_enum_default(prop, STRIP_TYPE_ALPHAOVER); 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_preprocessed_update"); diff --git a/source/blender/nodes/composite/nodes/node_composite_dilate.cc b/source/blender/nodes/composite/nodes/node_composite_dilate.cc index abcdd0fec27..abdea7ec2c6 100644 --- a/source/blender/nodes/composite/nodes/node_composite_dilate.cc +++ b/source/blender/nodes/composite/nodes/node_composite_dilate.cc @@ -59,7 +59,8 @@ static void cmp_node_dilate_declare(NodeDeclarationBuilder &b) .default_value(PROP_SMOOTH) .static_items(rna_enum_proportional_falloff_curve_only_items) .optional_label() - .usage_by_menu("Type", CMP_NODE_DILATE_ERODE_DISTANCE_FEATHER); + .usage_by_menu("Type", CMP_NODE_DILATE_ERODE_DISTANCE_FEATHER) + .translation_context(BLT_I18NCONTEXT_ID_CURVE_LEGACY); b.add_output("Mask").structure_type(StructureType::Dynamic); } diff --git a/source/blender/nodes/composite/nodes/node_composite_keying.cc b/source/blender/nodes/composite/nodes/node_composite_keying.cc index 97b1133bdd9..775838ee36e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_keying.cc +++ b/source/blender/nodes/composite/nodes/node_composite_keying.cc @@ -137,7 +137,8 @@ static void cmp_node_keying_declare(NodeDeclarationBuilder &b) postprocess_panel.add_input("Feather Falloff") .default_value(PROP_SMOOTH) .static_items(rna_enum_proportional_falloff_curve_only_items) - .optional_label(); + .optional_label() + .translation_context(BLT_I18NCONTEXT_ID_CURVE_LEGACY); PanelDeclarationBuilder &despill_panel = b.add_panel("Despill").default_closed(true); despill_panel.add_input("Strength", "Despill Strength")