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.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
from blf import gettext as _
|
||||
|
||||
|
||||
def rna_idprop_ui_get(item, create=True):
|
||||
try:
|
||||
@@ -145,7 +145,7 @@ def draw(layout, context, context_member, property_type, use_edit=True):
|
||||
|
||||
if use_edit:
|
||||
row = split.row(align=True)
|
||||
prop = row.operator("wm.properties_edit", text=_("edit"))
|
||||
prop = row.operator("wm.properties_edit", text="edit")
|
||||
assign_props(prop, val_draw, key)
|
||||
|
||||
prop = row.operator("wm.properties_remove", text="", icon='ZOOMOUT')
|
||||
@@ -157,7 +157,7 @@ class PropertyPanel():
|
||||
The subclass should have its own poll function
|
||||
and the variable '_context_path' MUST be set.
|
||||
"""
|
||||
bl_label = _("Custom Properties")
|
||||
bl_label = "Custom Properties"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user