From 14bac995f38251f4a6b7b210ef968dc5311580e8 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 27 Sep 2015 09:49:41 +0200 Subject: Fix T46268: All Hotkey "C" are unexpectedly translated in menus. We need custom context here, those are often very short names so context collision is pretty easy. Also some minor changes (and avoid shadowing varnames)... --- source/blender/blentranslation/BLT_translation.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/blentranslation') diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index 6f24f00acfc..efd59c3fa94 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -106,7 +106,11 @@ const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid /* Default context for operator names/labels. */ #define BLT_I18NCONTEXT_OPERATOR_DEFAULT "Operator" -/* Mark the msgid applies to several elements (needed in some cases, as english adjectives have no plural mark. :( */ +/* Context for events/keymaps (necessary, since those often use one or two letters, + * easy to get collisions with other areas...). */ +#define BLT_I18NCONTEXT_UI_EVENTS "UI_Events_KeyMaps" + +/* Mark the msgid applies to several elements (needed in some cases, as english adjectives have no plural mark :( ). */ #define BLT_I18NCONTEXT_PLURAL "Plural" /* ID-types contexts. */ @@ -160,6 +164,7 @@ typedef struct { BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_DEFAULT, "default_real"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_DEFAULT_BPYRNA, "default"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "operator_default"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_UI_EVENTS, "ui_events_keymaps"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_PLURAL, "plural"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ACTION, "id_action"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ARMATURE, "id_armature"), \ -- cgit v1.2.3