Index: gc_lang/fr/oxt/DictOptions/LexiconEditor.py ================================================================== --- gc_lang/fr/oxt/DictOptions/LexiconEditor.py +++ gc_lang/fr/oxt/DictOptions/LexiconEditor.py @@ -6,10 +6,11 @@ import uno import json import re import os import traceback +import platform import helpers import lxe_strings import grammalecte.graphspell as sc import grammalecte.graphspell.dawg as dawg @@ -414,11 +415,11 @@ #MessageBox(self.xDocument, "File(s): " + str(lFile), "DEBUG", INFOBOX) spfImported = lFile[0][5:].lstrip("/") # remove file:// if platform.system() != "Windows": spfImported = "/" + spfImported except: - spfImported = os.path.join(os.path.expanduser("~"), "fr.personal.json") # workaround + spfImported = os.path.join(os.path.expanduser("~"), "fr.__personal__.json") # workaround if spfImported and os.path.isfile(spfImported): with open(spfImported, "r", encoding="utf-8") as hDst: sJSON = hDst.read() try: sTest = json.loads(sJSON) @@ -438,11 +439,11 @@ xGridDataModel = self.xGridModelLex.GridDataModel lEntry = [] for i in range(xGridDataModel.RowCount): lEntry.append(xGridDataModel.getRowData(i)) if lEntry: - oDAWG = dawg.DAWG(lEntry, "S", "fr", "Français", "fr.personal", "Dictionnaire personnel") + oDAWG = dawg.DAWG(lEntry, "S", "fr", "Français", "fr.__personal__", "Dictionnaire personnel") self.oPersonalDicJSON = oDAWG.getBinaryAsJSON() self.xOptionNode.setPropertyValue("personal_dic", json.dumps(self.oPersonalDicJSON, ensure_ascii=False)) self.xSettingNode.commitChanges() self.xNumDic.Label = str(self.oPersonalDicJSON["nEntry"]) self.xDateDic.Label = self.oPersonalDicJSON["sDate"]