Skip to content

Commit

Permalink
lang: Update Chinese (Simplified) translations (#1894)
Browse files Browse the repository at this point in the history
Co-authored-by: JustFor <[email protected]>
  • Loading branch information
xtexChooser and zhongqingsong authored Sep 15, 2024
1 parent 2f60f61 commit 187d90e
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 243 deletions.
16 changes: 11 additions & 5 deletions dist/langtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,19 @@ def main():
key in lang_data["translations"]
and lang_data["translations"][key] != INVALID_TRANSLATION
)
if not has_translation and not (
(command == "retranslate" or command == "untranslate")
and re.compile(args.keys).fullmatch(key)
if (
has_translation
and not (
(command == "retranslate" or command == "untranslate")
and re.compile(args.keys).fullmatch(key)
)
and not command == "fmtzh"
):
continue
if command == "check":
print(
f"Error: Translation {lang_data['code']} is missing translation for key '{key}'"
)
exit(2)
elif (
command == "translate"
or command == "retranslate"
Expand All @@ -148,7 +151,10 @@ def main():
continue
reference_tranlsation = (
" '%s'" % reference_lang_data["translations"][key]
if reference_lang_data
if (
reference_lang_data
and key in reference_lang_data["translations"]
)
else ""
)
print(
Expand Down
473 changes: 245 additions & 228 deletions plugins/builtin/romfs/lang/zh_CN.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion plugins/diffing/romfs/lang/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"hex.diffing.view.diff.provider_b": "提供者B",
"hex.diffing.view.diff.removed": "移除",
"hex.diffing.view.diff.settings": "无可用设置",
"hex.diffing.view.diff.settings.no_settings": "无可用设置"
"hex.diffing.view.diff.settings.no_settings": "无可用设置",
"hex.diffing.view.diff.task.diffing": "对比数据……"
}
}
4 changes: 3 additions & 1 deletion plugins/script_loader/romfs/lang/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"translations": {
"hex.script_loader.menu.loading": "加载中……",
"hex.script_loader.menu.no_scripts": "空空如也",
"hex.script_loader.menu.run_script": "运行脚本……"
"hex.script_loader.menu.run_script": "运行脚本……",
"hex.script_loader.task.running": "运行脚本……",
"hex.script_loader.task.updating": "更新脚本……"
}
}
12 changes: 6 additions & 6 deletions plugins/ui/romfs/lang/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"hex.ui.common.little": "",
"hex.ui.common.little_endian": "小端序",
"hex.ui.common.load": "加载",
"hex.ui.common.loading": "加载……",
"hex.ui.common.loading": "加载中……",
"hex.ui.common.match_selection": "匹配选择",
"hex.ui.common.name": "名称",
"hex.ui.common.no": "",
Expand All @@ -53,7 +53,7 @@
"hex.ui.common.open": "打开",
"hex.ui.common.path": "路径",
"hex.ui.common.percentage": "百分比",
"hex.ui.common.processing": "处理",
"hex.ui.common.processing": "处理中……",
"hex.ui.common.project": "项目",
"hex.ui.common.question": "问题",
"hex.ui.common.range": "范围",
Expand Down Expand Up @@ -86,20 +86,20 @@
"hex.ui.diagram.byte_type_distribution.plain_text": "纯文本",
"hex.ui.diagram.byte_type_distribution.similar_bytes": "类似字节",
"hex.ui.hex_editor.ascii_view": "显示 ASCII 栏",
"hex.ui.hex_editor.columns": "",
"hex.ui.hex_editor.custom_encoding_view": "显示高级解码栏",
"hex.ui.hex_editor.data_cell_options": "数据单元选项",
"hex.ui.hex_editor.data_size": "数据大小",
"hex.ui.hex_editor.gray_out_zero": "显示零字节为灰色",
"hex.ui.hex_editor.human_readable_units_footer": "将数据转换为人类可读的单位",
"hex.ui.hex_editor.minimap": "小地图",
"hex.ui.hex_editor.minimap": "小地图\n(右键查看设置)",
"hex.ui.hex_editor.minimap.width": "宽度",
"hex.ui.hex_editor.no_bytes": "没有可显示的字节",
"hex.ui.hex_editor.page": "分页",
"hex.ui.hex_editor.region": "范围",
"hex.ui.hex_editor.selection": "选区",
"hex.ui.hex_editor.selection.none": "未选中",
"hex.ui.hex_editor.uppercase_hex": "大写十六进制",
"hex.ui.hex_editor.visualizer": "数据处理器的数据可视化格式",
"hex.ui.hex_editor.visualizer": "数据可视化器",
"hex.ui.pattern_drawer.color": "颜色",
"hex.ui.pattern_drawer.comment": "注释",
"hex.ui.pattern_drawer.double_click": "双击查看更多",
Expand All @@ -117,7 +117,7 @@
"hex.ui.pattern_drawer.updating": "更新模式中……",
"hex.ui.pattern_drawer.value": "",
"hex.ui.pattern_drawer.var_name": "名称",
"hex.ui.pattern_drawer.visualizer.invalid_parameter_count": "无效参数数",
"hex.ui.pattern_drawer.visualizer.invalid_parameter_count": "无效的参数个数",
"hex.ui.pattern_drawer.visualizer.unknown": "未知可视化器"
}
}
3 changes: 2 additions & 1 deletion plugins/visualizers/romfs/lang/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"hex.visualizers.pl_visualizer.coordinates.longitude": "精度",
"hex.visualizers.pl_visualizer.coordinates.query": "查找地址",
"hex.visualizers.pl_visualizer.coordinates.querying": "正在查找地址……",
"hex.visualizers.pl_visualizer.coordinates.querying_no_address": "找不到地址"
"hex.visualizers.pl_visualizer.coordinates.querying_no_address": "找不到地址",
"hex.visualizers.pl_visualizer.task.visualizing": "可视化数据……"
}
}
3 changes: 2 additions & 1 deletion plugins/windows/romfs/lang/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"hex.windows.view.tty_console.send_eot": "发送 EOT",
"hex.windows.view.tty_console.send_etx": "发送 ETX",
"hex.windows.view.tty_console.send_sub": "发送 SUB",
"hex.windows.view.tty_console.stop_bits": "终止位"
"hex.windows.view.tty_console.stop_bits": "终止位",
"hex.windows.view.tty_console.task.transmitting": "传输数据中……"
}
}

0 comments on commit 187d90e

Please sign in to comment.