diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-15 17:20:18 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-15 17:20:18 +0400 |
commit | 0eda51f2eabe24016efdc8f07825f1ba667cac33 (patch) | |
tree | 03d6f876da6b1256b8890b89db09b63952fa544f /release/scripts/startup/bl_ui/space_userpref_keymap.py | |
parent | 30293dc2ca8052ad0c7113c77365feca590f4d05 (diff) |
Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages
can happens without restart now.
- Added option to translate visible interface (menus, buttons, labels)
and tooltips. Now it's possible to have english UI and localized tooltips.
- Clean-up sources, do not use gettext stuff for things which can be
collected with RNA.
- Fix issues with windows 64bit and ru_RU locale on my desktop
(it was codepage issue).
- Added operator "Get Messages" which generates new text block with
with all strings collected from RNA.
- Changed script for updating blender.pot so now it appends
messages collected from rna to automatically gathered messages.
To update .pot you have to re-generate messages.txt using "Get Messages"
operator and then run update_pot script.
- Clean up old translation stuff which wasn't used and most probably
wouldn't be used.
- Return back "International Fonts" option, so if it's disabled, no
gettext lookups happens on draw.
- Merged read_homefile function back. No need in splitting it.
TODO:
- Custom fonts and font size.
Current font isn't nice at least for russian locale, it's
difficult to read it.
- Put references to messages.txt so gettext can merge translation when
name/description of some property changes.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref_keymap.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref_keymap.py | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index 336e4edf006..bc760a73c9a 100644 --- a/release/scripts/startup/bl_ui/space_userpref_keymap.py +++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py @@ -128,7 +128,7 @@ def _merge_keymaps(kc1, kc2): class USERPREF_MT_keyconfigs(Menu): - bl_label = _("KeyPresets") + bl_label = "KeyPresets" preset_subdir = "keyconfig" preset_operator = "wm.keyconfig_activate" @@ -143,7 +143,7 @@ class USERPREF_MT_keyconfigs(Menu): class InputKeyMapPanel: bl_space_type = 'USER_PREFERENCES' - bl_label = _("Input") + bl_label = "Input" bl_region_type = 'WINDOW' bl_options = {'HIDE_HEADER'} @@ -263,7 +263,7 @@ class InputKeyMapPanel: if km.is_modal: row.prop(kmi, "propvalue", text="") else: - row.label(text=kmi.name) + row.label(text=_(kmi.name)) row = split.row() row.prop(kmi, "map_type", text="") @@ -426,7 +426,6 @@ class WM_OT_keyconfig_test(Operator): "Test keyconfig for conflicts" bl_idname = "wm.keyconfig_test" bl_label = _("Test Key Configuration for Conflicts") - __doc__ = _("Test keyconfig for conflicts") def testEntry(self, kc, entry, src=None, parent=None): result = False @@ -534,32 +533,31 @@ def _string_value(value): class WM_OT_keyconfig_import(Operator): "Import key configuration from a python script" bl_idname = "wm.keyconfig_import" - bl_label = _("Import Key Configuration...") - __doc__ = _("Import key configuration from a python script") + bl_label = "Import Key Configuration..." filepath = StringProperty( - name=_("File Path"), - description=_("Filepath to write file to"), + name="File Path", + description="Filepath to write file to", default="keymap.py", ) filter_folder = BoolProperty( - name=_("Filter folders"), + name="Filter folders", default=True, options={'HIDDEN'}, ) filter_text = BoolProperty( - name=_("Filter text"), + name="Filter text", default=True, options={'HIDDEN'}, ) filter_python = BoolProperty( - name=_("Filter python"), + name="Filter python", default=True, options={'HIDDEN'}, ) keep_original = BoolProperty( - name=_("Keep original"), - description=_("Keep original file after copying to configuration folder"), + name="Keep original", + description="Keep original file after copying to configuration folder", default=True, ) @@ -602,25 +600,24 @@ class WM_OT_keyconfig_export(Operator): "Export key configuration to a python script" bl_idname = "wm.keyconfig_export" bl_label = _("Export Key Configuration...") - __doc__ = _("Export key configuration to a python script") filepath = StringProperty( - name=_("File Path"), - description=_("Filepath to write file to"), + name="File Path", + description="Filepath to write file to", default="keymap.py", ) filter_folder = BoolProperty( - name=_("Filter folders"), + name="Filter folders", default=True, options={'HIDDEN'}, ) filter_text = BoolProperty( - name=_("Filter text"), + name="Filter text", default=True, options={'HIDDEN'}, ) filter_python = BoolProperty( - name=_("Filter python"), + name="Filter python", default=True, options={'HIDDEN'}, ) @@ -711,12 +708,11 @@ class WM_OT_keyconfig_export(Operator): class WM_OT_keymap_restore(Operator): "Restore key map(s)" bl_idname = "wm.keymap_restore" - bl_label = _("Restore Key Map(s)") - __doc__ = _("Restore key map(s)") + bl_label = "Restore Key Map(s)" all = BoolProperty( - name=_("All Keymaps"), - description=_("Restore all keymaps to default"), + name="All Keymaps", + description="Restore all keymaps to default", ) def execute(self, context): @@ -735,12 +731,11 @@ class WM_OT_keymap_restore(Operator): class WM_OT_keyitem_restore(Operator): "Restore key map item" bl_idname = "wm.keyitem_restore" - bl_label = _("Restore Key Map Item") - __doc__ = _("Restore key map item") + bl_label = "Restore Key Map Item" item_id = IntProperty( - name=_("Item Identifier"), - description=_("Identifier of the item to remove"), + name="Item Identifier", + description="Identifier of the item to remove", ) @classmethod @@ -761,8 +756,7 @@ class WM_OT_keyitem_restore(Operator): class WM_OT_keyitem_add(Operator): "Add key map item" bl_idname = "wm.keyitem_add" - bl_label = _("Add Key Map Item") - __doc__ = _("Add key map item") + bl_label = "Add Key Map Item" def execute(self, context): km = context.keymap @@ -784,12 +778,11 @@ class WM_OT_keyitem_add(Operator): class WM_OT_keyitem_remove(Operator): "Remove key map item" bl_idname = "wm.keyitem_remove" - bl_label = _("Remove Key Map Item") - __doc__ = _("Remove key map item") + bl_label = "Remove Key Map Item" item_id = IntProperty( - name=_("Item Identifier"), - description=_("Identifier of the item to remove"), + name="Item Identifier", + description="Identifier of the item to remove", ) @classmethod @@ -806,8 +799,7 @@ class WM_OT_keyitem_remove(Operator): class WM_OT_keyconfig_remove(Operator): "Remove key config" bl_idname = "wm.keyconfig_remove" - bl_label = _("Remove Key Config") - __doc__ = _("Remove key config") + bl_label = "Remove Key Config" @classmethod def poll(cls, context): |