I18n: Extract and translate asset catalog and asset names and descriptions #105747

Closed
Damien Picard wants to merge 2 commits from pioverfour:dp_translate_asset_nodes_menu into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 4abbe8ff65 - Show all commits

View File

@ -190,7 +190,7 @@ static void node_add_catalog_assets_draw(const bContext *C, Menu *menu)
uiLayoutSetContextPointer(col, "asset_library_ref", &library_ptr);
uiItemO(
col, AS_asset_representation_name_get(&item.asset), ICON_NONE, "NODE_OT_add_group_asset");
col, IFACE_(AS_asset_representation_name_get(&item.asset)), ICON_NONE, "NODE_OT_add_group_asset");
}
catalog_item->foreach_child([&](asset_system::AssetCatalogTreeItem &child_item) {
@ -200,7 +200,7 @@ static void node_add_catalog_assets_draw(const bContext *C, Menu *menu)
&screen.id, &RNA_AssetCatalogPath, const_cast<asset_system::AssetCatalogPath *>(&path)};
uiLayout *col = uiLayoutColumn(layout, false);
uiLayoutSetContextPointer(col, "asset_catalog_path", &path_ptr);
uiItemM(col, "NODE_MT_node_add_catalog_assets", path.name().c_str(), ICON_NONE);
uiItemM(col, "NODE_MT_node_add_catalog_assets", IFACE_(path.name().c_str()), ICON_NONE);
});
}
@ -270,7 +270,7 @@ static void add_root_catalogs_draw(const bContext *C, Menu *menu)
&screen.id, &RNA_AssetCatalogPath, const_cast<asset_system::AssetCatalogPath *>(&path)};
uiLayout *col = uiLayoutColumn(layout, false);
uiLayoutSetContextPointer(col, "asset_catalog_path", &path_ptr);
uiItemM(col, "NODE_MT_node_add_catalog_assets", path.name().c_str(), ICON_NONE);
uiItemM(col, "NODE_MT_node_add_catalog_assets", IFACE_(path.name().c_str()), ICON_NONE);
});
}

View File

@ -468,7 +468,7 @@ static char *node_add_group_asset_get_description(struct bContext *C,
if (!asset_data.description) {
return nullptr;
}
return BLI_strdup(asset_data.description);
return BLI_strdup(DATA_(asset_data.description));
}
void NODE_OT_add_group_asset(wmOperatorType *ot)