[Bf-blender-cvs] [93cabce3a15] master: I18n Disambiguation: "Shift".

Bastien Montagne noreply at git.blender.org
Mon May 13 17:58:44 CEST 2019


Commit: 93cabce3a156a07a76c26d7f3e78c3bc3212f623
Author: Bastien Montagne
Date:   Mon May 13 17:57:13 2019 +0200
Branches: master
https://developer.blender.org/rB93cabce3a156a07a76c26d7f3e78c3bc3212f623

I18n Disambiguation: "Shift".

Give WM context to the shortcut, since this is more specific meaning
than usual 'shifting' one...

Part of T43295.

===================================================================

M	source/blender/makesrna/intern/rna_wm.c
M	source/blender/windowmanager/intern/wm_keymap.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 66904cae82c..e4af1b549d6 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -2106,6 +2106,7 @@ static void rna_def_event(BlenderRNA *brna)
   RNA_def_property_boolean_sdna(prop, NULL, "shift", 1);
   RNA_def_property_clear_flag(prop, PROP_EDITABLE);
   RNA_def_property_ui_text(prop, "Shift", "True when the Shift key is held");
+  RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_WINDOWMANAGER);
 
   prop = RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 1);
@@ -2602,6 +2603,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
   /*  RNA_def_property_enum_sdna(prop, NULL, "shift"); */
   /*  RNA_def_property_enum_items(prop, keymap_modifiers_items); */
   RNA_def_property_ui_text(prop, "Shift", "Shift key pressed");
+  RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_WINDOWMANAGER);
   RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
 
   prop = RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index bae9a5de1e6..c41ca67f795 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -1120,7 +1120,8 @@ const char *WM_key_event_string(const short type, const bool compact)
         if (platform == MACOS) {
           icon_glyph = "\xe2\x87\xa7";
         }
-        return key_event_icon_or_text(font_id, IFACE_("Shift"), icon_glyph);
+        return key_event_icon_or_text(
+            font_id, CTX_IFACE_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "Shift"), icon_glyph);
       }
       case LEFTCTRLKEY:
       case RIGHTCTRLKEY:



More information about the Bf-blender-cvs mailing list