Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![uk](https://img.shields.io/badge/українська-blue.svg)](https://github.com/PanVena/SteamAchievementLocalizer/blob/main/readmes/README.uk.md)
[![pl](https://img.shields.io/badge/polski-green.svg)](https://github.com/PanVena/SteamAchievementLocalizer/blob/main/readmes/README.pl.md)

[![zh](https://img.shields.io/badge/中文-red.svg)](https://github.com/PanVena/SteamAchievementLocalizer/blob/main/readmes/README.zh.md)

<h1 align="center">🏆 Steam Achievement Localizer by Vena</h1>
<p align="center">
Expand Down Expand Up @@ -293,4 +293,4 @@ Translator / discussion community:
Ideas / questions / bugs → Issue or Telegram.
Like the project? — Share with localization communities & drop a ⭐.

<p align="center">Made with love for localization & games 💛💙</p>
<p align="center">Made with love for localization & games 💛💙</p>
247 changes: 247 additions & 0 deletions assets/locales/lang_zh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
{
"_locale_info": {
"name": "简体中文",
"native_name": "简体中文 (Simplified Chinese)",
"code": "zh",
"priority": 40
},
"app_title": "Steam 成就本地化工具 by Pan_Vena ver ",
"restart_steam": "重启 Steam",
"tooltip_restart_steam": "关闭并重启 Steam 客户端(Ctrl+R)",
"q_restart_steam": "重启 Steam?",
"msg_restart_steam": "是否要重启 Steam 以应用更改?",
"warning_title_achtung": "注意",
"warning_message": "可能存在 bug,如有问题请前往 GitHub 页面反馈,或通过以下方式联系:Telegram: <b>@Pan_Vena</b>,Discord: <b>pan_vena</b><br>或发送邮件至: <b>pan.vena@ukr.net</b><br>其他联系方式可在「关于应用」中查看",
"load_icons_option": "加载成就图标",
"man_select_file_label": "选择 UserGameStatsSchema_XXXXXX.bin 文件路径",
"man_select_file": "选择文件",
"get_ach": "获取成就!!!",
"man_file_sel_label": "手动选择文件",
"OR": "或",
"steam_folder_label": "选择 Steam 文件夹路径(例如:C:\\Program Files (x86)\\Steam)",
"select_steam_folder": "选择 Steam 文件夹",
"game_id_label": "输入游戏 ID 或 Steam 商店链接(例如:https://store.steampowered.com/app/257510/The_Talos_Principle/)",
"clear_and_paste": "清空并从剪贴板粘贴",
"indirect_file_sel_label": "通过 ID 间接选择文件",
"gamename": "游戏名称或代号:",
"file_version": "成就文件版本:",
"unknown": "未知",
"translation_lang": "翻译至:",
"fetch_missing_names": "从 Steam API 获取缺失名称",
"fetch_missing_names_hint": "点击以从 Steam API 获取所有显示「未知」的游戏名称。此操作需要网络连接。",
"lang_sel": "语言选择:",
"lang_sel_dia": "语言选择",
"in_column_search": "搜索:",
"in_column_search_placeholder": "输入文本搜索...",
"save": "保存",
"save_bin_unknown": "保存 bin 文件到 Steam 文件夹",
"tooltip_save_bin_unknown": "直接将 bin 文件保存到 Steam 文件夹",
"tooltip_show_user_game_stats": "显示所有可用成就文件列表(Ctrl+O)",
"save_bin_known": "保存 bin 文件(本地备份)",
"tools": "工具",
"export_import": "导出/导入",
"export_bin": "在资源管理器中打开当前 bin 文件",
"export_all": "导出为 CSV(所有语言)",
"export_for_translate": "导出为 CSV(用于翻译)",
"import_csv": "从 CSV 导入",
"file": "文件",
"language": "语言",
"exit": "退出",
"save_changes_title": "保存更改?",
"save_changes_msg": "是否要保存更改?",
"save_where_title": "保存位置?",
"save_where_msg": "要将更改保存到哪里?<br>",
"save_for_self": "本地备份",
"save_to_steam": "保存到 Steam 文件夹",
"about": "关于",
"about_app": "关于应用",
"about_message": "本应用用于翻译 Steam 成就名称。<br><br>如有疑问:<br> - Telegram: <b>@Pan_Vena</b><br> - Discord: <b>pan_vena</b><br> - GitHub: <b>PanVena</b><br> - E-mail: <b>pan.vena@ukr.net</b><br><br>感谢以下贡献者的 pull request:<b>Vadko</b>、<b>Zergatul</b>、<b>Nick Defrunct</b>、<b>veydzh3r</b>、<b>♡Cutie Patootie♡</b> 和 <b>MrIkso</b>",
"info": "信息",
"error": "错误",
"success": "成功",
"records_loaded": "已加载 {count} 条记录:{countby2} 个成就及其描述。",
"error_cannot_open": "无法打开文件:<br>",
"error_cannot_save": "无法保存文件:<br>",
"error_UserGameStatsSchema_sel": "请先选择 UserGameStatsSchema 文件",
"error_no_id": "请输入游戏 ID 或 Steam 商店链接",
"error_no_path": "请先选择 Steam 文件夹",
"error_no_file": "未找到文件:<br>",
"export_csv_all_file_dialog": "保存 CSV",
"export_csv_for_translate_file_dialog": "保存 CSV(用于翻译)",
"csv_saved": "CSV 文件已保存",
"export_csv_for_translate_info": "导出用于翻译的 CSV 包含以下列:key、english、translation 和<b>所选上下文语言</b>。<br>翻译完成后,填写 'translation' 列,将文件导回程序并选择 'english' 作为替换语言。",
"error_no_english": "缺少 'english' 列。<br>这意味着文件未加载。",
"error_no_context": "请选择上下文语言",
"import_csv_info": "导入 CSV 将用 'translation' 列中的值替换所选语言(如果已填写)。<br>导入前请选择 'english' 或其他语言作为替换目标。",
"import_csv_file_dialog": "打开 CSV 以导入",
"error_no_lang_for_import": "请选择要替换的语言",
"import_csv_file_dialog_select": "选择要导入的 CSV 文件",
"import_failed": "导入失败",
"import_no_changes": "CSV 已导入,但没有数据被更改",
"import_details": "已导入:{imported},已更改:{changed},已跳过:{skipped}",
"reason": "原因",
"save_no_game_id": "无法保存到 Steam:未指定游戏 ID。请输入游戏 ID 或从列表中选择游戏。",
"export_csv_file_dialog": "保存 CSV 文件",
"error_empty": "CSV 为空",
"import_success": "CSV 已导入,数据已更新",
"error_doesnt_imported": "无法导入 CSV:<br>",
"error_no_column_choosen_to_replace": "未选择要替换的列<br>",
"error_no_end_was_found": "找不到行尾。<br>",
"error_nothing_after_english": "在 'english' 之后找不到字符串结尾。",
"error_manually_selected_file": "你已从其他文件夹加载了文件,请将其保存到别处",
"error_no_data_to_save": "请先加载成就文件",
"in_steam_folder_saved": "文件已保存到 Steam 文件夹。重启 Steam 即可看到更改。",
"file_saving_file_dialog": "保存修改后的文件",
"file_saved": "文件已成功保存至:<br>{save_path}<br><br>将此文件放回 Steam 文件夹后,别忘了重启 Steam。<br>各平台存放路径:<br>C:\\Program Files (x86)\\Steam\\appcache\\stats(Windows)<br>~/.steam/steam/appcache/stats(Linux)",
"attention": "注意",
"folder_not_found_auto": "无法自动找到 Steam 文件夹",
"man_select_file_file_dialog": "选择 UserGameStatsSchema 文件",
"cannot_decode_json": "无法解码 JSON 文件:<br>",
"copy": "复制",
"paste": "粘贴",
"edit": "编辑",
"undo": "撤销",
"redo": "重做",
"cut": "剪切",
"delete": "删除",
"select_all": "全选",
"deselect_all": "取消全选",
"replace_in_column": "替换",
"search_replace": "查找并替换",
"search": "查找",
"seeeking_for_what": "查找内容",
"by_what": "替换为",
"search_text": "查找:",
"replace_text": "替换为:",
"column": "选择列:",
"replace_all": "全部替换",
"found_nothing": "未找到任何结果",
"found": "找到匹配项:{match_count}",
"close": "关闭",
"cancel": "取消",
"columns": "列:",
"yes": "是",
"no": "否",
"user_game_stats_list": "可用成就文件列表",
"show_user_game_stats": "可用文件",
"file_name": "文件名",
"version": "文件版本",
"gamename_list": "游戏名称或代号",
"game_id": "游戏 ID",
"achievements_count": "成就数量",
"choose_export": "选择导出时的上下文语言:",
"choose_import": "选择要替换的语言:",
"delete_stats_file_confirm": "你即将删除游戏 <b>{gamename}</b> 的成就名称 bin 文件。是否先保存 CSV 备份再删除?",
"delete_stats_file": "删除 bin 文件(如遇问题可尝试)",
"CSV": "不保存 CSV",
"delete_stats_file_done": "游戏 <b>{gamename}</b> 的成就名称 bin 文件已删除。",
"delete_stats_file_failed": "无法删除 bin 文件:{error}",
"appearance": "外观",
"font_size": "字号",
"font_xsmall": "很小",
"font_small": "较小",
"font_standard": "标准",
"font_medium": "较大",
"font_large": "很大",
"theme": "主题",
"theme_system": "跟随系统",
"theme_light": "浅色",
"theme_dark": "深色",
"accent_color": "强调色",
"system": "系统",
"theme_default": "主题默认",
"custom": "自定义...",
"select_accent_color": "选择强调色",
"font_weight": "字体粗细",
"font_normal": "常规",
"font_bold": "粗体",
"button_ok": "确定",
"button_yes": "是",
"button_no": "否",
"button_cancel": "取消",
"auto": "自动",
"ach_number": "成就数量:",
"main_window_group": "主窗口",
"help_tooltips": "工具提示",
"help_tooltips_desc": "<p>应用中所有工具提示的说明。</p>",
"tooltip_copy": "将选中内容复制到剪贴板",
"tooltip_paste": "从剪贴板粘贴",
"tooltip_cut": "将选中内容剪切到剪贴板",
"tooltip_delete": "删除选中内容",
"tooltip_select_all": "全选所有单元格",
"tooltip_select_all_columns": "显示所有列",
"tooltip_deselect_all_columns": "隐藏所有列(必选列除外)",
"tooltip_redo": "重做上一步操作",
"tooltip_undo": "撤销上一步操作",
"tooltip_replace_in_column": "在列中查找并替换文本",
"tooltip_switch_lang": "切换到 {} 语言",
"tooltip_select_theme": "选择 {} 主题",
"tooltip_set_font_weight": "设置字体粗细为 {}",
"tooltip_set_font_size": "设置字号为 {}",
"tooltip_toggle_column": "切换 {} 列的显示",
"tooltip_accent_default": "使用主题默认强调色",
"tooltip_accent_custom": "选择自定义强调色",
"tooltip_menu_columns": "切换表格列的显示",
"tooltip_menu_language": "更改应用语言",
"tooltip_menu_appearance": "更改应用外观(主题、字体、颜色)",
"tooltip_menu_theme": "选择颜色主题",
"tooltip_menu_accent": "选择强调色",
"tooltip_menu_font_weight": "选择字体粗细",
"tooltip_menu_font_size": "选择字号",
"file_search_section": "文件搜索",
"file_search_section_expanded": "▼ 文件搜索(已展开)",
"file_search_section_collapsed": "▶ 文件搜索(已折叠)",
"drag_drop_hint": "将 .bin 或 .csv 文件拖放到此处",
"file_dropped_msg": "已拖放文件:{path}",
"tooltip_fetch_missing_names": "扫描所有成就文件并从 Steam API 获取缺失的游戏名称(需要网络连接)",
"fetching_names_progress": "正在获取游戏名称...",
"fetch_complete": "获取完成。已更新 {count} 个名称。",
"fetch_in_progress": "正在获取名称中...",
"loading": "加载中...",
"processing": "正在处理 {game_id}",
"api_block_warning_title": "检测到 Steam API 限制",
"api_block_warning_message": "Steam API 似乎正在限制请求(请求过于频繁)。已暂停加载游戏名称以避免进一步限制。您可以稍后重试。",
"update_steam_app_list": "更新 Steam 应用列表",
"tooltip_update_steam_app_list": "下载完整的 Steam 游戏列表以加快离线查询速度",
"open_in_steam_store": "在 Steam 商店中打开",
"open_in_file_manager": "在文件管理器中打开",
"tooltip_open_in_steam_store": "在浏览器中打开游戏的 Steam 商店页面",
"tooltip_open_in_file_manager": "在文件管理器中打开成就文件所在文件夹",
"store_btn": "在商店中打开",
"tooltip_store_btn": "打开商店页面",
"help": "帮助",
"check_for_updates": "检查更新...",
"tooltip_check_for_updates": "检查是否有新版本可用",
"update_available": "发现新版本",
"update_new_version_available": "有新版本可用!",
"update_current_version": "当前版本",
"update_new_version": "新版本",
"update_whats_new": "更新内容:",
"update_check_automatically": "自动检查更新",
"update_skip_version": "跳过此版本",
"update_remind_later": "稍后提醒",
"update_now": "立即更新",
"update_downloading": "正在下载更新...",
"update_installing": "正在安装更新...",
"update_success": "更新成功",
"update_restart_message": "应用将重启以完成更新。",
"update_install_failed": "更新安装失败",
"update_download_failed": "更新下载失败",
"update_no_download": "没有适用于您平台的可下载文件。",
"update_check": "检查更新",
"update_up_to_date": "您正在使用最新版本。",
"update_check_failed": "检查更新失败",
"fetch_rate_limited": "\n\n⚠️ 在获取 {count} 个请求后被 Steam 限制频率。请稍后再试以获取其余游戏。",
"fetch_error_count": "\n\n{count} 个游戏名称无法获取(可能已从 Steam 下架)。",
"loading_icons": "正在加载图标...",
"update_ready_title": "更新就绪",
"update_restart_confirm": "更新已下载。是否立即重启应用以安装?",
"get_ach_UI": "按名称查找",
"tooltip_get_ach_UI": "从列表中选择,或按游戏名称查找。(Ctrl+O)",
"total_files_count": "文件总数:{count}",
"drag_drop_csv_hint": "拖放行至:",
"imported_to": "已导入到 {lang_name}",
"csv_load_game_needed": "请先加载游戏,或使用包含游戏 ID 的 CSV",
"import_csv_auto_load": "正在自动加载游戏 {game_id}...",
"drag_drop_open_game_hint": "打开游戏 {gamename} ({game_id}) 并导入到:"
}
15 changes: 10 additions & 5 deletions plugins/binary_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class BinaryParser:
"""Handles parsing of Steam binary achievement files"""

EXCLUDE_WORDS = {
b'max', b'maxchange', b'min', b'token', b'name', b'hidden',
b'icon_gray', b'Hidden', b'', b'russian', b'Default', b'gamename',
b'id', b'incrementonly', b'max_val', b'min_val', b'operand1',
b'operation', b'type', b'version', b'schinese', b'tchinese'
b'max', b'maxchange', b'min', b'token', b'name', b'hidden',
b'icon_gray', b'Hidden', b'', b'russian', b'Default', b'gamename',
b'id', b'incrementonly', b'max_val', b'min_val', b'operand1',
b'operation', b'type', b'version', b'tchinese'
}

def __init__(self):
Expand Down Expand Up @@ -141,6 +141,11 @@ def parse_binary_data(self, data: bytes) -> Tuple[List[Dict[str, str]], List[str
for row in all_rows:
if 'english' not in row:
row['english'] = ''

# Ensure schinese column exists (Simplified Chinese)
for row in all_rows:
if 'schinese' not in row:
row['schinese'] = ''

# Define headers - icon first (if exists), then key, then other columns sorted
all_columns = set()
Expand Down Expand Up @@ -199,4 +204,4 @@ def get_gamename(self, data: bytes) -> Optional[str]:
def get_achievement_count(self, data: bytes) -> int:
"""Count achievements in binary data"""
chunks = self.split_chunks(data)
return sum(1 for chunk in chunks if b'\x01english\x00' in chunk and chunk.count(b'\x01english\x00') >= 2)
return sum(1 for chunk in chunks if b'\x01english\x00' in chunk and chunk.count(b'\x01english\x00') >= 2)
3 changes: 2 additions & 1 deletion plugins/steam_lang_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'portuguese': 'Português (Portuguese)',
'brazilian': 'Português-Brasil (Portuguese - Brazil)',
'romanian': 'Română (Romanian)',
'schinese': '简体中文',
'spanish': 'Español-España (Spanish)',
'latam': 'Español-Latinoamérica (Spanish - Latin America)',
'swedish': 'Svenska (Swedish)',
Expand Down Expand Up @@ -53,4 +54,4 @@ def get_available_languages_for_selection() -> list:
languages = [(code, display) for code, display in STEAM_LANGUAGE_CODES.items()]
languages.sort(key=lambda x: x[1]) # Sort by display name

return [code for code, _ in languages]
return [code for code, _ in languages]
Loading