Implementation:3641397194 wq Gpt6 Astra zh cn dictionary
| Knowledge Sources | |
|---|---|
| Domains | UI_Localization, Data_Asset |
| Last Updated | 2026-10-26 14:00 GMT |
Overview
Concrete data asset — the English→Simplified-Chinese UI dictionary consumed by the IDA Pro runtime localization plugin, provided by the ColdBrew Zero ida-zh-cn plugin.
Description
zh_cn.json is a JSON object mapping IDA Pro's English interface strings to their Simplified Chinese translations. It is the authoritative dictionary for ZhCnPlugin's `translate()` function, which performs exact-match lookup (after stripping `&` mnemonics, `~` markers, and trailing ellipses). Keys starting with `_` are ignored; values must be strings.
The dictionary covers menu items, dialog labels, button text, tooltips, column headers, and status messages. A sibling user-override file `zh_cn_user.json` (not shipped) can supplement or override entries. Unmatched strings encountered at runtime are logged to `ida_zh_cn_missing.txt` so this dictionary can be expanded.
Usage
- Plugin translation: loaded by `load_dict()` at plugin enable time; every `translate()` call consults this dictionary first.
- Dictionary expansion: collect entries from `ida_zh_cn_missing.txt` and add them here (or in `zh_cn_user.json` for local overrides).
- Auditing coverage: count entries to gauge localization completeness.
Code Reference
Source Location
- Repository: ColdBrew Zero
- File: tools/ida-zh-cn/plugin/zh_cn.json
- Lines: 1-1863
Signature
{
"<English UI text>": "<Simplified Chinese translation>",
...
}
Import
# Consumed by ida_zh_cn.load_dict(); not imported directly.
# To inspect programmatically:
import json, os
here = os.path.dirname(os.path.abspath("ida_zh_cn.py"))
with open(os.path.join(here, "zh_cn.json"), encoding="utf-8") as f:
DICT = json.load(f)
print(len(DICT), "entries")
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | This is a static data file, not a callable unit |
Outputs
| Name | Type | Description |
|---|---|---|
| DICT | dict[str, str] | In-memory English→Chinese map built by load_dict() |
Usage Examples
Load and Query the Dictionary
import json
with open("zh_cn.json", encoding="utf-8") as f:
d = json.load(f)
print(len(d)) # number of translation entries
print(d.get("Abort")) # "中止"
print(d.get("Add")) # "添加"
print(d.get("Analysis")) # "分析"
Merge User Overrides
import json, os
base = json.load(open("zh_cn.json", encoding="utf-8"))
user_path = "zh_cn_user.json"
if os.path.isfile(user_path):
user = json.load(open(user_path, encoding="utf-8"))
base.update({k.replace("&", ""): v for k, v in user.items()
if not k.startswith("_") and isinstance(v, str)})
print(len(base), "merged entries")