i18n: basically finish translation

This commit is contained in:
yyc12345 2025-01-20 22:38:29 +08:00
parent 5afbf679ed
commit 84f6baae6a
8 changed files with 341 additions and 503 deletions

View File

@ -244,13 +244,18 @@ class BBP_OT_add_bme_struct(bpy.types.Operator):
op_cfgs_visitor = UTIL_functions.CollectionVisitor(self.bme_struct_cfgs)
# visit cfgs cache list to show cfg
layout.label(text="Prototype Configurations", text_ctxt='BBP_OT_add_bme_struct/draw')
prototype_cfg_index: int = 0
for (cfg, cfg_index) in self.bme_struct_cfg_index_cache:
# create box for cfgs
box_layout: bpy.types.UILayout = layout.box()
# draw title and description first
box_layout.label(text=cfg.get_title()) # TODO: finish translation context
box_layout.label(text=cfg.get_desc())
# get prototype identifier name and showcase configuration index
# then increase the index.
prototype_ident: str = _g_EnumHelper_BmeStructType.get_selection(self.bme_struct_type)
box_layout.label(text=cfg.get_title(), text_ctxt=UTIL_translation.build_prototype_showcase_cfg_context(prototype_ident, prototype_cfg_index))
box_layout.label(text=cfg.get_desc(), text_ctxt=UTIL_translation.build_prototype_showcase_cfg_context(prototype_ident, prototype_cfg_index))
prototype_cfg_index += 1
# show prop differently by cfg type
match(cfg.get_type()):

View File

@ -246,9 +246,9 @@ class BBP_OT_add_component(bpy.types.Operator, ComponentSectorParam):
item_name: str = PROP_ballance_element.get_ballance_element_name(item)
cop = layout.operator(
BBP_OT_add_component.bl_idname, text = item_name,
BBP_OT_add_component.bl_idname,
text = item_name, text_ctxt = 'BBP_OT_add_component/property',
icon_value = UTIL_icons_manager.get_component_icon(item_name),
translate = False
)
cop.component_type = _g_EnumHelper_Component.to_selection(item)

View File

@ -35,7 +35,7 @@ class BBP_OT_export_virtools(bpy.types.Operator, UTIL_file_browser.ExportVirtool
# check whether encoding list is empty to avoid real stupid user.
encodings = self.general_get_vt_encodings(context)
if len(encodings) == 0:
self.report({'ERROR'}, 'You must specify at least one encoding for file saving (e.g. cp1252, gb2312)!')
self.report({'ERROR'}, 'You must specify at least one encoding for file saving (e.g. cp1252, gbk)!')
return {'CANCELLED'}
# start exporting

View File

@ -23,7 +23,7 @@ class BBP_OT_import_virtools(bpy.types.Operator, UTIL_file_browser.ImportVirtool
# check whether encoding list is empty to avoid real stupid user.
encodings = self.general_get_vt_encodings(context)
if len(encodings) == 0:
self.report({'ERROR'}, 'You must specify at least one encoding for file loading (e.g. cp1252, gb2312)!')
self.report({'ERROR'}, 'You must specify at least one encoding for file loading (e.g. cp1252, gbk)!')
return {'CANCELLED'}
_import_virtools(

View File

@ -82,6 +82,7 @@ def _rename_core(
reporter.leave_object(obj)
# report data
tr_text_title: str = bpy.app.translations.pgettext_rpt('Rename System Report', 'BBP/OP_OBJECT_naming_convention._rename_core()')
tr_text_1: str = bpy.app.translations.pgettext_rpt('View console to get more detail', 'BBP/OP_OBJECT_naming_convention._rename_core()')
tr_text_2: str = bpy.app.translations.pgettext_rpt('All: {0}', 'BBP/OP_OBJECT_naming_convention._rename_core()')
tr_text_3: str = bpy.app.translations.pgettext_rpt('Failed: {0}', 'BBP/OP_OBJECT_naming_convention._rename_core()')
@ -91,7 +92,7 @@ def _rename_core(
tr_text_2.format(reporter.get_all_objs_count()),
tr_text_3.format(reporter.get_failed_objs_count())
),
'Rename System Report',
tr_text_title,
UTIL_icons_manager.BlenderPresetIcons.Info.value
)

View File

@ -272,7 +272,7 @@ def virtools_name_regulator(name: str | None) -> str:
# Use universal encoding name (like Python).
g_PyBMapDefaultEncodings: tuple[str, ...] = (
'cp1252',
'gb2312'
'gbk'
)
#endregion

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,8 @@
本插件在制作过程中得到了来自ZZQ的许多建议这些建议所产生的功能比较杂乱因此在一个单独的页面中一起描述。
## 窥视并转换为网格
## 窥视归组并转换为网格
窥视并转换为网格其全称为窥视并复制曲线倒角物体的Virtools归组信息后再转换为网格。你可以选中一些物体后右键在物体上下文菜单中找到这一功能。
窥视归组并转换为网格其全称为窥视并复制曲线倒角物体的Virtools归组信息后再转换为网格。你可以选中一些物体后右键在物体上下文菜单中找到这一功能。
该功能正如其名,其将选中的物体转换为网格,如果选中的物体是曲线,且设置了倒角物体,则将倒角物体的归组信息赋予当前曲线(覆盖曲线当前归组设置)。如果选中的物体不是曲线,或者是曲线但没有倒角物体,那么该功能与执行转换为网格无异。该功能在放样建模时极为有用,因为只需要为截面物体进行正确的归组,然后再使用此功能将曲线转换为网格,就可以确保放样后的物体归组正确。