I18n: improve keymap translations

- The label for modal keymaps was extracted but did not use the proper
  context on translation.
- Same goes for modal keymap items.
- Extract the UI messages from rna_keymap_ui.py
- Translate global keymap names.
- Use the proper context in the status bar for the tool prompt operator

Ref T102071

Maniphest Tasks: T102071

Differential Revision: https://developer.blender.org/D16348
This commit is contained in:
Damien Picard
2022-11-15 11:02:22 +01:00
committed by Bastien Montagne
parent 5be3a68f58
commit 83c21e01dd
4 changed files with 13 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
subcol = _indented_layout(col, level + 1)
subrow = subcol.row(align=True)
subrow.prop(km, "show_expanded_items", text="", emboss=False)
subrow.label(text=iface_("%s (Global)") % km.name, translate=False)
subrow.label(text=iface_("%s (Global)") % iface_(km.name, i18n_contexts.id_windowmanager), translate=False)
else:
km.show_expanded_items = True
@@ -335,7 +335,8 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
col = layout.column()
row = col.row()
row.label(text=km.name, icon='DOT')
row.label(text=km.name, icon='DOT',
text_ctxt=i18n_contexts.id_windowmanager)
row.label()
row.label()