diff --git a/intern/cycles/blender/addon/osl.py b/intern/cycles/blender/addon/osl.py index 7df703b78e6..df206eeaace 100644 --- a/intern/cycles/blender/addon/osl.py +++ b/intern/cycles/blender/addon/osl.py @@ -7,7 +7,7 @@ from __future__ import annotations import bpy import _cycles -from bpy.app.translations import pgettext_tip as tip_ +from bpy.app.translations import pgettext_rpt as rpt_ def osl_compile(input_path, report): @@ -307,7 +307,7 @@ def update_script_node(node, report): sockets.remove(sockets[identifier]) else: ok = False - report({'ERROR'}, tip_("OSL query failed to open %s") % oso_path) + report({'ERROR'}, rpt_("OSL query failed to open %s") % oso_path) else: report({'ERROR'}, "OSL script compilation failed, see console for errors") @@ -359,7 +359,7 @@ def update_custom_camera_shader(cam, report): del custom_props[prop] else: ok = False - report({'ERROR'}, tip_("OSL query failed to open %s") % oso_path) + report({'ERROR'}, rpt_("OSL query failed to open %s") % oso_path) else: report({'ERROR'}, "Custom Camera shader compilation failed, see console for errors") diff --git a/scripts/addons_core/io_scene_fbx/import_fbx.py b/scripts/addons_core/io_scene_fbx/import_fbx.py index b48a2456e75..3efe707d86c 100644 --- a/scripts/addons_core/io_scene_fbx/import_fbx.py +++ b/scripts/addons_core/io_scene_fbx/import_fbx.py @@ -15,7 +15,7 @@ if "bpy" in locals(): importlib.reload(fbx_utils) import bpy -from bpy.app.translations import pgettext_tip as tip_ +from bpy.app.translations import pgettext_rpt as rpt_ from mathutils import Matrix, Euler, Vector, Quaternion from bpy_extras import anim_utils @@ -3090,7 +3090,7 @@ def load(operator, context, filepath="", is_ascii = False if is_ascii: - operator.report({'ERROR'}, tip_("ASCII FBX files are not supported %r") % filepath) + operator.report({'ERROR'}, rpt_("ASCII FBX files are not supported %r") % filepath) return {'CANCELLED'} del is_ascii # End ascii detection. @@ -3101,11 +3101,11 @@ def load(operator, context, filepath="", import traceback traceback.print_exc() - operator.report({'ERROR'}, tip_("Couldn't open file %r (%s)") % (filepath, e)) + operator.report({'ERROR'}, rpt_("Couldn't open file %r (%s)") % (filepath, e)) return {'CANCELLED'} if version < 7100: - operator.report({'ERROR'}, tip_("Version %r unsupported, must be %r or later") % (version, 7100)) + operator.report({'ERROR'}, rpt_("Version %r unsupported, must be %r or later") % (version, 7100)) return {'CANCELLED'} print("FBX version: %r" % version) @@ -3140,7 +3140,7 @@ def load(operator, context, filepath="", fbx_settings = elem_find_first(elem_root, b'GlobalSettings') fbx_settings_props = elem_find_first(fbx_settings, b'Properties70') if fbx_settings is None or fbx_settings_props is None: - operator.report({'ERROR'}, tip_("No 'GlobalSettings' found in file %r") % filepath) + operator.report({'ERROR'}, rpt_("No 'GlobalSettings' found in file %r") % filepath) return {'CANCELLED'} # FBX default base unit seems to be the centimeter, while raw Blender Unit is equivalent to the meter... @@ -3207,10 +3207,10 @@ def load(operator, context, filepath="", fbx_connections = elem_find_first(elem_root, b'Connections') if fbx_nodes is None: - operator.report({'ERROR'}, tip_("No 'Objects' found in file %r") % filepath) + operator.report({'ERROR'}, rpt_("No 'Objects' found in file %r") % filepath) return {'CANCELLED'} if fbx_connections is None: - operator.report({'ERROR'}, tip_("No 'Connections' found in file %r") % filepath) + operator.report({'ERROR'}, rpt_("No 'Connections' found in file %r") % filepath) return {'CANCELLED'} # ---- diff --git a/scripts/addons_core/node_wrangler/preferences.py b/scripts/addons_core/node_wrangler/preferences.py index ce6c5a622ba..f4a50909677 100644 --- a/scripts/addons_core/node_wrangler/preferences.py +++ b/scripts/addons_core/node_wrangler/preferences.py @@ -139,10 +139,8 @@ class NWNodeWrangler(bpy.types.AddonPreferences): box = layout.box() col = box.column(align=True) - hotkey_button_name = "Show Hotkey List" - if self.show_hotkey_list: - hotkey_button_name = "Hide Hotkey List" - col.prop(self, "show_hotkey_list", text=hotkey_button_name, toggle=True) + hotkey_button_name = iface_("Show Hotkey List") if self.show_hotkey_list else iface_("Hide Hotkey List") + col.prop(self, "show_hotkey_list", text=hotkey_button_name, translate=False, toggle=True) if self.show_hotkey_list: col.prop(self, "hotkey_list_filter", icon="VIEWZOOM") col.separator() diff --git a/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/scripts/modules/bl_i18n_utils/bl_extract_messages.py index dd79b165aac..9a07914c7c6 100644 --- a/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -677,6 +677,13 @@ def dump_py_messages_from_files(msgs, reports, files, settings): ("add_repeat_zone", 1), ("add_foreach_geometry_element_zone", 1), ("add_closure_zone", 1), + ("node_operator", 4), + ("node_operator_with_outputs", 6), + ("simulation_zone", 2), + ("repeat_zone", 2), + ("for_each_element_zone", 2), + ("closure_zone", 2), + ): func_translate_args[func_id] = {"label": (arg_pos, {})} # print(func_translate_args) @@ -1080,6 +1087,10 @@ def dump_asset_messages(msgs, reports, settings): socket_data = asset_data.setdefault("sockets", []) socket_data.append((interface.name, interface.description)) assets.append(asset_data) + for node in asset.nodes: + if node.bl_idname == "GeometryNodeWarning" and node.inputs['Message'].default_value: + warning_data = asset_data.setdefault("warnings", []) + warning_data.append(node.inputs['Message'].default_value) for asset_file in sorted(asset_files): for asset in sorted(asset_files[asset_file], key=lambda a: a["name"]): @@ -1096,7 +1107,7 @@ def dump_asset_messages(msgs, reports, settings): ) if "sockets" in asset: - for socket_name, socket_description in asset["sockets"]: + for socket_name, socket_description in sorted(asset["sockets"]): msgsrc = f"Socket name from node group {name}, file {asset_file}" process_msg( msgs, settings.DEFAULT_CONTEXT, socket_name, msgsrc, @@ -1107,6 +1118,13 @@ def dump_asset_messages(msgs, reports, settings): msgs, settings.DEFAULT_CONTEXT, socket_description, msgsrc, reports, None, settings, ) + if "warnings" in asset: + for warning in sorted(asset["warnings"]): + msgsrc = f"Warning from node group {name}, file {asset_file}" + process_msg( + msgs, settings.DEFAULT_CONTEXT, warning, msgsrc, + reports, None, settings, + ) def dump_addon_bl_info(msgs, reports, module, settings): diff --git a/scripts/modules/bl_i18n_utils/settings.py b/scripts/modules/bl_i18n_utils/settings.py index 236fab5a36c..693c8b43254 100644 --- a/scripts/modules/bl_i18n_utils/settings.py +++ b/scripts/modules/bl_i18n_utils/settings.py @@ -256,7 +256,7 @@ PYGETTEXT_KEYWORDS = (() + tuple(("{}\\((?:[^\"',]+,){{1,2}}\\s*" + _msg_re + r"\s*(?:\)|,)").format(it) for it in ("BKE_report", "BKE_reportf", "BKE_reports_prepend", "BKE_reports_prependf", - "CTX_wm_operator_poll_msg_set", "WM_report", "WM_reportf", + "CTX_wm_operator_poll_msg_set", "WM_global_report", "WM_global_reportf", "UI_but_disable")) + # bmesh operator errors diff --git a/scripts/startup/bl_operators/node.py b/scripts/startup/bl_operators/node.py index 082ba637d1d..7f98003c9c6 100644 --- a/scripts/startup/bl_operators/node.py +++ b/scripts/startup/bl_operators/node.py @@ -26,6 +26,7 @@ from bpy.app.translations import ( pgettext_tip as tip_, pgettext_data as data_, pgettext_rpt as rpt_, + pgettext_n as n_, ) @@ -602,16 +603,16 @@ class ZoneOperator: _zone_tooltips = { "GeometryNodeSimulationInput": ( - "Simulate the execution of nodes across a time span" + n_("Simulate the execution of nodes across a time span") ), "GeometryNodeRepeatInput": ( - "Execute nodes with a dynamic number of repetitions" + n_("Execute nodes with a dynamic number of repetitions") ), "GeometryNodeForeachGeometryElementInput": ( - "Perform operations separately for each geometry element (e.g. vertices, edges, etc.)" + n_("Perform operations separately for each geometry element (e.g. vertices, edges, etc.)") ), "NodeClosureInput": ( - "Wrap nodes inside a closure that can be executed at a different part of the node-tree" + n_("Wrap nodes inside a closure that can be executed at a different part of the node-tree") ), } diff --git a/scripts/startup/bl_ui/node_add_menu.py b/scripts/startup/bl_ui/node_add_menu.py index 7498877164e..5f9cea6ab54 100644 --- a/scripts/startup/bl_ui/node_add_menu.py +++ b/scripts/startup/bl_ui/node_add_menu.py @@ -350,7 +350,7 @@ class NodeMenu(Menu): @classmethod def simulation_zone(cls, layout, label): - props = layout.operator(cls.zone_operator_id, text=label) + props = layout.operator(cls.zone_operator_id, text=iface_(label), translate=False) props.input_node_type = "GeometryNodeSimulationInput" props.output_node_type = "GeometryNodeSimulationOutput" props.add_default_geometry_link = True @@ -362,7 +362,7 @@ class NodeMenu(Menu): @classmethod def repeat_zone(cls, layout, label): - props = layout.operator(cls.zone_operator_id, text=label) + props = layout.operator(cls.zone_operator_id, text=iface_(label), translate=False) props.input_node_type = "GeometryNodeRepeatInput" props.output_node_type = "GeometryNodeRepeatOutput" props.add_default_geometry_link = True @@ -374,7 +374,7 @@ class NodeMenu(Menu): @classmethod def for_each_element_zone(cls, layout, label): - props = layout.operator(cls.zone_operator_id, text=label) + props = layout.operator(cls.zone_operator_id, text=iface_(label), translate=False) props.input_node_type = "GeometryNodeForeachGeometryElementInput" props.output_node_type = "GeometryNodeForeachGeometryElementOutput" props.add_default_geometry_link = False @@ -386,7 +386,7 @@ class NodeMenu(Menu): @classmethod def closure_zone(cls, layout, label): - props = layout.operator(cls.zone_operator_id, text=label) + props = layout.operator(cls.zone_operator_id, text=iface_(label), translate=False) props.input_node_type = "NodeClosureInput" props.output_node_type = "NodeClosureOutput" props.add_default_geometry_link = False diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc index c139b3632ea..18cd6984e8f 100644 --- a/source/blender/blenloader/intern/versioning_defaults.cc +++ b/source/blender/blenloader/intern/versioning_defaults.cc @@ -77,9 +77,12 @@ static bool blo_is_builtin_template(const char *app_template) { /* For all builtin templates shipped with Blender. */ - return ( - !app_template || - STR_ELEM(app_template, N_("2D_Animation"), N_("Sculpting"), N_("VFX"), N_("Video_Editing"))); + return (!app_template || STR_ELEM(app_template, + N_("2D_Animation"), + N_("Storyboarding"), + N_("Sculpting"), + N_("VFX"), + N_("Video_Editing"))); } static void blo_update_defaults_screen(bScreen *screen, 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 02db7cc903b..a128b083bfc 100644 --- a/source/blender/editors/interface/regions/interface_region_color_picker.cc +++ b/source/blender/editors/interface/regions/interface_region_color_picker.cc @@ -965,7 +965,7 @@ static void ui_block_colorpicker(const bContext * /*C*/, bt = uiDefBut(block, ButType::Text, 0, - IFACE_(""), + "", label_width, yco, text_width, diff --git a/source/blender/editors/object/object_edit.cc b/source/blender/editors/object/object_edit.cc index 6d6fb388738..1cb46b9c085 100644 --- a/source/blender/editors/object/object_edit.cc +++ b/source/blender/editors/object/object_edit.cc @@ -2444,7 +2444,9 @@ static void move_to_collection_menu_draw(const bContext *C, Menu *menu) Scene *scene = CTX_data_scene(C); if (layout.operator_context() == wm::OpCallContext::ExecRegionWin) { layout.operator_context_set(wm::OpCallContext::InvokeRegionWin); - PointerRNA op_ptr = layout.op("WM_OT_search_single_menu", "Search...", ICON_VIEWZOOM); + PointerRNA op_ptr = layout.op("WM_OT_search_single_menu", + CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Search..."), + ICON_VIEWZOOM); RNA_string_set(&op_ptr, "menu_idname", menu->type->idname); layout.separator(); } diff --git a/source/blender/editors/physics/physics_fluid.cc b/source/blender/editors/physics/physics_fluid.cc index 0a5e8f90ac4..16ea56b34a6 100644 --- a/source/blender/editors/physics/physics_fluid.cc +++ b/source/blender/editors/physics/physics_fluid.cc @@ -336,17 +336,24 @@ static void fluid_bake_endjob(void *customdata) * Report for ended bake and how long it took. */ if (job->success) { /* Show bake info. */ - WM_global_reportf( - RPT_INFO, "Fluid: %s complete (%.2fs)", job->name, BLI_time_now_seconds() - job->start); + WM_global_reportf(RPT_INFO, + "Fluid: %s complete (%.2fs)", + CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, job->name), + BLI_time_now_seconds() - job->start); } else { if (fds->error[0] != '\0') { - WM_global_reportf( - RPT_ERROR, "Fluid: %s failed at frame %d: %s", job->name, *job->pause_frame, fds->error); + WM_global_reportf(RPT_ERROR, + "Fluid: %s failed at frame %d: %s", + CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, job->name), + *job->pause_frame, + fds->error); } else { /* User canceled the bake. */ - WM_global_reportf( - RPT_WARNING, "Fluid: %s canceled at frame %d!", job->name, *job->pause_frame); + WM_global_reportf(RPT_WARNING, + "Fluid: %s canceled at frame %d!", + CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, job->name), + *job->pause_frame); } } } @@ -445,17 +452,24 @@ static void fluid_free_endjob(void *customdata) * Report for ended free job and how long it took */ if (job->success) { /* Show free job info */ - WM_global_reportf( - RPT_INFO, "Fluid: %s complete (%.2fs)", job->name, BLI_time_now_seconds() - job->start); + WM_global_reportf(RPT_INFO, + "Fluid: %s complete (%.2fs)", + CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, job->name), + BLI_time_now_seconds() - job->start); } else { if (fds->error[0] != '\0') { - WM_global_reportf( - RPT_ERROR, "Fluid: %s failed at frame %d: %s", job->name, *job->pause_frame, fds->error); + WM_global_reportf(RPT_ERROR, + "Fluid: %s failed at frame %d: %s", + CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, job->name), + *job->pause_frame, + fds->error); } else { /* User canceled the free job */ - WM_global_reportf( - RPT_WARNING, "Fluid: %s canceled at frame %d!", job->name, *job->pause_frame); + WM_global_reportf(RPT_WARNING, + "Fluid: %s canceled at frame %d!", + CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, job->name), + *job->pause_frame); } } } diff --git a/source/blender/editors/space_image/image_buttons.cc b/source/blender/editors/space_image/image_buttons.cc index bb6a7640ed3..cc720b51e4e 100644 --- a/source/blender/editors/space_image/image_buttons.cc +++ b/source/blender/editors/space_image/image_buttons.cc @@ -867,8 +867,8 @@ void uiTemplateImage(uiLayout *layout, col->use_property_split_set(true); uiLayout *sub = &col->column(true); - sub->prop(&imaptr, "generated_width", UI_ITEM_NONE, "X", ICON_NONE); - sub->prop(&imaptr, "generated_height", UI_ITEM_NONE, "Y", ICON_NONE); + sub->prop(&imaptr, "generated_width", UI_ITEM_NONE, IFACE_("X"), ICON_NONE); + sub->prop(&imaptr, "generated_height", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); col->prop(&imaptr, "use_generated_float", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/editors/space_view3d/view3d_buttons.cc b/source/blender/editors/space_view3d/view3d_buttons.cc index 3aa4d4c4e1e..743d338169f 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.cc +++ b/source/blender/editors/space_view3d/view3d_buttons.cc @@ -2056,24 +2056,24 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob) break; case MB_CUBE: col->label(IFACE_("Size:"), ICON_NONE); - col->prop(&ptr, "size_x", UI_ITEM_NONE, "X", ICON_NONE); - col->prop(&ptr, "size_y", UI_ITEM_NONE, "Y", ICON_NONE); - col->prop(&ptr, "size_z", UI_ITEM_NONE, "Z", ICON_NONE); + col->prop(&ptr, "size_x", UI_ITEM_NONE, IFACE_("X"), ICON_NONE); + col->prop(&ptr, "size_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); + col->prop(&ptr, "size_z", UI_ITEM_NONE, IFACE_("Z"), ICON_NONE); break; case MB_TUBE: col->label(IFACE_("Size:"), ICON_NONE); - col->prop(&ptr, "size_x", UI_ITEM_NONE, "X", ICON_NONE); + col->prop(&ptr, "size_x", UI_ITEM_NONE, IFACE_("X"), ICON_NONE); break; case MB_PLANE: col->label(IFACE_("Size:"), ICON_NONE); - col->prop(&ptr, "size_x", UI_ITEM_NONE, "X", ICON_NONE); - col->prop(&ptr, "size_y", UI_ITEM_NONE, "Y", ICON_NONE); + col->prop(&ptr, "size_x", UI_ITEM_NONE, IFACE_("X"), ICON_NONE); + col->prop(&ptr, "size_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); break; case MB_ELIPSOID: col->label(IFACE_("Size:"), ICON_NONE); - col->prop(&ptr, "size_x", UI_ITEM_NONE, "X", ICON_NONE); - col->prop(&ptr, "size_y", UI_ITEM_NONE, "Y", ICON_NONE); - col->prop(&ptr, "size_z", UI_ITEM_NONE, "Z", ICON_NONE); + col->prop(&ptr, "size_x", UI_ITEM_NONE, IFACE_("X"), ICON_NONE); + col->prop(&ptr, "size_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); + col->prop(&ptr, "size_z", UI_ITEM_NONE, IFACE_("Z"), ICON_NONE); break; } } diff --git a/source/blender/makesrna/intern/rna_space.cc b/source/blender/makesrna/intern/rna_space.cc index c15a114d3f0..446d526e6c7 100644 --- a/source/blender/makesrna/intern/rna_space.cc +++ b/source/blender/makesrna/intern/rna_space.cc @@ -2678,13 +2678,13 @@ static const EnumPropertyItem *rna_SpaceNodeEditor_node_tree_sub_type_itemf( {SNODE_GEOMETRY_MODIFIER, "MODIFIER", ICON_MODIFIER_DATA, - "Modifier", - "Edit node group from active object's active modifier"}, + N_("Modifier"), + N_("Edit node group from active object's active modifier")}, {SNODE_GEOMETRY_TOOL, "TOOL", ICON_TOOL_SETTINGS, - "Tool", - "Edit any geometry node group for use as an operator"}, + N_("Tool"), + N_("Edit any geometry node group for use as an operator")}, {0, nullptr, 0, nullptr, nullptr}, }; @@ -2692,13 +2692,13 @@ static const EnumPropertyItem *rna_SpaceNodeEditor_node_tree_sub_type_itemf( {SNODE_COMPOSITOR_SCENE, "SCENE", ICON_SCENE_DATA, - "Scene", - "Edit compositing node group for the current scene"}, + N_("Scene"), + N_("Edit compositing node group for the current scene")}, {SNODE_COMPOSITOR_SEQUENCER, "SEQUENCER", ICON_SEQUENCE, - "Sequencer", - "Edit compositing node group for Sequencer strip modifiers"}, + N_("Sequencer"), + N_("Edit compositing node group for Sequencer strip modifiers")}, {0, nullptr, 0, nullptr, nullptr}, }; @@ -8117,7 +8117,6 @@ static void rna_def_space_node(BlenderRNA *brna) RNA_def_property_enum_funcs( prop, nullptr, nullptr, "rna_SpaceNodeEditor_node_tree_sub_type_itemf"); RNA_def_property_ui_text(prop, "Node Tree Sub-Type", ""); - RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_ID); RNA_def_property_update( prop, NC_SPACE | ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_sub_type_update"); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_util.cc b/source/blender/modifiers/intern/MOD_grease_pencil_util.cc index f52ef07780c..42a81795705 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_util.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_util.cc @@ -111,7 +111,7 @@ void draw_layer_filter_settings(const bContext * /*C*/, uiLayout *layout, Pointe "tree_node_filter", &obj_data_ptr, "layer_groups", - "Group", + IFACE_("Group"), ICON_GREASEPENCIL_LAYER_GROUP); } else { diff --git a/source/blender/modifiers/intern/MOD_wave.cc b/source/blender/modifiers/intern/MOD_wave.cc index 0d64321f982..450cd7fe6c5 100644 --- a/source/blender/modifiers/intern/MOD_wave.cc +++ b/source/blender/modifiers/intern/MOD_wave.cc @@ -312,9 +312,9 @@ static void panel_draw(const bContext * /*C*/, Panel *panel) row->prop(ptr, "use_normal", UI_ITEM_NONE, "", ICON_NONE); sub = &row->row(true); sub->active_set(RNA_boolean_get(ptr, "use_normal")); - sub->prop(ptr, "use_normal_x", UI_ITEM_R_TOGGLE, "X", ICON_NONE); - sub->prop(ptr, "use_normal_y", UI_ITEM_R_TOGGLE, "Y", ICON_NONE); - sub->prop(ptr, "use_normal_z", UI_ITEM_R_TOGGLE, "Z", ICON_NONE); + sub->prop(ptr, "use_normal_x", UI_ITEM_R_TOGGLE, IFACE_("X"), ICON_NONE); + sub->prop(ptr, "use_normal_y", UI_ITEM_R_TOGGLE, IFACE_("Y"), ICON_NONE); + sub->prop(ptr, "use_normal_z", UI_ITEM_R_TOGGLE, IFACE_("Z"), ICON_NONE); col = &layout->column(false); col->prop(ptr, "falloff_radius", UI_ITEM_NONE, IFACE_("Falloff"), ICON_NONE); @@ -340,7 +340,7 @@ static void position_panel_draw(const bContext * /*C*/, Panel *panel) col = &layout->column(true); col->prop(ptr, "start_position_x", UI_ITEM_NONE, IFACE_("Start Position X"), ICON_NONE); - col->prop(ptr, "start_position_y", UI_ITEM_NONE, "Y", ICON_NONE); + col->prop(ptr, "start_position_y", UI_ITEM_NONE, IFACE_("Y"), ICON_NONE); } static void time_panel_draw(const bContext * /*C*/, Panel *panel) diff --git a/source/blender/nodes/geometry/nodes/node_geo_closure.cc b/source/blender/nodes/geometry/nodes/node_geo_closure.cc index 4e2e8b60a76..d67609d17cd 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_closure.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_closure.cc @@ -44,10 +44,10 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *current_no PointerRNA output_node_ptr = RNA_pointer_create_discrete(&ntree.id, &RNA_Node, &output_node); - layout->op("node.sockets_sync", "Sync", ICON_FILE_REFRESH); + layout->op("node.sockets_sync", IFACE_("Sync"), ICON_FILE_REFRESH); layout->prop(&output_node_ptr, "define_signature", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (current_node->type_legacy == NODE_CLOSURE_INPUT) { - if (uiLayout *panel = layout->panel(C, "input_items", false, TIP_("Input Items"))) { + if (uiLayout *panel = layout->panel(C, "input_items", false, IFACE_("Input Items"))) { socket_items::ui::draw_items_list_with_operators( C, panel, ntree, output_node); socket_items::ui::draw_active_item_props( @@ -57,13 +57,13 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *current_no panel->use_property_decorate_set(false); panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (!socket_type_always_single(eNodeSocketDatatype(item.socket_type))) { - panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, "Shape", ICON_NONE); + panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, IFACE_("Shape"), ICON_NONE); } }); } } else { - if (uiLayout *panel = layout->panel(C, "output_items", false, TIP_("Output Items"))) { + if (uiLayout *panel = layout->panel(C, "output_items", false, IFACE_("Output Items"))) { socket_items::ui::draw_items_list_with_operators( C, panel, ntree, output_node); socket_items::ui::draw_active_item_props( @@ -73,7 +73,7 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *current_no panel->use_property_decorate_set(false); panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (!socket_type_always_single(eNodeSocketDatatype(item.socket_type))) { - panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, "Shape", ICON_NONE); + panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, IFACE_("Shape"), ICON_NONE); } }); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_combine_bundle.cc b/source/blender/nodes/geometry/nodes/node_geo_combine_bundle.cc index 4b313677aed..88c46131db3 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_combine_bundle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_combine_bundle.cc @@ -97,9 +97,9 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *node_ptr) layout->use_property_split_set(true); layout->use_property_decorate_set(false); - layout->op("node.sockets_sync", "Sync", ICON_FILE_REFRESH); + layout->op("node.sockets_sync", IFACE_("Sync"), ICON_FILE_REFRESH); layout->prop(node_ptr, "define_signature", UI_ITEM_NONE, std::nullopt, ICON_NONE); - if (uiLayout *panel = layout->panel(C, "bundle_items", false, TIP_("Bundle Items"))) { + if (uiLayout *panel = layout->panel(C, "bundle_items", false, IFACE_("Bundle Items"))) { socket_items::ui::draw_items_list_with_operators( C, panel, ntree, node); socket_items::ui::draw_active_item_props( @@ -107,9 +107,9 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *node_ptr) const auto &item = *item_ptr->data_as(); panel->use_property_split_set(true); panel->use_property_decorate_set(false); - panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, "Type", ICON_NONE); + panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, IFACE_("Type"), ICON_NONE); if (!socket_type_always_single(eNodeSocketDatatype(item.socket_type))) { - panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, "Shape", ICON_NONE); + panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, IFACE_("Shape"), ICON_NONE); } }); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_evaluate_closure.cc b/source/blender/nodes/geometry/nodes/node_geo_evaluate_closure.cc index bd1983d6a62..cbd3eea3100 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_evaluate_closure.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_evaluate_closure.cc @@ -118,7 +118,7 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) layout->use_property_split_set(true); layout->use_property_decorate_set(false); - layout->op("node.sockets_sync", "Sync", ICON_FILE_REFRESH); + layout->op("node.sockets_sync", IFACE_("Sync"), ICON_FILE_REFRESH); layout->prop(ptr, "define_signature", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (uiLayout *panel = layout->panel(C, "input_items", false, IFACE_("Input Items"))) { @@ -131,7 +131,7 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) panel->use_property_decorate_set(false); panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (!socket_type_always_single(eNodeSocketDatatype(item.socket_type))) { - panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, "Shape", ICON_NONE); + panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, IFACE_("Shape"), ICON_NONE); } }); } @@ -145,7 +145,7 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) panel->use_property_decorate_set(false); panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, std::nullopt, ICON_NONE); if (!socket_type_always_single(eNodeSocketDatatype(item.socket_type))) { - panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, "Shape", ICON_NONE); + panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, IFACE_("Shape"), ICON_NONE); } }); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc index cf1614ebddf..ea28c0a5891 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_index_switch.cc @@ -115,7 +115,7 @@ static void node_declare(NodeDeclarationBuilder &b) b.add_input("", "__extend__").custom_draw([](CustomSocketDrawParams ¶ms) { uiLayout &layout = params.layout; layout.emboss_set(ui::EmbossType::None); - PointerRNA op_ptr = layout.op("node.index_switch_item_add", IFACE_(""), ICON_ADD); + PointerRNA op_ptr = layout.op("node.index_switch_item_add", "", ICON_ADD); RNA_int_set(&op_ptr, "node_identifier", params.node.identifier); }); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_separate_bundle.cc b/source/blender/nodes/geometry/nodes/node_geo_separate_bundle.cc index ef95afe9669..4f3a53dcda2 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_separate_bundle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_separate_bundle.cc @@ -101,9 +101,9 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *node_ptr) layout->use_property_split_set(true); layout->use_property_decorate_set(false); - layout->op("node.sockets_sync", "Sync", ICON_FILE_REFRESH); + layout->op("node.sockets_sync", IFACE_("Sync"), ICON_FILE_REFRESH); layout->prop(node_ptr, "define_signature", UI_ITEM_NONE, std::nullopt, ICON_NONE); - if (uiLayout *panel = layout->panel(C, "bundle_items", false, TIP_("Bundle Items"))) { + if (uiLayout *panel = layout->panel(C, "bundle_items", false, IFACE_("Bundle Items"))) { socket_items::ui::draw_items_list_with_operators( C, panel, ntree, node); socket_items::ui::draw_active_item_props( @@ -111,9 +111,9 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *node_ptr) const auto &item = *item_ptr->data_as(); panel->use_property_split_set(true); panel->use_property_decorate_set(false); - panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, "Type", ICON_NONE); + panel->prop(item_ptr, "socket_type", UI_ITEM_NONE, IFACE_("Type"), ICON_NONE); if (!socket_type_always_single(eNodeSocketDatatype(item.socket_type))) { - panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, "Shape", ICON_NONE); + panel->prop(item_ptr, "structure_type", UI_ITEM_NONE, IFACE_("Shape"), ICON_NONE); } }); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_viewer.cc b/source/blender/nodes/geometry/nodes/node_geo_viewer.cc index 364b46db519..73418d81f42 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_viewer.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_viewer.cc @@ -59,10 +59,10 @@ static void draw_vector(uiLayout &layout, const float3 &value) static void draw_color(uiLayout &layout, const ColorGeometry4f &value) { uiLayout &col = layout.column(true); - col.label(fmt::format("{}: {:.5f}", IFACE_("R"), value.r), ICON_NONE); - col.label(fmt::format("{}: {:.5f}", IFACE_("G"), value.g), ICON_NONE); - col.label(fmt::format("{}: {:.5f}", IFACE_("B"), value.b), ICON_NONE); - col.label(fmt::format("{}: {:.5f}", IFACE_("A"), value.a), ICON_NONE); + col.label(fmt::format("{}: {:.5f}", CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "R"), value.r), ICON_NONE); + col.label(fmt::format("{}: {:.5f}", CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "G"), value.g), ICON_NONE); + col.label(fmt::format("{}: {:.5f}", CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "B"), value.b), ICON_NONE); + col.label(fmt::format("{}: {:.5f}", CTX_IFACE_(BLT_I18NCONTEXT_COLOR, "A"), value.a), ICON_NONE); } static void draw_string(uiLayout &layout, const StringRef value) { diff --git a/source/blender/nodes/intern/geometry_nodes_caller_ui.cc b/source/blender/nodes/intern/geometry_nodes_caller_ui.cc index 2addab077eb..dbaabb835d9 100644 --- a/source/blender/nodes/intern/geometry_nodes_caller_ui.cc +++ b/source/blender/nodes/intern/geometry_nodes_caller_ui.cc @@ -252,7 +252,7 @@ static void add_layer_name_search_button(DrawGroupInputsContext &ctx, rna_path, 0, StringRef(socket.description)); - UI_but_placeholder_set(but, "Layer"); + UI_but_placeholder_set(but, IFACE_("Layer")); layout->label("", ICON_BLANK1); const Object *object = ed::object::context_object(&ctx.C); @@ -806,7 +806,7 @@ static void draw_warnings(const bContext *C, uiLayout *col = &panel.body->column(false); for (const NodeWarning *warning : warnings) { const int icon = node_warning_type_icon(warning->type); - col->label(warning->message, icon); + col->label(RPT_(warning->message), icon); } } diff --git a/source/blender/sequencer/intern/modifiers/MOD_color_balance.cc b/source/blender/sequencer/intern/modifiers/MOD_color_balance.cc index bbaffdc958a..d158173e454 100644 --- a/source/blender/sequencer/intern/modifiers/MOD_color_balance.cc +++ b/source/blender/sequencer/intern/modifiers/MOD_color_balance.cc @@ -288,33 +288,36 @@ static void colorBalance_panel_draw(const bContext *C, Panel *panel) { uiLayout &split = flow.column(false).split(0.35f, false); uiLayout &col = split.column(true); - col.label("Lift", ICON_NONE); + col.label(IFACE_("Lift"), ICON_NONE); col.separator(); col.separator(); col.prop(&color_balance, "lift", UI_ITEM_NONE, "", ICON_NONE); - col.prop(&color_balance, "invert_lift", UI_ITEM_NONE, "Invert", ICON_ARROW_LEFTRIGHT); + col.prop( + &color_balance, "invert_lift", UI_ITEM_NONE, IFACE_("Invert"), ICON_ARROW_LEFTRIGHT); uiTemplateColorPicker(&split, &color_balance, "lift", true, false, false, true); col.separator(); } { uiLayout &split = flow.column(false).split(0.35f, false); uiLayout &col = split.column(true); - col.label("Gamma", ICON_NONE); + col.label(IFACE_("Gamma"), ICON_NONE); col.separator(); col.separator(); col.prop(&color_balance, "gamma", UI_ITEM_NONE, "", ICON_NONE); - col.prop(&color_balance, "invert_gamma", UI_ITEM_NONE, "Invert", ICON_ARROW_LEFTRIGHT); + col.prop( + &color_balance, "invert_gamma", UI_ITEM_NONE, IFACE_("Invert"), ICON_ARROW_LEFTRIGHT); uiTemplateColorPicker(&split, &color_balance, "gamma", true, false, true, true); col.separator(); } { uiLayout &split = flow.column(false).split(0.35f, false); uiLayout &col = split.column(true); - col.label("Gain", ICON_NONE); + col.label(IFACE_("Gain"), ICON_NONE); col.separator(); col.separator(); col.prop(&color_balance, "gain", UI_ITEM_NONE, "", ICON_NONE); - col.prop(&color_balance, "invert_gain", UI_ITEM_NONE, "Invert", ICON_ARROW_LEFTRIGHT); + col.prop( + &color_balance, "invert_gain", UI_ITEM_NONE, IFACE_("Invert"), ICON_ARROW_LEFTRIGHT); uiTemplateColorPicker(&split, &color_balance, "gain", true, false, true, true); } } @@ -322,33 +325,36 @@ static void colorBalance_panel_draw(const bContext *C, Panel *panel) { uiLayout &split = flow.column(false).split(0.35f, false); uiLayout &col = split.column(true); - col.label("Offset", ICON_NONE); + col.label(IFACE_("Offset"), ICON_NONE); col.separator(); col.separator(); col.prop(&color_balance, "offset", UI_ITEM_NONE, "", ICON_NONE); - col.prop(&color_balance, "invert_offset", UI_ITEM_NONE, "Invert", ICON_ARROW_LEFTRIGHT); + col.prop( + &color_balance, "invert_offset", UI_ITEM_NONE, IFACE_("Invert"), ICON_ARROW_LEFTRIGHT); uiTemplateColorPicker(&split, &color_balance, "offset", true, false, false, true); col.separator(); } { uiLayout &split = flow.column(false).split(0.35f, false); uiLayout &col = split.column(true); - col.label("Power", ICON_NONE); + col.label(IFACE_("Power"), ICON_NONE); col.separator(); col.separator(); col.prop(&color_balance, "power", UI_ITEM_NONE, "", ICON_NONE); - col.prop(&color_balance, "invert_power", UI_ITEM_NONE, "Invert", ICON_ARROW_LEFTRIGHT); + col.prop( + &color_balance, "invert_power", UI_ITEM_NONE, IFACE_("Invert"), ICON_ARROW_LEFTRIGHT); uiTemplateColorPicker(&split, &color_balance, "power", true, false, false, true); col.separator(); } { uiLayout &split = flow.column(false).split(0.35f, false); uiLayout &col = split.column(true); - col.label("Slope", ICON_NONE); + col.label(IFACE_("Slope"), ICON_NONE); col.separator(); col.separator(); col.prop(&color_balance, "slope", UI_ITEM_NONE, "", ICON_NONE); - col.prop(&color_balance, "invert_slope", UI_ITEM_NONE, "Invert", ICON_ARROW_LEFTRIGHT); + col.prop( + &color_balance, "invert_slope", UI_ITEM_NONE, IFACE_("Invert"), ICON_ARROW_LEFTRIGHT); uiTemplateColorPicker(&split, &color_balance, "slope", true, false, false, true); } } diff --git a/source/blender/sequencer/intern/modifiers/modifier.cc b/source/blender/sequencer/intern/modifiers/modifier.cc index 26d6a73227c..a635ab46678 100644 --- a/source/blender/sequencer/intern/modifiers/modifier.cc +++ b/source/blender/sequencer/intern/modifiers/modifier.cc @@ -156,7 +156,7 @@ void draw_mask_input_type_settings(const bContext *C, uiLayout *layout, PointerR col = &layout->column(false); row = &col->row(true); - row->prop(ptr, "input_mask_type", UI_ITEM_R_EXPAND, "Type", ICON_NONE); + row->prop(ptr, "input_mask_type", UI_ITEM_R_EXPAND, IFACE_("Type"), ICON_NONE); if (input_mask_type == STRIP_MASK_INPUT_STRIP) { MetaStack *ms = meta_stack_active_get(ed); @@ -169,7 +169,8 @@ void draw_mask_input_type_settings(const bContext *C, uiLayout *layout, PointerR sequences_object = RNA_pointer_create_discrete( &sequencer_scene->id, &RNA_SequenceEditor, ed); } - col->prop_search(ptr, "input_mask_strip", &sequences_object, "strips", "Mask", ICON_NONE); + col->prop_search( + ptr, "input_mask_strip", &sequences_object, "strips", IFACE_("Mask"), ICON_NONE); } else { col->prop(ptr, "input_mask_id", UI_ITEM_NONE, std::nullopt, ICON_NONE); diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 3b664453aea..ef9fb8337af 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -4786,7 +4786,7 @@ static uiBlock *block_create__close_file_dialog(bContext *C, ARegion *region, vo /* Modified Images Checkbox. */ if (modified_images_count > 0) { char message[64]; - SNPRINTF(message, "Save %u modified image(s)", modified_images_count); + SNPRINTF(message, RPT_("Save %u modified image(s)"), modified_images_count); /* Only the first checkbox should get extra separation. */ if (!has_extra_checkboxes) { layout->separator();