Differences From Artifact [4ab28bf540]:
- File gc_lang/fr/oxt/DictOptions/LexiconEditor.py — part of check-in [5d8a8c82b4] at 2023-03-24 15:17:27 on branch trunk — [lo] éditeur lexical: décodage des caractères spéciaux des URL (user: olr, size: 36261) [annotate] [blame] [check-ins using]
To Artifact [3308c2d10a]:
- File gc_lang/fr/oxt/DictOptions/LexiconEditor.py — part of check-in [fc98962a37] at 2023-06-11 12:58:00 on branch trunk — [lo] lexicon editor: add .json to exported file (user: olr, size: 36369) [annotate] [blame] [check-ins using]
| ︙ | |||
473 474 475 476 477 478 479 480 481 482 483 484 485 486 | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | + + |
if nResult == 1:
# lFile = xFilePicker.getSelectedFiles()
lFile = xFilePicker.getFiles()
spfExported = lFile[0][5:].lstrip("/") # remove file://
if platform.system() != "Windows":
spfExported = "/" + spfExported
spfExported = urllib.parse.unquote(spfExported)
if not spfExported.endswith((".json", ".JSON")):
spfExported += ".json"
#spfExported = os.path.join(os.path.expanduser("~"), "fr.personal.json")
sJSON = self.xOptionNode.getPropertyValue("personal_dic")
if sJSON:
with open(spfExported, "w", encoding="utf-8") as hDst:
hDst.write(sJSON)
sMessage = ui.get('export_message') % spfExported
else:
|
| ︙ |