320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
-
+
-
+
|
for sWord in lElem:
if sWord not in dCur:
dCur[sWord] = {}
dCur = dCur[sWord]
sCode = "# generated data (do not edit)\n\n" + \
"dLocutions = " + str(dLocutions) + "\n"
open(sp+"/modules/locutions.py", "w", encoding="utf-8", newline="\n").write(sCode)
open(sp+"/modules/locutions_data.py", "w", encoding="utf-8", newline="\n").write(sCode)
if bJS:
open(sp+"/modules-js/locutions.json", "w", encoding="utf-8", newline="\n").write(json.dumps(dLocutions, ensure_ascii=False))
open(sp+"/modules-js/locutions_data.json", "w", encoding="utf-8", newline="\n").write(json.dumps(dLocutions, ensure_ascii=False))
def before (spLaunch, dVars, bJS=False):
print("========== Build Hunspell dictionaries ==========")
makeDictionaries(spLaunch, dVars['oxt_version'])
|