Skip to content

Commit

Permalink
Add context to translation
Browse files Browse the repository at this point in the history
  • Loading branch information
UuuNyaa committed Oct 15, 2021
1 parent 8916012 commit d63c1d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions mmd_uuunyaa_tools/checkers/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def check_meshes_use_auto_smooth(cls, _context) -> CheckResult:
return CheckResult(
_('Meshes Use Auto Smooth'),
CheckResultStatus.GOOD if use_auto_smooth_mesh_count == 0 else CheckResultStatus.WARNING,
use_auto_smooth_mesh_count * 0.7,
min(use_auto_smooth_mesh_count * 0.7, 3),
f'{use_auto_smooth_mesh_count} / {mesh_count}',
_('= 0 is Good'),
editable=False
Expand Down Expand Up @@ -488,7 +488,7 @@ def check_materials_method(cls, _context) -> CheckResult:
return CheckResult(
_('Materials Use Alpha Hashed'),
CheckResultStatus.GOOD if alpha_hashed_material_count == 0 else CheckResultStatus.WARNING,
alpha_hashed_material_count * 0.4,
min(alpha_hashed_material_count * 0.4, 2),
f'{alpha_hashed_material_count} / {material_count}',
_('= 0 is Good'),
editable=False
Expand Down Expand Up @@ -568,7 +568,7 @@ def draw_check_result(layout: bpy.types.UILayout, result: CheckResult):
row.label(text='')

row = row.split(factor=0.15, align=True)
row.label(text=result.status.value, icon=result.icon)
row.label(text=result.status.value, text_ctxt='Status', icon=result.icon)
row = row.split(factor=0.75, align=True)
if result.editable:
data, property_name = self.resolve_data_path(context, result.data_path)
Expand Down
12 changes: 6 additions & 6 deletions mmd_uuunyaa_tools/m17n.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,17 +963,17 @@ def unregister():
#: mmd_uuunyaa_tools/asset_search/panels.py:489
("Operator", "Update Assets JSON by query"): "通过查询更新资产JSON",
#: mmd_uuunyaa_tools/checkers/operators.py:15
("*", "Good"): "良好",
("Status", "Good"): "良好",
#: mmd_uuunyaa_tools/checkers/operators.py:16
("*", "Average"): "平均",
("Status", "Average"): "平均",
#: mmd_uuunyaa_tools/checkers/operators.py:17
("*", "Warning"): "警告",
("Status", "Warning"): "警告",
#: mmd_uuunyaa_tools/checkers/operators.py:18
("*", "Poor"): "不好",
("Status", "Poor"): "不好",
#: mmd_uuunyaa_tools/checkers/operators.py:19
("*", "Bad"): "不良",
("Status", "Bad"): "不良",
#: mmd_uuunyaa_tools/checkers/operators.py:20
("*", "Unknown"): "未知",
("Status", "Unknown"): "未知",
#: mmd_uuunyaa_tools/checkers/operators.py:52
("Operator", "Check Eevee Rendering Performance"): "检查Eevee的渲染性能",
#: mmd_uuunyaa_tools/checkers/operators.py:64
Expand Down

0 comments on commit d63c1d1

Please sign in to comment.