#!/usr/bin/env python3 """Generate Chinese Simplified (zh) translations for ObsidianDragon wallet.""" import json, os translations = { "24h_change": "24小时变化", "24h_volume": "24小时交易量", "about": "关于", "about_block_explorer": "区块浏览器", "about_block_height": "区块高度:", "about_build_date": "构建日期:", "about_build_type": "构建类型:", "about_chain": "链:", "about_connections": "连接数:", "about_credits": "致谢", "about_daemon": "守护进程:", "about_debug": "调试", "about_dragonx": "关于 ObsidianDragon", "about_edition": "ImGui 版本", "about_github": "GitHub", "about_imgui": "ImGui:", "about_license": "许可证", "about_license_text": "本软件根据 GNU 通用公共许可证 v3 (GPLv3) 发布。您可以根据许可证条款自由使用、修改和分发本软件。", "about_peers_count": "%zu 个节点", "about_release": "发布版", "about_title": "关于 ObsidianDragon", "about_version": "版本:", "about_website": "网站", "acrylic": "亚克力", "add": "添加", "address": "地址", "address_book_add": "添加地址", "address_book_add_new": "添加新地址", "address_book_added": "地址已添加到通讯录", "address_book_count": "已保存 %zu 个地址", "address_book_deleted": "条目已删除", "address_book_edit": "编辑地址", "address_book_empty": "没有保存的地址。点击'添加新地址'创建一个。", "address_book_exists": "地址已存在于通讯录中", "address_book_title": "地址簿", "address_book_update_failed": "更新失败——地址可能重复", "address_book_updated": "地址已更新", "address_copied": "地址已复制到剪贴板", "address_details": "地址详情", "address_label": "地址:", "address_upper": "地址", "address_url": "地址 URL", "addresses_appear_here": "连接后,您的接收地址将显示在此处。", "advanced": "高级", "all_filter": "全部", "allow_custom_fees": "允许自定义手续费", "amount": "金额", "amount_details": "金额详情", "amount_exceeds_balance": "金额超过余额", "amount_label": "金额:", "appearance": "外观", "auto_shield": "自动屏蔽挖矿", "available": "可用", "backup_backing_up": "正在备份...", "backup_create": "创建备份", "backup_created": "钱包备份已创建", "backup_data": "备份与数据", "backup_description": "创建 wallet.dat 文件的备份。此文件包含您所有的私钥和交易历史。请将备份存放在安全的地方。", "backup_destination": "备份目标:", "backup_tip_external": "将备份存储在外部驱动器或云存储中", "backup_tip_multiple": "在不同位置创建多个备份", "backup_tip_test": "定期测试从备份恢复", "backup_tips": "提示:", "backup_title": "备份钱包", "backup_wallet": "备份钱包...", "backup_wallet_not_found": "警告:在预期位置未找到 wallet.dat", "balance": "余额", "balance_layout": "余额布局", "ban": "封禁", "banned_peers": "已封禁节点", "block": "区块", "block_bits": "比特:", "block_click_next": "点击查看下一个区块", "block_click_prev": "点击查看上一个区块", "block_explorer": "区块浏览器", "block_get_info": "获取区块信息", "block_hash": "区块哈希:", "block_height": "区块高度:", "block_info_title": "区块信息", "block_merkle_root": "默克尔根:", "block_nav_next": "下一个 >>", "block_nav_prev": "<< 上一个", "block_next": "下一个区块:", "block_previous": "上一个区块:", "block_size": "大小:", "block_timestamp": "时间戳:", "block_transactions": "交易:", "blockchain_syncing": "区块链同步中 (%.1f%%)... 余额可能不准确。", "cancel": "取消", "characters": "字符", "clear": "清除", "clear_all_bans": "解除所有封禁", "clear_form_confirm": "清除所有表单字段?", "clear_request": "清除请求", "click_copy_address": "点击复制地址", "click_copy_uri": "点击复制 URI", "close": "关闭", "conf_count": "%d 确认", "confirm_and_send": "确认并发送", "confirm_send": "确认发送", "confirm_transaction": "确认交易", "confirmations": "确认数", "confirmations_display": "%d 次确认 | %s", "confirmed": "已确认", "connected": "已连接", "connected_peers": "已连接节点", "connecting": "连接中...", "console": "控制台", "console_auto_scroll": "自动滚动", "console_available_commands": "可用命令:", "console_capturing_output": "正在捕获守护进程输出...", "console_clear": "清除", "console_clear_console": "清除控制台", "console_cleared": "控制台已清除", "console_click_commands": "点击上方命令以插入", "console_click_insert": "点击插入", "console_click_insert_params": "点击插入(含参数)", "console_close": "关闭", "console_commands": "命令", "console_common_rpc": "常用 RPC 命令:", "console_completions": "补全:", "console_connected": "已连接到守护进程", "console_copy_all": "全部复制", "console_copy_selected": "复制", "console_daemon": "守护进程", "console_daemon_error": "守护进程错误!", "console_daemon_started": "守护进程已启动", "console_daemon_stopped": "守护进程已停止", "console_disconnected": "已断开与守护进程的连接", "console_errors": "错误", "console_filter_hint": "过滤输出...", "console_help_clear": " clear - 清除控制台", "console_help_getbalance": " getbalance - 显示透明余额", "console_help_getblockcount": " getblockcount - 显示当前区块高度", "console_help_getinfo": " getinfo - 显示节点信息", "console_help_getmininginfo": " getmininginfo - 显示挖矿状态", "console_help_getpeerinfo": " getpeerinfo - 显示已连接节点", "console_help_gettotalbalance": " gettotalbalance - 显示总余额", "console_help_help": " help - 显示此帮助信息", "console_help_setgenerate": " setgenerate - 控制挖矿", "console_help_stop": " stop - 停止守护进程", "console_line_count": "%zu 行", "console_new_lines": "%d 新行", "console_no_daemon": "无守护进程", "console_not_connected": "错误:未连接到守护进程", "console_rpc_reference": "RPC 命令参考", "console_scanline": "控制台扫描线", "console_search_commands": "搜索命令...", "console_select_all": "全选", "console_show_daemon_output": "显示守护进程输出", "console_show_errors_only": "仅显示错误", "console_show_rpc_ref": "显示 RPC 命令参考", "console_showing_lines": "显示 %zu / %zu 行", "console_starting_node": "正在启动节点...", "console_status_error": "错误", "console_status_running": "运行中", "console_status_starting": "启动中", "console_status_stopped": "已停止", "console_status_stopping": "停止中", "console_status_unknown": "未知", "console_tab_completion": "Tab 补全", "console_type_help": "输入 'help' 查看可用命令", "console_welcome": "欢迎使用 ObsidianDragon 控制台", "console_zoom_in": "放大", "console_zoom_out": "缩小", "copy": "复制", "copy_address": "复制完整地址", "copy_error": "复制错误", "copy_to_clipboard": "复制到剪贴板", "copy_txid": "复制交易ID", "copy_uri": "复制 URI", "current_price": "当前价格", "custom_fees": "自定义手续费", "dark": "深色", "date": "日期", "date_label": "日期:", "delete": "删除", "difficulty": "难度", "disconnected": "已断开", "dismiss": "关闭", "display": "显示", "dragonx_green": "DragonX(绿色)", "edit": "编辑", "error": "错误", "est_time_to_block": "预计出块时间", "exit": "退出", "explorer": "浏览器", "export": "导出", "export_csv": "导出 CSV", "export_keys_btn": "导出密钥", "export_keys_danger": "危险:这将导出您钱包中的所有私钥!任何获得此文件的人都可以窃取您的资金。请安全保管并在使用后删除。", "export_keys_include_t": "包含 T 地址(透明)", "export_keys_include_z": "包含 Z 地址(屏蔽)", "export_keys_options": "导出选项:", "export_keys_success": "密钥导出成功", "export_keys_title": "导出所有私钥", "export_private_key": "导出私钥", "export_tx_count": "导出 %zu 笔交易到 CSV 文件。", "export_tx_file_fail": "无法创建 CSV 文件", "export_tx_none": "没有交易可导出", "export_tx_success": "交易导出成功", "export_tx_title": "导出交易到 CSV", "export_viewing_key": "导出查看密钥", "failed_create_shielded": "无法创建屏蔽地址", "failed_create_transparent": "无法创建透明地址", "fee": "手续费", "fee_high": "高", "fee_label": "手续费:", "fee_low": "低", "fee_normal": "普通", "fetch_prices": "获取价格", "file": "文件", "file_save_location": "文件将保存至:~/.config/ObsidianDragon/", "font_scale": "字体大小", "from": "从", "from_upper": "从", "full_details": "完整详情", "general": "常规", "go_to_receive": "前往接收", "height": "高度", "help": "帮助", "hide": "隐藏", "history": "历史", "immature_type": "未成熟", "import": "导入", "import_key_btn": "导入密钥", "import_key_formats": "支持的密钥格式:", "import_key_full_rescan": "(0 = 完整重扫)", "import_key_label": "私钥:", "import_key_no_valid": "输入中未找到有效密钥", "import_key_rescan": "导入后重新扫描区块链", "import_key_start_height": "起始高度:", "import_key_success": "密钥导入成功", "import_key_t_format": "T 地址 WIF 私钥", "import_key_title": "导入私钥", "import_key_tooltip": "输入一个或多个私钥,每行一个。\n支持 z 地址和 t 地址密钥。\n以 # 开头的行视为注释。", "import_key_warning": "警告:切勿分享您的私钥!从不可信来源导入密钥可能会危及您的钱包安全。", "import_key_z_format": "Z 地址花费密钥 (secret-extended-key-...)", "import_private_key": "导入私钥...", "invalid_address": "无效的地址格式", "ip_address": "IP 地址", "keep": "保留", "keep_daemon": "保持守护进程运行", "key_export_fetching": "正在从钱包获取密钥...", "key_export_private_key": "私钥:", "key_export_private_warning": "请保密此密钥!任何拥有此密钥的人都可以花费您的资金。切勿在网上或与不可信的人分享。", "key_export_reveal": "显示密钥", "key_export_viewing_key": "查看密钥:", "key_export_viewing_warning": "此查看密钥允许他人查看您的入账交易和余额,但不能花费您的资金。仅与信任的人分享。", "label": "标签:", "language": "语言", "light": "浅色", "loading": "加载中...", "loading_addresses": "正在加载地址...", "local_hashrate": "本地算力", "low_spec_mode": "低配模式", "market": "市场", "market_12h": "12小时", "market_18h": "18小时", "market_24h": "24小时", "market_24h_volume": "24小时交易量", "market_6h": "6小时", "market_attribution": "价格数据来自 NonKYC", "market_btc_price": "BTC 价格", "market_cap": "市值", "market_no_history": "无价格历史", "market_no_price": "无价格数据", "market_now": "现在", "market_pct_shielded": "%.0f%% 屏蔽", "market_portfolio": "投资组合", "market_price_unavailable": "价格数据不可用", "market_refresh_price": "刷新价格数据", "market_trade_on": "在 %s 交易", "mature": "已成熟", "max": "最大", "memo": "备注(可选,加密)", "memo_label": "备注:", "memo_optional": "备注(可选)", "memo_upper": "备注", "memo_z_only": "注意:备注仅在发送到屏蔽 (z) 地址时可用", "merge_description": "将多个 UTXO 合并到一个屏蔽地址。这可以帮助减小钱包大小并提高隐私性。", "merge_funds": "合并资金", "merge_started": "合并操作已开始", "merge_title": "合并到地址", "mine_when_idle": "空闲时挖矿", "mined": "已挖得", "mined_filter": "已挖得", "mined_type": "已挖得", "mined_upper": "已挖得", "miner_fee": "矿工费", "mining": "挖矿", "mining_active": "活跃", "mining_address_copied": "挖矿地址已复制", "mining_all_time": "所有时间", "mining_already_saved": "矿池 URL 已保存", "mining_block_copied": "区块哈希已复制", "mining_chart_1m_ago": "1分钟前", "mining_chart_5m_ago": "5分钟前", "mining_chart_now": "现在", "mining_chart_start": "开始", "mining_click": "点击", "mining_click_copy_address": "点击复制地址", "mining_click_copy_block": "点击复制区块哈希", "mining_click_copy_difficulty": "点击复制难度", "mining_connected": "已连接", "mining_connecting": "连接中...", "mining_control": "挖矿控制", "mining_difficulty_copied": "难度已复制", "mining_est_block": "预计区块", "mining_est_daily": "预计日收益", "mining_filter_all": "全部", "mining_filter_tip_all": "显示所有收益", "mining_filter_tip_pool": "仅显示矿池收益", "mining_filter_tip_solo": "仅显示单人收益", "mining_idle_off_tooltip": "启用空闲挖矿", "mining_idle_on_tooltip": "禁用空闲挖矿", "mining_local_hashrate": "本地算力", "mining_mine": "挖矿", "mining_mining_addr": "挖矿地址", "mining_network": "网络", "mining_no_blocks_yet": "尚未找到区块", "mining_no_payouts_yet": "尚无矿池支付", "mining_no_saved_addresses": "没有保存的地址", "mining_no_saved_pools": "没有保存的矿池", "mining_off": "挖矿已关闭", "mining_on": "挖矿已开启", "mining_open_in_explorer": "在浏览器中打开", "mining_payout_address": "支付地址", "mining_payout_tooltip": "接收挖矿奖励的地址", "mining_pool": "矿池", "mining_pool_hashrate": "矿池算力", "mining_pool_url": "矿池 URL", "mining_recent_blocks": "最近区块", "mining_recent_payouts": "最近矿池支付", "mining_remove": "移除", "mining_reset_defaults": "重置默认值", "mining_save_payout_address": "保存支付地址", "mining_save_pool_url": "保存矿池 URL", "mining_saved_addresses": "已保存地址:", "mining_saved_pools": "已保存矿池:", "mining_shares": "份额", "mining_show_chart": "图表", "mining_show_log": "日志", "mining_solo": "单人", "mining_starting": "启动中...", "mining_starting_tooltip": "矿工正在启动...", "mining_statistics": "挖矿统计", "mining_stop": "停止", "mining_stop_solo_for_pool": "启动矿池挖矿前请先停止单人挖矿", "mining_stop_solo_for_pool_settings": "请停止单人挖矿以更改矿池设置", "mining_stopping": "停止中...", "mining_stopping_tooltip": "矿工正在停止...", "mining_syncing_tooltip": "区块链同步中...", "mining_threads": "挖矿线程", "mining_to_save": "保存", "mining_today": "今天", "mining_uptime": "运行时间", "mining_yesterday": "昨天", "network": "网络", "network_fee": "网络手续费", "network_hashrate": "全网算力", "new": "+ 新建", "new_shielded_created": "新屏蔽地址已创建", "new_t_address": "新 T 地址", "new_t_transparent": "新 t 地址(透明)", "new_transparent_created": "新透明地址已创建", "new_z_address": "新 Z 地址", "new_z_shielded": "新 z 地址(屏蔽)", "no_addresses": "未找到地址。请使用上方按钮创建一个。", "no_addresses_available": "无可用地址", "no_addresses_match": "没有匹配过滤器的地址", "no_addresses_with_balance": "没有有余额的地址", "no_matching": "没有匹配的交易", "no_recent_receives": "没有最近的接收", "no_recent_sends": "没有最近的发送", "no_transactions": "未找到交易", "node": "节点", "node_security": "节点与安全", "noise": "噪点", "not_connected": "未连接到守护进程...", "not_connected_to_daemon": "未连接到守护进程", "notes": "备注", "notes_optional": "备注(可选):", "output_filename": "输出文件名:", "overview": "概览", "paste": "粘贴", "paste_from_clipboard": "从剪贴板粘贴", "pay_from": "付款来源", "payment_request": "付款请求", "payment_request_copied": "付款请求已复制", "payment_uri_copied": "付款 URI 已复制", "peers": "节点", "peers_avg_ping": "平均延迟", "peers_ban_24h": "封禁节点 24 小时", "peers_ban_score": "封禁评分:%d", "peers_banned": "已封禁", "peers_banned_count": "已封禁:%d", "peers_best_block": "最佳区块", "peers_blockchain": "区块链", "peers_blocks": "区块", "peers_blocks_left": "剩余 %d 个区块", "peers_clear_all_bans": "解除所有封禁", "peers_click_copy": "点击复制", "peers_connected": "已连接", "peers_connected_count": "已连接:%d", "peers_copy_ip": "复制 IP", "peers_dir_in": "入", "peers_dir_out": "出", "peers_hash_copied": "哈希已复制", "peers_hashrate": "算力", "peers_in_out": "入/出", "peers_longest": "最长", "peers_longest_chain": "最长链", "peers_memory": "内存", "peers_no_banned": "无已封禁节点", "peers_no_connected": "无已连接节点", "peers_no_tls": "无 TLS", "peers_notarized": "已公证", "peers_p2p_port": "P2P 端口", "peers_protocol": "协议", "peers_received": "已接收", "peers_refresh": "刷新", "peers_refresh_tooltip": "刷新节点列表", "peers_refreshing": "刷新中...", "peers_sent": "已发送", "peers_tt_id": "ID:%d", "peers_tt_received": "已接收:%s", "peers_tt_sent": "已发送:%s", "peers_tt_services": "服务:%s", "peers_tt_start_height": "起始高度:%d", "peers_tt_synced": "已同步 H/B:%d/%d", "peers_tt_tls_cipher": "TLS:%s", "peers_unban": "解除封禁", "peers_upper": "节点", "peers_version": "版本", "pending": "待处理", "ping": "延迟", "price_chart": "价格图表", "qr_code": "二维码", "qr_failed": "无法生成二维码", "qr_title": "二维码", "qr_unavailable": "二维码不可用", "receive": "接收", "received": "已接收", "received_filter": "已接收", "received_label": "已接收", "received_upper": "已接收", "receiving_addresses": "您的接收地址", "recent_received": "最近接收", "recent_sends": "最近发送", "recipient": "收款方", "recv_type": "接收", "refresh": "刷新", "refresh_now": "立即刷新", "report_bug": "报告错误", "request_amount": "金额(可选):", "request_copy_uri": "复制 URI", "request_description": "生成一个付款请求,他人可以扫描或复制。二维码包含您的地址和可选的金额/备注。", "request_label": "标签(可选):", "request_memo": "备注(可选):", "request_payment": "请求付款", "request_payment_uri": "付款 URI:", "request_receive_address": "接收地址:", "request_select_address": "选择地址...", "request_shielded_addrs": "-- 屏蔽地址 --", "request_title": "请求付款", "request_transparent_addrs": "-- 透明地址 --", "request_uri_copied": "付款 URI 已复制到剪贴板", "rescan": "重新扫描", "reset_to_defaults": "重置为默认值", "review_send": "审核发送", "rpc_host": "RPC 主机", "rpc_pass": "密码", "rpc_port": "端口", "rpc_user": "用户名", "save": "保存", "save_settings": "保存设置", "save_z_transactions": "将 Z 交易保存到列表", "search_placeholder": "搜索...", "security": "安全", "select_address": "选择地址...", "select_receiving_address": "选择接收地址...", "select_source_address": "选择来源地址...", "send": "发送", "send_amount": "金额", "send_amount_details": "金额详情", "send_amount_upper": "金额", "send_clear_fields": "清除所有表单字段?", "send_copy_error": "复制错误", "send_dismiss": "关闭", "send_error_copied": "错误已复制到剪贴板", "send_error_prefix": "错误:%s", "send_exceeds_available": "超过可用额 (%.8f)", "send_fee": "手续费", "send_fee_high": "高", "send_fee_low": "低", "send_fee_normal": "普通", "send_form_restored": "表单已恢复", "send_from_this_address": "从此地址发送", "send_go_to_receive": "前往接收", "send_keep": "保留", "send_network_fee": "网络手续费", "send_no_balance": "无余额", "send_no_recent": "没有最近的发送", "send_recent_sends": "最近发送", "send_recipient": "收款方", "send_select_source": "选择来源地址...", "send_sending_from": "发送来源", "send_submitting": "正在提交交易...", "send_switch_to_receive": "切换到接收页面获取您的地址并开始接收资金。", "send_to": "发送至", "send_tooltip_enter_amount": "请输入发送金额", "send_tooltip_exceeds_balance": "金额超过可用余额", "send_tooltip_in_progress": "交易正在进行中", "send_tooltip_invalid_address": "请输入有效的收款地址", "send_tooltip_not_connected": "未连接到守护进程", "send_tooltip_select_source": "请先选择来源地址", "send_tooltip_syncing": "请等待区块链同步", "send_total": "合计", "send_transaction": "发送交易", "send_tx_failed": "交易失败", "send_tx_sent": "交易已发送!", "send_tx_success": "交易发送成功!", "send_txid_copied": "交易ID 已复制到剪贴板", "send_txid_label": "TxID:%s", "send_valid_shielded": "有效的屏蔽地址", "send_valid_transparent": "有效的透明地址", "send_wallet_empty": "您的钱包是空的", "send_yes_clear": "是,清除", "sending": "正在发送交易", "sending_from": "发送来源", "sent": "已发送", "sent_filter": "已发送", "sent_type": "已发送", "sent_upper": "已发送", "settings": "设置", "setup_wizard": "设置向导", "share": "分享", "shield_check_status": "检查状态", "shield_completed": "操作成功完成!", "shield_description": "通过将透明地址的 coinbase 输出发送到屏蔽地址来屏蔽您的挖矿奖励。这可以隐藏您的挖矿收入,提高隐私性。", "shield_from_address": "从地址:", "shield_funds": "屏蔽资金", "shield_in_progress": "操作进行中...", "shield_max_utxos": "每次操作最大 UTXO 数", "shield_merge_done": "屏蔽/合并完成!", "shield_select_z": "选择 z 地址...", "shield_started": "屏蔽操作已开始", "shield_title": "屏蔽 Coinbase 奖励", "shield_to_address": "至地址(屏蔽):", "shield_utxo_limit": "UTXO 限制:", "shield_wildcard_hint": "使用 '*' 从所有透明地址屏蔽", "shielded": "屏蔽", "shielded_to": "屏蔽至", "shielded_type": "屏蔽", "show": "显示", "show_qr_code": "显示二维码", "showing_transactions": "显示第 %d\xe2\x80\x93%d 笔,共 %d 笔交易(总计:%zu)", "simple_background": "简单背景", "start_mining": "开始挖矿", "status": "状态", "stop_external": "停止外部守护进程", "stop_mining": "停止挖矿", "submitting_transaction": "正在提交交易...", "success": "成功", "summary": "摘要", "syncing": "同步中...", "t_addresses": "T 地址", "test_connection": "测试", "theme": "主题", "theme_effects": "主题效果", "time_days_ago": "%d 天前", "time_hours_ago": "%d 小时前", "time_minutes_ago": "%d 分钟前", "time_seconds_ago": "%d 秒前", "to": "至", "to_upper": "至", "tools": "工具", "total": "合计", "transaction_id": "交易 ID", "transaction_sent": "交易发送成功", "transaction_sent_msg": "交易已发送!", "transaction_url": "交易 URL", "transactions": "交易", "transactions_upper": "交易", "transparent": "透明", "tx_confirmations": "%d 次确认", "tx_details_title": "交易详情", "tx_from_address": "发送地址:", "tx_id_label": "交易 ID:", "tx_immature": "未成熟", "tx_mined": "已挖得", "tx_received": "已接收", "tx_sent": "已发送", "tx_to_address": "接收地址:", "tx_view_explorer": "在浏览器中查看", "txs_count": "%d 笔交易", "type": "类型", "ui_opacity": "界面透明度", "unban": "解除封禁", "unconfirmed": "未确认", "undo_clear": "撤销清除", "unknown": "未知", "use_embedded_daemon": "使用内置 dragonxd", "use_tor": "使用 Tor", "validate_btn": "验证", "validate_description": "输入一个 DragonX 地址来检查它是否有效以及是否属于此钱包。", "validate_invalid": "无效", "validate_is_mine": "此钱包拥有该地址", "validate_not_mine": "不属于此钱包", "validate_ownership": "所有权:", "validate_results": "结果:", "validate_shielded_type": "屏蔽(z 地址)", "validate_status": "状态:", "validate_title": "验证地址", "validate_transparent_type": "透明(t 地址)", "validate_type": "类型:", "validate_valid": "有效", "validating": "验证中...", "verbose_logging": "详细日志", "version": "版本", "view": "查看", "view_details": "查看详情", "view_on_explorer": "在浏览器中查看", "waiting_for_daemon": "等待守护进程连接...", "wallet": "钱包", "wallet_empty": "您的钱包是空的", "wallet_empty_hint": "切换到接收页面获取您的地址并开始接收资金。", "warning": "警告", "warning_upper": "警告!", "website": "网站", "window_opacity": "窗口透明度", "yes_clear": "是,清除", "your_addresses": "您的地址", "z_addresses": "Z 地址", } out = os.path.join(os.path.dirname(__file__), "..", "res", "lang", "zh.json") with open(out, "w", encoding="utf-8") as f: json.dump(translations, f, indent=4, ensure_ascii=False, sort_keys=True) print(f"Wrote {len(translations)} Chinese translations to {os.path.abspath(out)}")