diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-02-10 14:29:38 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-02-10 14:29:38 +0400 |
commit | d0f4a2396b38c122b7e56de83532515ae8fa4381 (patch) | |
tree | c10f9983e987090f73ce8a39e368f5d265d670ac /release/scripts/startup/bl_ui/properties_physics_fluid.py | |
parent | 3b8a0f3d674a0da3bb17cbda30f0a2dc19a40e4f (diff) |
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!.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_fluid.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_fluid.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index c9eaa7a4acc..2164b86f486 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -19,8 +19,7 @@ # <pep8 compliant> import bpy from bpy.types import Panel, Menu - -from bpy.app.translations import pgettext as _ +from bpy.app.translations import pgettext_iface as iface_ class FLUID_MT_presets(Menu): @@ -66,7 +65,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): if fluid.type == 'DOMAIN': # odd formatting here so translation script can extract string - layout.operator("fluid.bake", text=_("Bake (Req. Memory: %s)") % fluid.memory_estimate, + layout.operator("fluid.bake", text=iface_("Bake (Req. Memory: %s)") % fluid.memory_estimate, translate=False, icon='MOD_FLUIDSIM') split = layout.split() |