mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
added strings for advanced editor
This commit is contained in:
parent
24f570e888
commit
5779784e0a
@ -130,11 +130,11 @@ msgstr "Config Files"
|
||||
|
||||
msgctxt "#30036"
|
||||
msgid ""
|
||||
msgstr ""
|
||||
msgstr "Disclaimer"
|
||||
|
||||
msgctxt "#30037"
|
||||
msgid ""
|
||||
msgstr ""
|
||||
msgstr "Canceling this menu will close and save changes"
|
||||
|
||||
msgctxt "#30038"
|
||||
msgid "Advanced Settings Detected"
|
||||
@ -420,3 +420,87 @@ msgstr "Visit https://console.developers.google.com/"
|
||||
msgctxt "#30109"
|
||||
msgid "Run on startup if missed"
|
||||
msgstr "Run on startup if missed"
|
||||
|
||||
msgctxt "#30110"
|
||||
msgid "Set Name"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30111"
|
||||
msgid "Root folder selection"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30112"
|
||||
msgid "Browse Folder"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30113"
|
||||
msgid "Enter Own"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30114"
|
||||
msgid "starts in Kodi home"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30115"
|
||||
msgid "enter path to start there"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30116"
|
||||
msgid "Enter root path"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30117"
|
||||
msgid "Path Error"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30118"
|
||||
msgid "Path does not exist"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30119"
|
||||
msgid "Select root"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30120"
|
||||
msgid "Add Exclusion"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30121"
|
||||
msgid "Root Folder"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30122"
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30123"
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30124"
|
||||
msgid "Choose Action"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30125"
|
||||
msgid "Advanced Editor"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30126"
|
||||
msgid "Add Set"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30127"
|
||||
msgid "Delete Set"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30128"
|
||||
msgid "Are you sure you want to delete?"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30129"
|
||||
msgid "Exclude"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30130"
|
||||
msgid "The root folder cannot be changed"
|
||||
msgstr ""
|
@ -78,23 +78,23 @@ class AdvancedBackupEditor:
|
||||
def createSet(self):
|
||||
backupSet = None
|
||||
|
||||
name = self.dialog.input("Set Name",defaultt='Backup Set')
|
||||
name = self.dialog.input(utils.getString(30110),defaultt='Backup Set')
|
||||
|
||||
if(name != ''):
|
||||
if(name != None):
|
||||
|
||||
#give a choice to start in home or enter a root path
|
||||
enterHome = self.dialog.yesno('Root folder selection',line1='Browse Folder - starts in Kodi home',line2='Enter Own - enter path to start there',nolabel='Browse Folder',yeslabel='Enter Own')
|
||||
enterHome = self.dialog.yesno(utils.getString(30111),line1=utils.getString(30112) + " - " + utils.getString(30114),line2=utils.getString(30113) + " - " + utils.getString(30115),nolabel=utils.getString(30112),yeslabel=utils.getString(30113))
|
||||
|
||||
rootFolder = 'special://home'
|
||||
if(enterHome):
|
||||
rootFolder = self.dialog.input('Enter root path',defaultt=rootFolder)
|
||||
rootFolder = self.dialog.input(utils.getString(30116),defaultt=rootFolder)
|
||||
|
||||
#check that this path even exists
|
||||
if(not xbmcvfs.exists(xbmc.translatePath(rootFolder))):
|
||||
self.dialog.ok('Path Error','Path does not exist',rootFolder)
|
||||
self.dialog.ok(utils.getString(30117),utils.getString(30118),rootFolder)
|
||||
else:
|
||||
#select path to start set
|
||||
rootFolder = self.dialog.browse(type=0,heading="Select Root",shares='files',defaultt=rootFolder)
|
||||
rootFolder = self.dialog.browse(type=0,heading=utils.getString(30119),shares='files',defaultt=rootFolder)
|
||||
|
||||
backupSet = {'name':name,'root':rootFolder}
|
||||
|
||||
@ -104,23 +104,23 @@ class AdvancedBackupEditor:
|
||||
optionSelected = ''
|
||||
|
||||
while(optionSelected != -1):
|
||||
options = ['Add Exclusion','Root: ' + backupSet['root']]
|
||||
options = [utils.getString(30120),utils.getString(30121) + ": " + backupSet['root']]
|
||||
|
||||
for aDir in backupSet['dirs']:
|
||||
if(aDir['type'] == 'exclude'):
|
||||
options.append('Exclude: ' + aDir['path'])
|
||||
options.append(utils.getString(30129) + ': ' + aDir['path'])
|
||||
|
||||
optionSelected = self.dialog.select('Edit ' + name,options)
|
||||
optionSelected = self.dialog.select(utils.getString(30122) + ' ' + name,options)
|
||||
|
||||
if(optionSelected == 0):
|
||||
#add an exclusion
|
||||
excludeFolder = self.dialog.browse(type=0,heading="Add Exclusion",shares='files',defaultt=backupSet['root'])
|
||||
excludeFolder = self.dialog.browse(type=0,heading=utils.getString(30120),shares='files',defaultt=backupSet['root'])
|
||||
|
||||
#will equal root if cancel is hit
|
||||
if(excludeFolder != backupSet['root']):
|
||||
backupSet['dirs'].append({"path":excludeFolder,"type":"exclude"})
|
||||
elif(optionSelected == 1):
|
||||
self.dialog.ok('Root Folder','The root folder cannot be changed',backupSet['root'])
|
||||
self.dialog.ok(utils.getString(30121),utils.getString(30130),backupSet['root'])
|
||||
elif(optionSelected > 1):
|
||||
#remove exclusion folder
|
||||
del backupSet['dirs'][optionSelected - 2]
|
||||
@ -133,17 +133,17 @@ class AdvancedBackupEditor:
|
||||
customPaths = BackupSetManager()
|
||||
|
||||
#show this every time
|
||||
self.dialog.ok('Disclaimer','Canceling this menu will close and save changes')
|
||||
self.dialog.ok(utils.getString(30036),utils.getString(30037))
|
||||
|
||||
while(exitCondition != -1):
|
||||
#load the custom paths
|
||||
options = ['Add Set']
|
||||
options = [utils.getString(30126)]
|
||||
|
||||
for aPath in customPaths.getSets():
|
||||
options.append(aPath)
|
||||
|
||||
#show the gui
|
||||
exitCondition = self.dialog.select('Advanced Editor',options)
|
||||
exitCondition = self.dialog.select(utils.getString(30125),options)
|
||||
|
||||
if(exitCondition >= 0):
|
||||
if(exitCondition == 0):
|
||||
@ -152,7 +152,7 @@ class AdvancedBackupEditor:
|
||||
customPaths.addSet(newSet)
|
||||
else:
|
||||
#bring up a context menu
|
||||
menuOption = self.dialog.select(heading="Choose Action",list=['Edit','Delete'],preselect=0)
|
||||
menuOption = self.dialog.select(heading=utils.getString(30124),list=[utils.getString(30122),utils.getString(30123)],preselect=0)
|
||||
|
||||
if(menuOption == 0):
|
||||
#get the set
|
||||
@ -165,7 +165,7 @@ class AdvancedBackupEditor:
|
||||
customPaths.updateSet(aSet['name'],updatedSet)
|
||||
|
||||
elif(menuOption == 1):
|
||||
if(self.dialog.yesno(heading="Delete Set",line1="Are you sure you want to delete?")):
|
||||
if(self.dialog.yesno(heading=utils.getString(30127),line1=utils.getString(30128))):
|
||||
#delete this path - subtract one because of "add" item
|
||||
customPaths.deleteSet(exitCondition -1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user