i18n: update i18n

- update i18n template and translation.
- fix lost translation context in code.
This commit is contained in:
2025-08-26 21:54:32 +08:00
parent 33fb1a65d3
commit 9e83fe0a10
4 changed files with 1899 additions and 1564 deletions

View File

@ -50,7 +50,8 @@ class BBP_OT_game_resolution(bpy.types.Operator):
name = "Resolution Kind", name = "Resolution Kind",
description = "The type of preset resolution.", description = "The type of preset resolution.",
items = _g_EnumHelper_ResolutionKind.generate_items(), items = _g_EnumHelper_ResolutionKind.generate_items(),
default = _g_EnumHelper_ResolutionKind.to_selection(ResolutionKind.Normal) default = _g_EnumHelper_ResolutionKind.to_selection(ResolutionKind.Normal),
translation_context = 'BBP_OT_game_resolution/property'
) # type: ignore ) # type: ignore
def invoke(self, context, event): def invoke(self, context, event):
@ -185,37 +186,42 @@ class BBP_OT_game_camera(bpy.types.Operator):
name = "Target Kind", name = "Target Kind",
description = "", description = "",
items = _g_EnumHelper_TargetKind.generate_items(), items = _g_EnumHelper_TargetKind.generate_items(),
default = _g_EnumHelper_TargetKind.to_selection(TargetKind.Cursor) default = _g_EnumHelper_TargetKind.to_selection(TargetKind.Cursor),
translation_context = 'BBP_OT_game_camera/property'
) # type: ignore ) # type: ignore
rotation_kind: bpy.props.EnumProperty( rotation_kind: bpy.props.EnumProperty(
name = "Rotation Angle Kind", name = "Rotation Angle Kind",
description = "", description = "",
items = _g_EnumHelper_RotationKind.generate_items(), items = _g_EnumHelper_RotationKind.generate_items(),
default = _g_EnumHelper_RotationKind.to_selection(RotationKind.Preset) default = _g_EnumHelper_RotationKind.to_selection(RotationKind.Preset),
translation_context = 'BBP_OT_game_camera/property'
) # type: ignore ) # type: ignore
preset_rotation_angle: bpy.props.EnumProperty( preset_rotation_angle: bpy.props.EnumProperty(
name = "Preset Rotation Angle", name = "Preset Rotation Angle",
description = "", description = "",
items = _g_EnumHelper_RotationAngle.generate_items(), items = _g_EnumHelper_RotationAngle.generate_items(),
default = _g_EnumHelper_RotationAngle.to_selection(RotationAngle.Deg0) default = _g_EnumHelper_RotationAngle.to_selection(RotationAngle.Deg0),
translation_context = 'BBP_OT_game_camera/property'
) # type: ignore ) # type: ignore
custom_rotation_angle: bpy.props.FloatProperty( custom_rotation_angle: bpy.props.FloatProperty(
name = "Custom Rotation Angle", name = "Custom Rotation Angle",
description = "The rotation angle of camera relative to 3D Cursor", description = "The rotation angle of camera relative to 3D Cursor or Active Object",
subtype = 'ANGLE', subtype = 'ANGLE',
min = 0, max = math.radians(360), min = 0, max = math.radians(360),
step = 100, step = 100,
# MARK: What the fuck of the precision? # MARK: What the fuck of the precision?
# I set it to 2 but it doesn't work so I forcely set it to 100. # I set it to 2 but it doesn't work so I forcely set it to 100.
precision = 100, precision = 100,
translation_context = 'BBP_OT_game_camera/property'
) # type: ignore ) # type: ignore
perspective_kind: bpy.props.EnumProperty( perspective_kind: bpy.props.EnumProperty(
name = "Rotation Angle Kind", name = "Rotation Angle Kind",
description = "", description = "",
items = _g_EnumHelper_PerspectiveKind.generate_items(), items = _g_EnumHelper_PerspectiveKind.generate_items(),
default = _g_EnumHelper_PerspectiveKind.to_selection(PerspectiveKind.Ordinary) default = _g_EnumHelper_PerspectiveKind.to_selection(PerspectiveKind.Ordinary),
translation_context = 'BBP_OT_game_camera/property'
) # type: ignore ) # type: ignore
@classmethod @classmethod

View File

@ -954,6 +954,7 @@ class BBP_OT_preset_virtools_material(bpy.types.Operator):
name = "Preset", name = "Preset",
description = "The preset which you want to apply.", description = "The preset which you want to apply.",
items = _g_Helper_MtlPreset.generate_items(), items = _g_Helper_MtlPreset.generate_items(),
translation_context = 'BBP_OT_preset_virtools_material/property'
) # type: ignore ) # type: ignore
@classmethod @classmethod

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff