From f4c56a879d946fb0a233307f72cd739e900f9f7c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 21 Sep 2011 15:18:38 +0000 Subject: remove use of gettext: _("...") style translation now its handled by rna. --- .../startup/bl_ui/properties_physics_common.py | 61 +++++++++++----------- 1 file changed, 30 insertions(+), 31 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_physics_common.py') diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 7ca97c20422..204e25d9f01 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -20,7 +20,6 @@ import bpy from bpy.types import Panel -from blf import gettext as _ class PhysicButtonsPanel(): @@ -54,27 +53,27 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel): ob = context.object layout = self.layout - layout.label(_("Enable physics for:")) + layout.label("Enable physics for:") split = layout.split() col = split.column() if(context.object.field.type == 'NONE'): - col.operator("object.forcefield_toggle", text=_("Force Field"), icon='FORCE_FORCE') + col.operator("object.forcefield_toggle", text="Force Field", icon='FORCE_FORCE') else: - col.operator("object.forcefield_toggle", text=_("Force Field"), icon='X') + col.operator("object.forcefield_toggle", text="Force Field", icon='X') if(ob.type == 'MESH'): - physics_add(self, col, context.collision, _("Collision"), 'COLLISION', 'MOD_PHYSICS', False) - physics_add(self, col, context.cloth, _("Cloth"), 'CLOTH', 'MOD_CLOTH', True) + physics_add(self, col, context.collision, "Collision", 'COLLISION', 'MOD_PHYSICS', False) + physics_add(self, col, context.cloth, "Cloth", 'CLOTH', 'MOD_CLOTH', True) col = split.column() if(ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE'): - physics_add(self, col, context.soft_body, _("Soft Body"), 'SOFT_BODY', 'MOD_SOFT', True) + physics_add(self, col, context.soft_body, "Soft Body", 'SOFT_BODY', 'MOD_SOFT', True) if(ob.type == 'MESH'): - physics_add(self, col, context.fluid, _("Fluid"), 'FLUID_SIMULATION', 'MOD_FLUIDSIM', True) - physics_add(self, col, context.smoke, _("Smoke"), 'SMOKE', 'MOD_SMOKE', True) + physics_add(self, col, context.fluid, "Fluid", 'FLUID_SIMULATION', 'MOD_FLUIDSIM', True) + physics_add(self, col, context.smoke, "Smoke", 'SMOKE', 'MOD_SMOKE', True) #cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc @@ -96,11 +95,11 @@ def point_cache_ui(self, context, cache, enabled, cachetype): if cache.use_external: split = layout.split(percentage=0.80) - split.prop(cache, "name", text=_("File Name")) + split.prop(cache, "name", text="File Name") split.prop(cache, "index", text="") row = layout.row() - row.label(text=_("File Path:")) + row.label(text="File Path:") row.prop(cache, "use_library_path", "Use Lib Path") layout.prop(cache, "filepath", text="") @@ -109,13 +108,13 @@ def point_cache_ui(self, context, cache, enabled, cachetype): else: if cachetype == 'SMOKE': if not bpy.data.is_saved: - layout.label(text=_("Cache is disabled until the file is saved")) + layout.label(text="Cache is disabled until the file is saved") layout.enabled = False if cache.use_disk_cache: - layout.prop(cache, "name", text=_("File Name")) + layout.prop(cache, "name", text="File Name") else: - layout.prop(cache, "name", text=_("Cache Name")) + layout.prop(cache, "name", text="Cache Name") row = layout.row(align=True) @@ -143,7 +142,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): row = layout.row() row.enabled = enabled and bpy.data.is_saved row.active = cache.use_disk_cache - row.label(text=_("Compression:")) + row.label(text="Compression:") row.prop(cache, "compression", expand=True) layout.separator() @@ -153,22 +152,22 @@ def point_cache_ui(self, context, cache, enabled, cachetype): col = split.column() if cache.is_baked == True: - col.operator("ptcache.free_bake", text=_("Free Bake")) + col.operator("ptcache.free_bake", text="Free Bake") else: - col.operator("ptcache.bake", text=_("Bake")).bake = True + col.operator("ptcache.bake", text="Bake").bake = True sub = col.row() sub.enabled = (cache.frames_skipped or cache.is_outdated) and enabled - sub.operator("ptcache.bake", text=_("Calculate To Frame")).bake = False + sub.operator("ptcache.bake", text="Calculate To Frame").bake = False sub = col.column() sub.enabled = enabled - sub.operator("ptcache.bake_from_cache", text=_("Current Cache to Bake")) + sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake") col = split.column() - col.operator("ptcache.bake_all", text=_("Bake All Dynamics")).bake = True - col.operator("ptcache.free_bake_all", text=_("Free All Bakes")) - col.operator("ptcache.bake_all", text=_("Update All To Frame")).bake = False + col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True + col.operator("ptcache.free_bake_all", text="Free All Bakes") + col.operator("ptcache.bake_all", text="Update All To Frame").bake = False def effector_weights_ui(self, context, weights): @@ -216,7 +215,7 @@ def basic_force_field_settings_ui(self, context, field): col = split.column() if field.type == 'DRAG': - col.prop(field, "linear_drag", text=_("Linear")) + col.prop(field, "linear_drag", text="Linear") else: col.prop(field, "strength") @@ -224,12 +223,12 @@ def basic_force_field_settings_ui(self, context, field): col.prop(field, "size") col.prop(field, "flow") elif field.type == 'HARMONIC': - col.prop(field, "harmonic_damping", text=_("Damping")) + col.prop(field, "harmonic_damping", text="Damping") col.prop(field, "rest_length") elif field.type == 'VORTEX' and field.shape != 'POINT': col.prop(field, "inflow") elif field.type == 'DRAG': - col.prop(field, "quadratic_drag", text=_("Quadratic")) + col.prop(field, "quadratic_drag", text="Quadratic") else: col.prop(field, "flow") @@ -238,19 +237,19 @@ def basic_force_field_settings_ui(self, context, field): sub.prop(field, "noise") sub.prop(field, "seed") if field.type == 'TURBULENCE': - col.prop(field, "use_global_coords", text=_("Global")) + col.prop(field, "use_global_coords", text="Global") elif field.type == 'HARMONIC': col.prop(field, "use_multiple_springs") split = layout.split() col = split.column() - col.label(text=_("Effect point:")) + col.label(text="Effect point:") col.prop(field, "apply_to_location") col.prop(field, "apply_to_rotation") col = split.column() - col.label(text=_("Collision:")) + col.label(text="Collision:") col.prop(field, "use_absorption") @@ -266,7 +265,7 @@ def basic_force_field_falloff_ui(self, context, field): col.prop(field, "z_direction", text="") col = split.column() - col.prop(field, "falloff_power", text=_("Power")) + col.prop(field, "falloff_power", text="Power") split = layout.split() col = split.column() @@ -274,14 +273,14 @@ def basic_force_field_falloff_ui(self, context, field): row.prop(field, "use_min_distance", text="") sub = row.row() sub.active = field.use_min_distance - sub.prop(field, "distance_min", text=_("Minimum")) + sub.prop(field, "distance_min", text="Minimum") col = split.column() row = col.row(align=True) row.prop(field, "use_max_distance", text="") sub = row.row() sub.active = field.use_max_distance - sub.prop(field, "distance_max", text=_("Maximum")) + sub.prop(field, "distance_max", text="Maximum") if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) -- cgit v1.2.3