From bec7eadcbf43076929d7adcd29493e90912e4c75 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Tue, 7 Jan 2025 11:44:28 +0100 Subject: [PATCH] I18n: Allow translation of "Warning" node label The Warning geometry node uses its warning type as label. These enum items were extracted using the default context, but translated using "Nodetree". The items Warning, Info and Error, should be quite unambiguous and translated using the default context instead. In addition, a string "Unknown" was translated twice. Replace one of those translations with a simple `N_()` extraction macro. --- source/blender/nodes/geometry/nodes/node_geo_warning.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/nodes/geometry/nodes/node_geo_warning.cc b/source/blender/nodes/geometry/nodes/node_geo_warning.cc index d6e85d669e2..5b3333ab1c6 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_warning.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_warning.cc @@ -93,9 +93,9 @@ static void node_label(const bNodeTree * /*ntree*/, const char *name; bool enum_label = RNA_enum_name(rna_enum_node_warning_type_items, node->custom1, &name); if (!enum_label) { - name = IFACE_("Unknown"); + name = N_("Unknown"); } - BLI_strncpy_utf8(label, CTX_IFACE_(BLT_I18NCONTEXT_ID_NODETREE, name), label_maxncpy); + BLI_strncpy_utf8(label, IFACE_(name), label_maxncpy); } static void node_register()