Skip to content

Commit

Permalink
add: export & import
Browse files Browse the repository at this point in the history
  • Loading branch information
windingwind committed Nov 10, 2023
1 parent 154f4fc commit 10307c0
Show file tree
Hide file tree
Showing 14 changed files with 441 additions and 229 deletions.
46 changes: 34 additions & 12 deletions addon/chrome/content/preferences.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,66 @@
<linkset>
<html:link rel="localization" href="__addonRef__-preferences.ftl" />
</linkset>
<html:style>
.action-button { min-width: auto; }
</html:style>
<groupbox style="width: -moz-available">
<label><html:h2 data-l10n-id="pref-rule"></html:h2></label>
<label><html:h2 data-l10n-id="action"></html:h2></label>
<hbox class="virtualized-table-container" flex="1" height="300px">
<html:div id="__addonRef__-table-container" />
</hbox>
<hbox>
<button id="__addonRef__-rule-add" label="+"></button>
<button
id="__addonRef__-rule-remove"
id="__addonRef__-action-add"
label="+"
class="action-button"
data-l10n-id="action-add"
></button>
<button
id="__addonRef__-action-remove"
label="-"
class="rule-selection"
class="action-button action-selection"
data-l10n-id="action-remove"
></button>
<button
id="__addonRef__-rule-edit"
id="__addonRef__-action-edit"
label=""
class="rule-selection"
class="action-button action-selection"
data-l10n-id="action-edit"
></button>
<button
id="__addonRef__-action-export"
label=""
class="action-button action-selection"
data-l10n-id="action-export"
></button>
<button
id="__addonRef__-action-import"
label=""
class="action-button"
data-l10n-id="action-import"
></button>
</hbox>
<hbox>
<checkbox
preference="__prefsPrefix__.ruleWarningDisabled"
native="true"
data-l10n-id="prefs-script-warning-ignore"
data-l10n-id="script-warning-ignore"
></checkbox>
</hbox>
</groupbox>
<groupbox style="width: -moz-available">
<label><html:h2 data-l10n-id="pref-menu"></html:h2></label>
<label><html:h2 data-l10n-id="menu"></html:h2></label>
<hbox>
<label data-l10n-id="prefs-menu-sort"></label>
<label data-l10n-id="menu-sort"></label>
<menulist preference="__prefsPrefix__.menuSortBy" native="true">
<menupopup>
<menuitem
data-l10n-id="prefs-menu-sort-menuLabel"
data-l10n-id="menu-sort-menuLabel"
value="menu"
></menuitem>
<menuitem
data-l10n-id="prefs-menu-sort-name"
data-l10n-id="menu-sort-name"
label="Name"
value="name"
></menuitem>
Expand All @@ -51,7 +73,7 @@
</hbox>
</groupbox>
<html:label
data-l10n-id="pref-help"
data-l10n-id="help"
data-l10n-args='{"time": "__buildTime__","name": "__addonName__","version":"__buildVersion__"}'
></html:label>
</vbox>
62 changes: 31 additions & 31 deletions addon/locale/en-US/addon.ftl
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
prefs-title = Actions & Tags
prefs-rule-name = Name
prefs-rule-event = Event
prefs-rule-operation = Operation
prefs-rule-data = Data
prefs-rule-shortcut = Shortcut
prefs-rule-enabled = Enabled
prefs-rule-menu = Menu Label
prefs-action-name = Name
prefs-action-event = Event
prefs-action-operation = Operation
prefs-action-data = Data
prefs-action-shortcut = Shortcut
prefs-action-enabled = Enabled
prefs-action-menu = Menu Label
prefs-rule-event-none = None
prefs-rule-event-createItem = Create Item
prefs-rule-event-openFile = Open File
prefs-rule-event-closeTab = Close Tab
prefs-rule-event-createAnnotation = Create Annotation
prefs-rule-event-createNote = Create Note
prefs-rule-event-appendAnnotation = Append Annotation
prefs-rule-event-appendNote = Append Note
prefs-rule-event-programStartup = Program Startup
prefs-rule-event-mainWindowLoad = Main Window Load
prefs-rule-event-mainWindowUnload = Main Window Unload
prefs-action-event-none = None
prefs-action-event-createItem = Create Item
prefs-action-event-openFile = Open File
prefs-action-event-closeTab = Close Tab
prefs-action-event-createAnnotation = Create Annotation
prefs-action-event-createNote = Create Note
prefs-action-event-appendAnnotation = Append Annotation
prefs-action-event-appendNote = Append Note
prefs-action-event-programStartup = Program Startup
prefs-action-event-mainWindowLoad = Main Window Load
prefs-action-event-mainWindowUnload = Main Window Unload
prefs-rule-operation-none = None
prefs-rule-operation-add = Add Tags
prefs-rule-operation-remove = Remove Tags
prefs-rule-operation-toggle = Toggle Tags
prefs-rule-operation-script = Script
prefs-rule-operation-triggerAction = Trigger Another Action
prefs-action-operation-none = None
prefs-action-operation-add = Add Tags
prefs-action-operation-remove = Remove Tags
prefs-action-operation-toggle = Toggle Tags
prefs-action-operation-script = Script
prefs-action-operation-triggerAction = Trigger Another Action
prefs-rule-edit-title = Edit Action
prefs-rule-edit-save = Save
prefs-rule-edit-cancel = Cancel
prefs-rule-edit-delete = Delete
prefs-rule-edit-shortcut-empty = No Shortcut
prefs-rule-edit-shortcut-placeholder = Press to record shortcut
prefs-rule-edit-menu-placeholder = Leave empty to hide in menu
prefs-action-edit-title = Edit Action
prefs-action-edit-save = Save
prefs-action-edit-cancel = Cancel
prefs-action-edit-delete = Delete
prefs-action-edit-shortcut-empty = No Shortcut
prefs-action-edit-shortcut-placeholder = Press to record shortcut
prefs-action-edit-menu-placeholder = Leave empty to hide in menu
prefs-script-warning = ⚠️ Warning: This script will be executed with full access to your computer. Only use scripts from trusted sources. Are you sure you want to continue?
Expand Down
64 changes: 40 additions & 24 deletions addon/locale/en-US/preferences.ftl
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
pref-rule = Actions
action = Actions
pref-help = { $name } Build { $version } { $time }
help = { $name } Build { $version } { $time }
prefs-rule-event-none = None
prefs-rule-event-createItem = Create Item
prefs-rule-event-openFile = Open Tab
prefs-rule-event-closeTab = Close Tab
prefs-rule-event-createAnnotation = Create Annotation
prefs-rule-event-createNote = Create Note
prefs-rule-event-appendAnnotation = Annotation Appended
prefs-rule-event-appendNote = Note Appended
prefs-rule-event-programStartup = Program Startup
prefs-rule-event-mainWindowLoad = Main Window Load
prefs-rule-event-mainWindowUnload = Main Window Unload
action-event-none = None
action-event-createItem = Create Item
action-event-openFile = Open Tab
action-event-closeTab = Close Tab
action-event-createAnnotation = Create Annotation
action-event-createNote = Create Note
action-event-appendAnnotation = Annotation Appended
action-event-appendNote = Note Appended
action-event-programStartup = Program Startup
action-event-mainWindowLoad = Main Window Load
action-event-mainWindowUnload = Main Window Unload
prefs-rule-operation-none = None
prefs-rule-operation-add = Add Tags
prefs-rule-operation-remove = Remove Tags
prefs-rule-operation-toggle = Toggle Tags
prefs-rule-operation-script = Script
prefs-rule-operation-triggerAction = Trigger Another Action
action-operation-none = None
action-operation-add = Add Tags
action-operation-remove = Remove Tags
action-operation-toggle = Toggle Tags
action-operation-script = Script
action-operation-triggerAction = Trigger Another Action
pref-menu = Menu
action-add =
.label = +
.tooltiptext = Add a new action
action-remove =
.label = -
.tooltiptext = Delete selected action
action-edit =
.label =
.tooltiptext = Edit selected action
action-export =
.label =
.tooltiptext = Export selected actions to file
action-import =
.label =
.tooltiptext = Import actions from file
prefs-menu-sort =
menu = Menu
menu-sort =
.value = Menu sort by
prefs-menu-sort-menuLabel =
menu-sort-menuLabel =
.label = Menu Label
prefs-menu-sort-name =
menu-sort-name =
.label = Name
prefs-script-warning-ignore =
script-warning-ignore =
.label = Don't show warning when saving script actions
62 changes: 31 additions & 31 deletions addon/locale/it-IT/addon.ftl
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
prefs-title = Actions & Tags
prefs-rule-name = Nome
prefs-rule-event = Evento
prefs-rule-operation = Operazione
prefs-rule-data = Data
prefs-rule-shortcut = Scorciatoia
prefs-rule-enabled = Attivo
prefs-rule-menu = Etichetta menu
prefs-action-name = Nome
prefs-action-event = Evento
prefs-action-operation = Operazione
prefs-action-data = Data
prefs-action-shortcut = Scorciatoia
prefs-action-enabled = Attivo
prefs-action-menu = Etichetta menu
prefs-rule-event-none = Nessuno
prefs-rule-event-createItem = Crea Elemento
prefs-rule-event-openFile = Apri file
prefs-rule-event-closeTab = Chiudi scheda
prefs-rule-event-createAnnotation = Crea annotazione
prefs-rule-event-createNote = Crea Nota
prefs-rule-event-appendAnnotation = Allega annotazione
prefs-rule-event-appendNote = Allega nota
prefs-rule-event-programStartup = Avvio del programma
prefs-rule-event-mainWindowLoad = Caricamento finestra principale
prefs-rule-event-mainWindowUnload = Scaricamento finestra principale
prefs-action-event-none = Nessuno
prefs-action-event-createItem = Crea Elemento
prefs-action-event-openFile = Apri file
prefs-action-event-closeTab = Chiudi scheda
prefs-action-event-createAnnotation = Crea annotazione
prefs-action-event-createNote = Crea Nota
prefs-action-event-appendAnnotation = Allega annotazione
prefs-action-event-appendNote = Allega nota
prefs-action-event-programStartup = Avvio del programma
prefs-action-event-mainWindowLoad = Caricamento finestra principale
prefs-action-event-mainWindowUnload = Scaricamento finestra principale
prefs-rule-operation-none = Nessuno
prefs-rule-operation-add = Aggiungi Tag
prefs-rule-operation-remove = Rimuovi Tag
prefs-rule-operation-toggle = Aggiungi/rimuovi Tag
prefs-rule-operation-script = Script
prefs-rule-operation-triggerAction = Innesca altra azione
prefs-action-operation-none = Nessuno
prefs-action-operation-add = Aggiungi Tag
prefs-action-operation-remove = Rimuovi Tag
prefs-action-operation-toggle = Aggiungi/rimuovi Tag
prefs-action-operation-script = Script
prefs-action-operation-triggerAction = Innesca altra azione
prefs-rule-edit-title = Modifica azione
prefs-rule-edit-save = Salva
prefs-rule-edit-cancel = Pulisci
prefs-rule-edit-delete = Elimina
prefs-rule-edit-shortcut-empty = Nessuna scorciatoia
prefs-rule-edit-shortcut-placeholder = Premere per registrare la scorciatoia
prefs-rule-edit-menu-placeholder = Lasciare vuoto per nascondere la voce nel menu
prefs-action-edit-title = Modifica azione
prefs-action-edit-save = Salva
prefs-action-edit-cancel = Pulisci
prefs-action-edit-delete = Elimina
prefs-action-edit-shortcut-empty = Nessuna scorciatoia
prefs-action-edit-shortcut-placeholder = Premere per registrare la scorciatoia
prefs-action-edit-menu-placeholder = Lasciare vuoto per nascondere la voce nel menu
prefs-script-warning = ⚠️ Attenzione: questo script sarà eseguito con pieno accesso al tuo computer. Usa script provenienti solamente da fonti fidate. Vuoi procedere?
Expand Down
64 changes: 40 additions & 24 deletions addon/locale/it-IT/preferences.ftl
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
pref-rule = Azioni
action = Azioni
pref-help = { $name } Build { $version } { $time }
help = { $name } Build { $version } { $time }
prefs-rule-event-none = Nessuno
prefs-rule-event-createItem = Crea Elemento
prefs-rule-event-openFile = Apri scheda
prefs-rule-event-closeTab = Chiudi scheda
prefs-rule-event-createAnnotation = Crea annotazione
prefs-rule-event-createNote = Crea nota
prefs-rule-event-appendAnnotation = Annotazione allegata
prefs-rule-event-appendNote = Nota allegata
prefs-rule-event-programStartup = Avvio del programma
prefs-rule-event-mainWindowLoad = Caricamento finestra principale
prefs-rule-event-mainWindowUnload = Scaricamento finestra principale
action-event-none = Nessuno
action-event-createItem = Crea Elemento
action-event-openFile = Apri scheda
action-event-closeTab = Chiudi scheda
action-event-createAnnotation = Crea annotazione
action-event-createNote = Crea nota
action-event-appendAnnotation = Annotazione allegata
action-event-appendNote = Nota allegata
action-event-programStartup = Avvio del programma
action-event-mainWindowLoad = Caricamento finestra principale
action-event-mainWindowUnload = Scaricamento finestra principale
prefs-rule-operation-none = Nessuno
prefs-rule-operation-add = Aggiungi Tag
prefs-rule-operation-remove = Rimuovi Tag
prefs-rule-operation-toggle = Aggiungi/rimuovi Tag
prefs-rule-operation-script = Script
prefs-rule-operation-triggerAction = Innesca altra azione
action-operation-none = Nessuno
action-operation-add = Aggiungi Tag
action-operation-remove = Rimuovi Tag
action-operation-toggle = Aggiungi/rimuovi Tag
action-operation-script = Script
action-operation-triggerAction = Innesca altra azione
pref-menu = Menu
action-add =
.label = +
.tooltiptext = Add a new action
action-remove =
.label = -
.tooltiptext = Delete selected action
action-edit =
.label =
.tooltiptext = Edit selected action
action-export =
.label =
.tooltiptext = Export selected actions to file
action-import =
.label =
.tooltiptext = Import actions from file
prefs-menu-sort =
menu = Menu
menu-sort =
.value = Criterio di ordinamento menu
prefs-menu-sort-menuLabel =
menu-sort-menuLabel =
.label = Etichetta menu
prefs-menu-sort-name =
menu-sort-name =
.label = Nome
prefs-script-warning-ignore =
script-warning-ignore =
.label = Non mostrare avvisi durante il salvataggio di azioni di script
Loading

0 comments on commit 10307c0

Please sign in to comment.