spostati i file di configurazione, da fare la gestione finestra di
output per scegliere la lingua
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"italiano": {
|
"Italiano": {
|
||||||
"dateWords": [
|
"dateWords": [
|
||||||
"Gennaio",
|
"Gennaio",
|
||||||
"Febbraio",
|
"Febbraio",
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"JOURNAL-CODE:"
|
"JOURNAL-CODE:"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"english": {
|
"English": {
|
||||||
"dateWords": [
|
"dateWords": [
|
||||||
"January",
|
"January",
|
||||||
"February",
|
"February",
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": "v1.1a",
|
"version": "v1.1a",
|
||||||
"paths": {
|
"paths": {
|
||||||
"lastUsed": "D:/Emanuele/Documenti/workspace/bananaSPLIT/bananaSPLIT/libbananasplit/presettone.json",
|
"lastUsed": "presettone.json",
|
||||||
"configurationPath": "D:\\Emanuele\\Documenti\\workspace\\bananaSPLIT\\",
|
"configurationPath": "D:\\Emanuele\\Documenti\\workspace\\bananaSPLIT\\",
|
||||||
"INworkPath": "D:/Emanuele/Desktop",
|
"INworkPath": "D:/Emanuele/Desktop",
|
||||||
"OUTworkPath": "D:/Emanuele/Desktop"
|
"OUTworkPath": "D:/Emanuele/Desktop"
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"dateFormat": "{month} {day:d}, {year:d}{}",
|
"dateFormat": "{month} {day:d}, {year:d}{}",
|
||||||
"outPrefix": "123",
|
"outPrefix": "123",
|
||||||
"outSuffix": "456",
|
"outSuffix": "456",
|
||||||
"outDateType": "usa",
|
"outDateType": "jpn",
|
||||||
"outNameFormat": "",
|
"outNameFormat": "",
|
||||||
"outDate": true,
|
"outDate": true,
|
||||||
"outNumber": true,
|
"outNumber": true,
|
||||||
@@ -27,11 +27,12 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
PyQt5.QtWidgets.QMainWindow.__init__(self)
|
PyQt5.QtWidgets.QMainWindow.__init__(self)
|
||||||
try:
|
try:
|
||||||
self.logger = fancyLogger(filepath=r"./libbananasplit/loggerconf.json",fileLog=False)
|
self.logger = fancyLogger(filepath=r"./conf/loggerconf.json",fileLog=False)
|
||||||
self.conf = bananaCONF(workdir=r"./libbananasplit", logger=self.logger)
|
self.conf = bananaCONF(workdir=r"./conf", logger=self.logger)
|
||||||
self.conf.open()
|
self.conf.open()
|
||||||
self.conf.use("defaults.json")
|
self.conf.use("defaults.json")
|
||||||
self.conf.use(self.conf.getParam('paths', 'lastUsed'))
|
self.conf.use(self.conf.getParam('paths', 'lastUsed'))
|
||||||
|
print(self.conf.inUse)
|
||||||
except:
|
except:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
@@ -119,7 +120,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
|||||||
sf.setAcceptMode(PyQt5.QtWidgets.QFileDialog.AcceptSave)
|
sf.setAcceptMode(PyQt5.QtWidgets.QFileDialog.AcceptSave)
|
||||||
sf.setNameFilter("bananaCONF (*.json)")
|
sf.setNameFilter("bananaCONF (*.json)")
|
||||||
if sf.exec():
|
if sf.exec():
|
||||||
rv=str(sf.selectedFiles()[0])
|
rv=str(sf.selectedFiles()[0].split('/')[-1])
|
||||||
self.conf.setParam(('paths','lastUsed'),rv)
|
self.conf.setParam(('paths','lastUsed'),rv)
|
||||||
self.logger.debug("Scrivi il File: {}".format(rv))
|
self.logger.debug("Scrivi il File: {}".format(rv))
|
||||||
self.conf.save(fName=rv)
|
self.conf.save(fName=rv)
|
||||||
|
|||||||
Reference in New Issue
Block a user