Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-03-28 19:41:43 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-03-28 19:41:43 +0400
commit5262fcd4d3eeb96b955266c92b3cc97beb56698d (patch)
treeffe2d591cd8172f14ccd1d0eb371b616730a6f6a /release/scripts/startup/bl_ui/properties_physics_common.py
parentc54fba6a1154c145a5e8a426aafeb4b8fb4269f0 (diff)
I18n: various fixing.
* Reflect changes stated in prev commit about contexts in py code. * Add a "Plural" context, to handle cases where english does not mark plural at all (e.g. shorten labels of only one adjective). Not so happy with that, but can't see any other way to do it, for now. * Abuse "ID_CURVE" context for all falloff curves (this should solve some confusion issues, e.g. "sharp"...).
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_common.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 2d9d4649e28..d55dea58acf 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -20,8 +20,7 @@
import bpy
from bpy.types import Panel
-
-i18n_default_ctxt = bpy.app.translations.contexts.default
+from bpy.app.translations import contexts as i18n_contexts
class PhysicButtonsPanel():
@@ -39,20 +38,20 @@ def physics_add(self, layout, md, name, type, typeicon, toggles):
sub = layout.row(align=True)
if md:
sub.context_pointer_set("modifier", md)
- sub.operator("object.modifier_remove", text=name, text_ctxt=i18n_default_ctxt, icon='X')
+ sub.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X')
if(toggles):
sub.prop(md, "show_render", text="")
sub.prop(md, "show_viewport", text="")
else:
- sub.operator("object.modifier_add", text=name, text_ctxt=i18n_default_ctxt, icon=typeicon).type = type
+ sub.operator("object.modifier_add", text=name, text_ctxt=i18n_contexts.default, icon=typeicon).type = type
def physics_add_special(self, layout, data, name, addop, removeop, typeicon):
sub = layout.row(align=True)
if data:
- sub.operator(removeop, text=name, text_ctxt=i18n_default_ctxt, icon='X')
+ sub.operator(removeop, text=name, text_ctxt=i18n_contexts.default, icon='X')
else:
- sub.operator(addop, text=name, text_ctxt=i18n_default_ctxt, icon=typeicon)
+ sub.operator(addop, text=name, text_ctxt=i18n_context.default, icon=typeicon)
class PHYSICS_PT_add(PhysicButtonsPanel, Panel):