update .gitignore

This commit is contained in:
2024-11-06 08:53:57 +08:00
parent f12cb55bbc
commit 3d7f30af00
2 changed files with 1 additions and 32 deletions

2
.gitignore vendored
View File

@@ -42,4 +42,4 @@ app.*.map.json
/android/app/profile
/android/app/release
./add_translation.py
add_translation.py

View File

@@ -1,31 +0,0 @@
import re
import json
path='./assets/translation.json'
with open(path, 'r',encoding='utf-8') as file:
translations=json.load(file)
while True:
line=input()
if line=="q":
break
words=line.split('-')
if len(words)!=3:
print("invalid entry:",line,"(len(words) != 3)"
continue
en=words[0]
cn=words[1]
tw=words[2]
translations["zh_CN"][en]=cn
translations["zh_TW"][en]=tw
with open(path, 'w',encoding='utf-8') as file:
json.dump(translations, file, indent=2,ensure_ascii=False)