Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-02-04 16:31:53 +0300
committerHans Goudey <h.goudey@me.com>2022-02-04 16:31:53 +0300
commit7099d5b66129deba2d28102ea339b1d5339233fe (patch)
tree7c0c4c8839c522632f41c96c57a2316b385c5a0d /source/blender/editors/asset
parent623ff64a278924af57d7e1ec7e7bdb8792a560f8 (diff)
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
Diffstat (limited to 'source/blender/editors/asset')
-rw-r--r--source/blender/editors/asset/CMakeLists.txt1
-rw-r--r--source/blender/editors/asset/intern/asset_ops.cc10
2 files changed, 7 insertions, 4 deletions
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)