I18N: Add comment about required manual sync in nodes code.
Nodes code uses direct access to enum property values definition (outside of the RNA API) to generate UI (translated) messages, this is risky/messy since the i18n context potentailly defined for the actual RNA property is not available in these cases.
This commit is contained in:
@@ -121,6 +121,8 @@ static void node_label(const bNodeTree * /*ntree*/, const bNode *node, char *lab
|
||||
{
|
||||
char name[64] = {0};
|
||||
const char *operation_name = IFACE_("Unknown");
|
||||
/* NOTE: This assumes that the matching RNA enum property also uses the default i18n context, and
|
||||
* needs to be kept manually in sync. */
|
||||
RNA_enum_name_gettexted(
|
||||
bit_math_operation_items.data(), node->custom1, BLT_I18NCONTEXT_DEFAULT, &operation_name);
|
||||
SNPRINTF(name, IFACE_("Bitwise %s"), operation_name);
|
||||
|
||||
Reference in New Issue
Block a user