i18n: 合并脚本覆盖identity映射; 新增Delete/Search翻译
This commit is contained in:
parent
342608403c
commit
848d724c18
@ -23,5 +23,7 @@
|
||||
"Update record": "Update record",
|
||||
"Clone record": "Clone record",
|
||||
"Are you sure to delete this record?": "Are you sure to delete this record?",
|
||||
"[Untitle window]": "[Untitled window]"
|
||||
"[Untitle window]": "[Untitled window]",
|
||||
"Delete": "Delete",
|
||||
"Search": "Search"
|
||||
}
|
||||
|
||||
@ -23,5 +23,7 @@
|
||||
"Update record": "レコード更新",
|
||||
"Clone record": "レコード複製",
|
||||
"Are you sure to delete this record?": "このレコードを削除しますか?",
|
||||
"[Untitle window]": "[無題ウィンドウ]"
|
||||
"[Untitle window]": "[無題ウィンドウ]",
|
||||
"Delete": "削除",
|
||||
"Search": "検索"
|
||||
}
|
||||
|
||||
@ -23,5 +23,7 @@
|
||||
"Update record": "레코드 수정",
|
||||
"Clone record": "레코드 복제",
|
||||
"Are you sure to delete this record?": "이 레코드를 삭제하시겠습니까?",
|
||||
"[Untitle window]": "[제목 없음]"
|
||||
"[Untitle window]": "[제목 없음]",
|
||||
"Delete": "삭제",
|
||||
"Search": "검색"
|
||||
}
|
||||
|
||||
BIN
i18n/zh/.i18n.json.swp
Normal file
BIN
i18n/zh/.i18n.json.swp
Normal file
Binary file not shown.
@ -23,5 +23,7 @@
|
||||
"Update record": "更新记录",
|
||||
"Clone record": "克隆记录",
|
||||
"Are you sure to delete this record?": "确定删除此记录?",
|
||||
"[Untitle window]": "[未命名窗口]"
|
||||
"[Untitle window]": "[未命名窗口]",
|
||||
"Delete": "删除",
|
||||
"Search": "搜索"
|
||||
}
|
||||
|
||||
@ -28,14 +28,18 @@ def merge(bricks_i18n_dir, sage_i18n_dir):
|
||||
sage_msgs = json.load(f)
|
||||
|
||||
added = 0
|
||||
updated = 0
|
||||
for k, v in brick_msgs.items():
|
||||
if k not in sage_msgs:
|
||||
sage_msgs[k] = v
|
||||
added += 1
|
||||
elif sage_msgs[k] == k: # identity mapping (untranslated)
|
||||
sage_msgs[k] = v
|
||||
updated += 1
|
||||
|
||||
with open(sage_path, 'w') as f:
|
||||
json.dump(sage_msgs, f, ensure_ascii=False, indent='\t')
|
||||
print(f" {lang}: {len(sage_msgs)} entries (+{added} from bricks)")
|
||||
print(f" {lang}: {len(sage_msgs)} entries (+{added} new, ~{updated} fixed)")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user