mirror of
https://github.com/d0k3/GodMode9.git
synced 2026-05-30 22:36:55 +00:00
Auto update en.json version
This commit is contained in:
parent
0f9a5f75f7
commit
2c108764f9
@ -1,4 +1,4 @@
|
||||
{
|
||||
"GM9_LANGUAGE": "English",
|
||||
"GM9_TRANS_VER": 1
|
||||
}
|
||||
"GM9_TRANS_VER": 2
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from argparse import ArgumentParser, FileType
|
||||
from os import path
|
||||
import json
|
||||
|
||||
# Special keys
|
||||
@ -24,3 +25,14 @@ for key in source:
|
||||
# Escape \r, \n, and quotes
|
||||
val = source[key].replace("\r", "\\r").replace("\n", "\\n").replace('"', '\\"')
|
||||
args.inl.write('STRING(%s, "%s")\n' % (key, val))
|
||||
|
||||
# Create the English stub
|
||||
english = {
|
||||
"GM9_LANGUAGE": "English",
|
||||
"GM9_TRANS_VER": version
|
||||
}
|
||||
|
||||
enJson = path.join(path.dirname(args.source.name), "en.json")
|
||||
with open(enJson, "wt") as file:
|
||||
json.dump(english, file, indent="\t")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user