I18n Disambiguation: "Shift".

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

Part of T43295.
This commit is contained in:
2019-05-13 17:57:13 +02:00
parent 17e172b6c1
commit 93cabce3a1
2 changed files with 4 additions and 1 deletions

View File

@@ -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);

View File

@@ -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: