I18n: Disambiguate "Power"
- In the context of color balance, refers to a power function. Uses ID_MOVIECLIP context, because the ID_NODE is already used for math functions. - In the context of the scale constraint, also a power function. - In the context of physics and particle settings, refers to a falloff. - In the context of property subtypes and units, refers to a quantity. Issue reported by Hoang Duy Tran.
This commit is contained in:
committed by
Bastien Montagne
parent
88dbe8dcd1
commit
c3d071e469
@@ -1384,32 +1384,33 @@ rna_custom_property_type_items = (
|
||||
('PYTHON', "Python", "Edit a Python value directly, for unsupported property types"),
|
||||
)
|
||||
|
||||
rna_custom_property_subtype_none_item = ('NONE', n_("Plain Data"), n_("Data values without special behavior"))
|
||||
rna_custom_property_subtype_none_item = ('NONE', n_(
|
||||
"Plain Data", i18n_contexts.unit), n_("Data values without special behavior"))
|
||||
|
||||
rna_custom_property_subtype_number_items = (
|
||||
rna_custom_property_subtype_none_item,
|
||||
('PIXEL', n_("Pixel"), n_("A distance on screen")),
|
||||
('PERCENTAGE', n_("Percentage"), n_("A percentage between 0 and 100")),
|
||||
('FACTOR', n_("Factor"), n_("A factor between 0.0 and 1.0")),
|
||||
('ANGLE', n_("Angle"), n_("A rotational value specified in radians")),
|
||||
('TIME_ABSOLUTE', n_("Time"), n_("Time specified in seconds")),
|
||||
('DISTANCE', n_("Distance"), n_("A distance between two points")),
|
||||
('POWER', n_("Power"), ""),
|
||||
('TEMPERATURE', n_("Temperature"), ""),
|
||||
('PIXEL', n_("Pixel", i18n_contexts.unit), n_("A distance on screen")),
|
||||
('PERCENTAGE', n_("Percentage", i18n_contexts.unit), n_("A percentage between 0 and 100")),
|
||||
('FACTOR', n_("Factor", i18n_contexts.unit), n_("A factor between 0.0 and 1.0")),
|
||||
('ANGLE', n_("Angle", i18n_contexts.unit), n_("A rotational value specified in radians")),
|
||||
('TIME_ABSOLUTE', n_("Time", i18n_contexts.unit), n_("Time specified in seconds")),
|
||||
('DISTANCE', n_("Distance", i18n_contexts.unit), n_("A distance between two points")),
|
||||
('POWER', n_("Power", i18n_contexts.unit), ""),
|
||||
('TEMPERATURE', n_("Temperature", i18n_contexts.unit), ""),
|
||||
)
|
||||
|
||||
rna_custom_property_subtype_vector_items = (
|
||||
rna_custom_property_subtype_none_item,
|
||||
('COLOR', n_("Linear Color"), n_("Color in the linear space")),
|
||||
('COLOR_GAMMA', n_("Gamma-Corrected Color"), n_("Color in the gamma corrected space")),
|
||||
('TRANSLATION', n_("Translation"), ""),
|
||||
('DIRECTION', n_("Direction"), ""),
|
||||
('VELOCITY', n_("Velocity"), ""),
|
||||
('ACCELERATION', n_("Acceleration"), ""),
|
||||
('EULER', n_("Euler Angles"), n_("Euler rotation angles in radians")),
|
||||
('QUATERNION', n_("Quaternion Rotation"), n_("Quaternion rotation (affects NLA blending)")),
|
||||
('AXISANGLE', n_("Axis-Angle"), n_("Angle and axis to rotate around")),
|
||||
('XYZ', n_("XYZ"), ""),
|
||||
('COLOR', n_("Linear Color", i18n_contexts.unit), n_("Color in the linear space")),
|
||||
('COLOR_GAMMA', n_("Gamma-Corrected Color", i18n_contexts.unit), n_("Color in the gamma corrected space")),
|
||||
('TRANSLATION', n_("Translation", i18n_contexts.unit), ""),
|
||||
('DIRECTION', n_("Direction", i18n_contexts.unit), ""),
|
||||
('VELOCITY', n_("Velocity", i18n_contexts.unit), ""),
|
||||
('ACCELERATION', n_("Acceleration", i18n_contexts.unit), ""),
|
||||
('EULER', n_("Euler Angles", i18n_contexts.unit), n_("Euler rotation angles in radians")),
|
||||
('QUATERNION', n_("Quaternion Rotation", i18n_contexts.unit), n_("Quaternion rotation (affects NLA blending)")),
|
||||
('AXISANGLE', n_("Axis-Angle", i18n_contexts.unit), n_("Angle and axis to rotate around")),
|
||||
('XYZ', n_("XYZ", i18n_contexts.unit), ""),
|
||||
)
|
||||
|
||||
rna_id_type_items = tuple((item.identifier, item.name, item.description, item.icon, item.value)
|
||||
@@ -1548,6 +1549,7 @@ class WM_OT_properties_edit(Operator):
|
||||
subtype: EnumProperty(
|
||||
name="Subtype",
|
||||
items=subtype_items_cb,
|
||||
translation_context=i18n_contexts.unit,
|
||||
)
|
||||
|
||||
# String properties.
|
||||
|
||||
@@ -6,7 +6,9 @@ import bpy
|
||||
from bpy.types import (
|
||||
Panel,
|
||||
)
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
from bpy.app.translations import (
|
||||
contexts as i18n_contexts,
|
||||
)
|
||||
|
||||
|
||||
class PhysicButtonsPanel:
|
||||
@@ -328,7 +330,7 @@ def basic_force_field_falloff_ui(self, field):
|
||||
|
||||
col = layout.column()
|
||||
col.prop(field, "z_direction")
|
||||
col.prop(field, "falloff_power", text="Power")
|
||||
col.prop(field, "falloff_power", text="Power", text_ctxt=i18n_contexts.id_particlesettings)
|
||||
|
||||
col = layout.column(align=False, heading="Min Distance")
|
||||
col.use_property_decorate = False
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
from bpy.types import (
|
||||
Panel,
|
||||
)
|
||||
from bpy.app.translations import (
|
||||
contexts as i18n_contexts,
|
||||
)
|
||||
from bl_ui.properties_physics_common import (
|
||||
basic_force_field_settings_ui,
|
||||
basic_force_field_falloff_ui,
|
||||
@@ -262,7 +265,7 @@ class PHYSICS_PT_field_falloff_angular(PhysicButtonsPanel, Panel):
|
||||
field = ob.field
|
||||
|
||||
col = flow.column()
|
||||
col.prop(field, "radial_falloff", text="Power")
|
||||
col.prop(field, "radial_falloff", text="Power", text_ctxt=i18n_contexts.id_particlesettings)
|
||||
|
||||
col = flow.column()
|
||||
col.prop(field, "use_radial_min", text="Use Min Angle")
|
||||
@@ -305,7 +308,7 @@ class PHYSICS_PT_field_falloff_radial(PhysicButtonsPanel, Panel):
|
||||
field = ob.field
|
||||
|
||||
col = flow.column()
|
||||
col.prop(field, "radial_falloff", text="Power")
|
||||
col.prop(field, "radial_falloff", text="Power", text_ctxt=i18n_contexts.id_particlesettings)
|
||||
|
||||
col = flow.column()
|
||||
col.prop(field, "use_radial_min", text="Use Minimum")
|
||||
|
||||
@@ -99,7 +99,7 @@ def draw_color_balance(layout, color_balance):
|
||||
box = col.box()
|
||||
split = box.split(factor=0.35)
|
||||
col = split.column(align=True)
|
||||
col.label(text="Power")
|
||||
col.label(text="Power", text_ctxt=i18n_contexts.id_movieclip)
|
||||
col.separator()
|
||||
col.separator()
|
||||
col.prop(color_balance, "power", text="")
|
||||
|
||||
@@ -1652,6 +1652,7 @@ static void rna_def_constraint_size_like(BlenderRNA *brna)
|
||||
RNA_def_property_float_default(prop, 1.0f);
|
||||
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3);
|
||||
RNA_def_property_ui_text(prop, "Power", "Raise the target's scale to the specified power");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_CONSTRAINT);
|
||||
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_make_uniform", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
@@ -8422,6 +8422,7 @@ static void def_cmp_colorbalance(BlenderRNA * /*brna*/, StructRNA *srna)
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
|
||||
RNA_def_property_ui_text(prop, "Power", "Correction for midtones");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MOVIECLIP);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeColorBalance_update_cdl");
|
||||
|
||||
prop = RNA_def_property(srna, "slope", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLT_translation.hh"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_define.hh"
|
||||
#include "RNA_enum_types.hh"
|
||||
@@ -3186,6 +3188,7 @@ static void rna_def_property(BlenderRNA *brna)
|
||||
RNA_def_property_enum_items(prop, rna_enum_property_subtype_items);
|
||||
RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", nullptr, nullptr);
|
||||
RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UNIT);
|
||||
|
||||
prop = RNA_def_property(srna, "srna", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
@@ -3197,6 +3200,7 @@ static void rna_def_property(BlenderRNA *brna)
|
||||
prop = RNA_def_property(srna, "unit", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_enum_items(prop, rna_enum_property_unit_items);
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UNIT);
|
||||
RNA_def_property_enum_funcs(prop, "rna_Property_unit_get", nullptr, nullptr);
|
||||
RNA_def_property_ui_text(prop, "Unit", "Type of units for this property");
|
||||
|
||||
|
||||
@@ -1938,6 +1938,7 @@ static void rna_def_color_balance(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "power", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_ui_text(prop, "Power", "Correction for midtones");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MOVIECLIP);
|
||||
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
|
||||
RNA_def_property_float_default(prop, 1.0f);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
|
||||
|
||||
Reference in New Issue
Block a user