From 7099d5b66129deba2d28102ea339b1d5339233fe Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 4 Feb 2022 07:31:53 -0600 Subject: Fix: Missing translations from operator descriptions The strings in the `get_description` functions for operators need translation, they are not found by the translation system automatically, and there is no translation applied afterwards either (as far as I could tell). Some used `N_` before, but most did nothing. Differential Revision: https://developer.blender.org/D14011 --- source/blender/editors/asset/CMakeLists.txt | 1 + source/blender/editors/asset/intern/asset_ops.cc | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/asset') diff --git a/source/blender/editors/asset/CMakeLists.txt b/source/blender/editors/asset/CMakeLists.txt index 086fab4ab47..d91102528e5 100644 --- a/source/blender/editors/asset/CMakeLists.txt +++ b/source/blender/editors/asset/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../../blenkernel ../../blenlib ../../blenloader + ../../blentranslation ../../makesdna ../../makesrna ../../windowmanager diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc index f7755aa9fea..0469f14487d 100644 --- a/source/blender/editors/asset/intern/asset_ops.cc +++ b/source/blender/editors/asset/intern/asset_ops.cc @@ -39,6 +39,8 @@ /* XXX needs access to the file list, should all be done via the asset system in future. */ #include "ED_fileselect.h" +#include "BLT_translation.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -342,8 +344,8 @@ static bool asset_clear_poll(bContext *C) IDVecStats ctx_stats = asset_operation_get_id_vec_stats_from_context(C); if (!ctx_stats.has_asset) { - const char *msg_single = "Data-block is not marked as asset"; - const char *msg_multiple = "No data-block selected that is marked as asset"; + const char *msg_single = TIP_("Data-block is not marked as asset"); + const char *msg_multiple = TIP_("No data-block selected that is marked as asset"); CTX_wm_operator_poll_msg_set(C, ctx_stats.is_single ? msg_single : msg_multiple); return false; } @@ -365,8 +367,8 @@ static char *asset_clear_get_description(struct bContext *UNUSED(C), } return BLI_strdup( - "Delete all asset metadata, turning the selected asset data-blocks back into normal " - "data-blocks, and set Fake User to ensure the data-blocks will still be saved"); + TIP_("Delete all asset metadata, turning the selected asset data-blocks back into normal " + "data-blocks, and set Fake User to ensure the data-blocks will still be saved")); } static void ASSET_OT_clear(wmOperatorType *ot) -- cgit v1.2.3