mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
update .gitignore
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -41,3 +41,5 @@ app.*.map.json
|
|||||||
/android/app/debug
|
/android/app/debug
|
||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
|
|
||||||
|
./add_translation.py
|
31
add_translation.py
Normal file
31
add_translation.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user