Actually, UI scripts should not use directly pgettext, but rather the iface or tooltip variants. Added those to bpy.app.translations, and used pgettext_iface.
(Did not add those when I created that module, because I did not thought we would actually need them in usual UI code, but turned out I was wrong). Also made some optimizations in those py gettext funcs, when i18n is disabled at build time, no need to do pyobject -> cstring -> pyobject conversions!.
This commit is contained in:
@@ -19,8 +19,7 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
|
||||
from bpy.app.translations import pgettext as _
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
|
||||
|
||||
class ModifierButtonsPanel():
|
||||
@@ -267,7 +266,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
layout.prop(md, "angle_limit")
|
||||
layout.prop(md, "use_dissolve_boundaries")
|
||||
|
||||
layout.label(text=_("Face Count: %d") % md.face_count, translate=False)
|
||||
layout.label(text=iface_("Face Count: %d") % md.face_count, translate=False)
|
||||
|
||||
def DISPLACE(self, layout, ob, md):
|
||||
has_texture = (md.texture is not None)
|
||||
|
Reference in New Issue
Block a user