Do not persist messages across generation sessions

This commit is contained in:
DarkPhoenix
2020-10-27 22:56:02 +03:00
parent 566c87fa59
commit da78c24d9b
2 changed files with 7 additions and 0 deletions

View File

@@ -10,4 +10,5 @@ for name in glob.iglob(locale_path + '/**'):
if not os.path.isfile(name):
path = os.path.join(locale_path, name, 'LC_MESSAGES', 'lang')
sys.argv[1:] = [path + '.po']
msgfmt.reset()
msgfmt.main()

View File

@@ -92,6 +92,12 @@ def generate():
return output
def reset():
"Reset module state."
global MESSAGES
MESSAGES.clear()
def make(filename, outfile):
ID = 1
STR = 2