fix lang.py

This commit is contained in:
csf 2023-03-01 10:12:10 +09:00
parent 761203e778
commit e28317a8dd

View File

@ -36,11 +36,11 @@ def main():
def expand():
for fn in glob.glob('./src/lang/*'):
lang = os.path.basename(fn)[:-3]
if lang in ['en','cn']: continue
if lang in ['en','template']: continue
print(lang)
dict = get_lang(lang)
fw = open("./src/lang/%s.rs"%lang, "wt", encoding='utf8')
for line in open('./src/lang/cn.rs', encoding='utf8'):
for line in open('./src/lang/template.rs', encoding='utf8'):
line_strip = line.strip()
if line_strip.startswith('("'):
k, v = line_split(line_strip)