mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(i18n): translate hidden notes and settings
This commit is contained in:
parent
690506ea26
commit
ae97432ae5
@ -5,6 +5,7 @@ import becca from "../becca/becca.js";
|
|||||||
import noteService from "./notes.js";
|
import noteService from "./notes.js";
|
||||||
import log from "./log.js";
|
import log from "./log.js";
|
||||||
import migrationService from "./migration.js";
|
import migrationService from "./migration.js";
|
||||||
|
import { t } from "i18next";
|
||||||
|
|
||||||
const LBTPL_ROOT = "_lbTplRoot";
|
const LBTPL_ROOT = "_lbTplRoot";
|
||||||
const LBTPL_BASE = "_lbTplBase";
|
const LBTPL_BASE = "_lbTplBase";
|
||||||
@ -53,236 +54,244 @@ enum Command {
|
|||||||
* duplicate subtrees. This way, all instances will generate the same structure with the same IDs.
|
* duplicate subtrees. This way, all instances will generate the same structure with the same IDs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const HIDDEN_SUBTREE_DEFINITION: Item = {
|
let HIDDEN_SUBTREE_DEFINITION = buildHiddenSubtreeDefinition();
|
||||||
id: '_hidden',
|
|
||||||
title: 'Hidden Notes',
|
function buildHiddenSubtreeDefinition(): Item {
|
||||||
type: 'doc',
|
return {
|
||||||
icon: 'bx bx-hide',
|
id: '_hidden',
|
||||||
// we want to keep the hidden subtree always last, otherwise there will be problems with e.g., keyboard navigation
|
title: t("hidden-subtree.root-title"),
|
||||||
// over tree when it's in the middle
|
type: 'doc',
|
||||||
notePosition: 999_999_999,
|
icon: 'bx bx-hide',
|
||||||
attributes: [
|
// we want to keep the hidden subtree always last, otherwise there will be problems with e.g., keyboard navigation
|
||||||
{ type: 'label', name: 'excludeFromNoteMap', isInheritable: true },
|
// over tree when it's in the middle
|
||||||
{ type: 'label', name: 'docName', value: 'hidden' }
|
notePosition: 999_999_999,
|
||||||
],
|
attributes: [
|
||||||
children: [
|
{ type: 'label', name: 'excludeFromNoteMap', isInheritable: true },
|
||||||
{
|
{ type: 'label', name: 'docName', value: 'hidden' }
|
||||||
id: '_search',
|
],
|
||||||
title: 'Search History',
|
children: [
|
||||||
type: 'doc'
|
{
|
||||||
},
|
id: '_search',
|
||||||
{
|
title: t("hidden-subtree.search-history-title"),
|
||||||
id: '_globalNoteMap',
|
type: 'doc'
|
||||||
title: 'Note Map',
|
},
|
||||||
type: 'noteMap',
|
{
|
||||||
attributes: [
|
id: '_globalNoteMap',
|
||||||
{ type: 'label', name: 'mapRootNoteId', value: 'hoisted' },
|
title: t("hidden-subtree.note-map-title"),
|
||||||
{ type: 'label', name: 'keepCurrentHoisting' }
|
type: 'noteMap',
|
||||||
]
|
attributes: [
|
||||||
},
|
{ type: 'label', name: 'mapRootNoteId', value: 'hoisted' },
|
||||||
{
|
{ type: 'label', name: 'keepCurrentHoisting' }
|
||||||
id: '_sqlConsole',
|
]
|
||||||
title: 'SQL Console History',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
icon: 'bx-data'
|
id: '_sqlConsole',
|
||||||
},
|
title: t("hidden-subtree.sql-console-history-title"),
|
||||||
{
|
type: 'doc',
|
||||||
id: '_share',
|
icon: 'bx-data'
|
||||||
title: 'Shared Notes',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
attributes: [ { type: 'label', name: 'docName', value: 'share' } ]
|
id: '_share',
|
||||||
},
|
title: t("hidden-subtree.shared-notes-title"),
|
||||||
{
|
type: 'doc',
|
||||||
id: '_bulkAction',
|
attributes: [ { type: 'label', name: 'docName', value: 'share' } ]
|
||||||
title: 'Bulk Action',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
},
|
id: '_bulkAction',
|
||||||
{
|
title: t("hidden-subtree.bulk-action-title"),
|
||||||
id: '_backendLog',
|
type: 'doc',
|
||||||
title: 'Backend Log',
|
},
|
||||||
type: 'contentWidget',
|
{
|
||||||
icon: 'bx-terminal',
|
id: '_backendLog',
|
||||||
attributes: [
|
title: t("hidden-subtree.backend-log-title"),
|
||||||
{ type: 'label', name: 'keepCurrentHoisting' },
|
type: 'contentWidget',
|
||||||
{ type: 'label', name: 'fullContentWidth' }
|
icon: 'bx-terminal',
|
||||||
]
|
attributes: [
|
||||||
},
|
{ type: 'label', name: 'keepCurrentHoisting' },
|
||||||
{
|
{ type: 'label', name: 'fullContentWidth' }
|
||||||
// place for user scripts hidden stuff (scripts should not create notes directly under hidden root)
|
]
|
||||||
id: '_userHidden',
|
},
|
||||||
title: 'User Hidden',
|
{
|
||||||
type: 'doc',
|
// place for user scripts hidden stuff (scripts should not create notes directly under hidden root)
|
||||||
attributes: [ { type: 'label', name: 'docName', value: 'user_hidden' } ]
|
id: '_userHidden',
|
||||||
},
|
title: t("hidden-subtree.user-hidden-title"),
|
||||||
{
|
type: 'doc',
|
||||||
id: LBTPL_ROOT,
|
attributes: [ { type: 'label', name: 'docName', value: 'user_hidden' } ]
|
||||||
title: 'Launch Bar Templates',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
children: [
|
id: LBTPL_ROOT,
|
||||||
{
|
title: t("hidden-subtree.launch-bar-templates-title"),
|
||||||
id: LBTPL_BASE,
|
type: 'doc',
|
||||||
title: 'Base Abstract Launcher',
|
children: [
|
||||||
type: 'doc'
|
{
|
||||||
},
|
id: LBTPL_BASE,
|
||||||
{
|
title: t("hidden-subtree.base-abstract-launcher-title"),
|
||||||
id: LBTPL_COMMAND,
|
type: 'doc'
|
||||||
title: 'Command Launcher',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
attributes: [
|
id: LBTPL_COMMAND,
|
||||||
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
title: t("hidden-subtree.command-launcher-title"),
|
||||||
{ type: 'label', name: 'launcherType', value: 'command' },
|
type: 'doc',
|
||||||
{ type: 'label', name: 'docName', value: 'launchbar_command_launcher' }
|
attributes: [
|
||||||
]
|
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
||||||
},
|
{ type: 'label', name: 'launcherType', value: 'command' },
|
||||||
{
|
{ type: 'label', name: 'docName', value: 'launchbar_command_launcher' }
|
||||||
id: LBTPL_NOTE_LAUNCHER,
|
]
|
||||||
title: 'Note Launcher',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
attributes: [
|
id: LBTPL_NOTE_LAUNCHER,
|
||||||
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
title: t("hidden-subtree.note-launcher-title"),
|
||||||
{ type: 'label', name: 'launcherType', value: 'note' },
|
type: 'doc',
|
||||||
{ type: 'label', name: 'relation:target', value: 'promoted' },
|
attributes: [
|
||||||
{ type: 'label', name: 'relation:hoistedNote', value: 'promoted' },
|
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
||||||
{ type: 'label', name: 'label:keyboardShortcut', value: 'promoted,text' },
|
{ type: 'label', name: 'launcherType', value: 'note' },
|
||||||
{ type: 'label', name: 'docName', value: 'launchbar_note_launcher' }
|
{ type: 'label', name: 'relation:target', value: 'promoted' },
|
||||||
]
|
{ type: 'label', name: 'relation:hoistedNote', value: 'promoted' },
|
||||||
},
|
{ type: 'label', name: 'label:keyboardShortcut', value: 'promoted,text' },
|
||||||
{
|
{ type: 'label', name: 'docName', value: 'launchbar_note_launcher' }
|
||||||
id: LBTPL_SCRIPT,
|
]
|
||||||
title: 'Script Launcher',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
attributes: [
|
id: LBTPL_SCRIPT,
|
||||||
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
title: t("hidden-subtree.script-launcher-title"),
|
||||||
{ type: 'label', name: 'launcherType', value: 'script' },
|
type: 'doc',
|
||||||
{ type: 'label', name: 'relation:script', value: 'promoted' },
|
attributes: [
|
||||||
{ type: 'label', name: 'label:keyboardShortcut', value: 'promoted,text' },
|
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
||||||
{ type: 'label', name: 'docName', value: 'launchbar_script_launcher' }
|
{ type: 'label', name: 'launcherType', value: 'script' },
|
||||||
]
|
{ type: 'label', name: 'relation:script', value: 'promoted' },
|
||||||
},
|
{ type: 'label', name: 'label:keyboardShortcut', value: 'promoted,text' },
|
||||||
{
|
{ type: 'label', name: 'docName', value: 'launchbar_script_launcher' }
|
||||||
id: LBTPL_BUILTIN_WIDGET,
|
]
|
||||||
title: 'Built-in Widget',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
attributes: [
|
id: LBTPL_BUILTIN_WIDGET,
|
||||||
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
title: t("hidden-subtree.built-in-widget-title"),
|
||||||
{ type: 'label', name: 'launcherType', value: 'builtinWidget' }
|
type: 'doc',
|
||||||
]
|
attributes: [
|
||||||
},
|
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
||||||
{
|
{ type: 'label', name: 'launcherType', value: 'builtinWidget' }
|
||||||
id: LBTPL_SPACER,
|
]
|
||||||
title: 'Spacer',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
icon: 'bx-move-vertical',
|
id: LBTPL_SPACER,
|
||||||
attributes: [
|
title: t("hidden-subtree.spacer-title"),
|
||||||
{ type: 'relation', name: 'template', value: LBTPL_BUILTIN_WIDGET },
|
type: 'doc',
|
||||||
{ type: 'label', name: 'builtinWidget', value: 'spacer' },
|
icon: 'bx-move-vertical',
|
||||||
{ type: 'label', name: 'label:baseSize', value: 'promoted,number' },
|
attributes: [
|
||||||
{ type: 'label', name: 'label:growthFactor', value: 'promoted,number' },
|
{ type: 'relation', name: 'template', value: LBTPL_BUILTIN_WIDGET },
|
||||||
{ type: 'label', name: 'docName', value: 'launchbar_spacer' }
|
{ type: 'label', name: 'builtinWidget', value: 'spacer' },
|
||||||
]
|
{ type: 'label', name: 'label:baseSize', value: 'promoted,number' },
|
||||||
},
|
{ type: 'label', name: 'label:growthFactor', value: 'promoted,number' },
|
||||||
{
|
{ type: 'label', name: 'docName', value: 'launchbar_spacer' }
|
||||||
id: LBTPL_CUSTOM_WIDGET,
|
]
|
||||||
title: 'Custom Widget',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
attributes: [
|
id: LBTPL_CUSTOM_WIDGET,
|
||||||
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
title: t("hidden-subtree.custom-widget-title"),
|
||||||
{ type: 'label', name: 'launcherType', value: 'customWidget' },
|
type: 'doc',
|
||||||
{ type: 'label', name: 'relation:widget', value: 'promoted' },
|
attributes: [
|
||||||
{ type: 'label', name: 'docName', value: 'launchbar_widget_launcher' }
|
{ type: 'relation', name: 'template', value: LBTPL_BASE },
|
||||||
]
|
{ type: 'label', name: 'launcherType', value: 'customWidget' },
|
||||||
},
|
{ type: 'label', name: 'relation:widget', value: 'promoted' },
|
||||||
]
|
{ type: 'label', name: 'docName', value: 'launchbar_widget_launcher' }
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
id: '_lbRoot',
|
]
|
||||||
title: 'Launch Bar',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
icon: 'bx-sidebar',
|
id: '_lbRoot',
|
||||||
isExpanded: true,
|
title: t("hidden-subtree.launch-bar-title"),
|
||||||
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_intro' } ],
|
type: 'doc',
|
||||||
children: [
|
icon: 'bx-sidebar',
|
||||||
{
|
isExpanded: true,
|
||||||
id: '_lbAvailableLaunchers',
|
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_intro' } ],
|
||||||
title: 'Available Launchers',
|
children: [
|
||||||
type: 'doc',
|
{
|
||||||
icon: 'bx-hide',
|
id: '_lbAvailableLaunchers',
|
||||||
isExpanded: true,
|
title: t("hidden-subtree.available-launchers-title"),
|
||||||
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_intro' } ],
|
type: 'doc',
|
||||||
children: [
|
icon: 'bx-hide',
|
||||||
{ id: '_lbBackInHistory', title: 'Go to Previous Note', type: 'launcher', builtinWidget: 'backInHistoryButton', icon: 'bx bxs-chevron-left',
|
isExpanded: true,
|
||||||
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_history_navigation' } ]},
|
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_intro' } ],
|
||||||
{ id: '_lbForwardInHistory', title: 'Go to Next Note', type: 'launcher', builtinWidget: 'forwardInHistoryButton', icon: 'bx bxs-chevron-right',
|
children: [
|
||||||
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_history_navigation' } ]},
|
{ id: '_lbBackInHistory', title: t("hidden-subtree.go-to-previous-note-title"), type: 'launcher', builtinWidget: 'backInHistoryButton', icon: 'bx bxs-chevron-left',
|
||||||
{ id: '_lbBackendLog', title: 'Backend Log', type: 'launcher', targetNoteId: '_backendLog', icon: 'bx bx-terminal' },
|
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_history_navigation' } ]},
|
||||||
]
|
{ id: '_lbForwardInHistory', title: t("hidden-subtree.go-to-next-note-title"), type: 'launcher', builtinWidget: 'forwardInHistoryButton', icon: 'bx bxs-chevron-right',
|
||||||
},
|
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_history_navigation' } ]},
|
||||||
{
|
{ id: '_lbBackendLog', title: t("hidden-subtree.backend-log-title"), type: 'launcher', targetNoteId: '_backendLog', icon: 'bx bx-terminal' },
|
||||||
id: '_lbVisibleLaunchers',
|
]
|
||||||
title: 'Visible Launchers',
|
},
|
||||||
type: 'doc',
|
{
|
||||||
icon: 'bx-show',
|
id: '_lbVisibleLaunchers',
|
||||||
isExpanded: true,
|
title: t("hidden-subtree.visible-launchers-title"),
|
||||||
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_intro' } ],
|
type: 'doc',
|
||||||
children: [
|
icon: 'bx-show',
|
||||||
{ id: '_lbNewNote', title: 'New Note', type: 'launcher', command: 'createNoteIntoInbox', icon: 'bx bx-file-blank' },
|
isExpanded: true,
|
||||||
{ id: '_lbSearch', title: 'Search Notes', type: 'launcher', command: 'searchNotes', icon: 'bx bx-search', attributes: [
|
attributes: [ { type: 'label', name: 'docName', value: 'launchbar_intro' } ],
|
||||||
{ type: 'label', name: 'desktopOnly' }
|
children: [
|
||||||
] },
|
{ id: '_lbNewNote', title: t("hidden-subtree.new-note-title"), type: 'launcher', command: 'createNoteIntoInbox', icon: 'bx bx-file-blank' },
|
||||||
{ id: '_lbJumpTo', title: 'Jump to Note', type: 'launcher', command: 'jumpToNote', icon: 'bx bx-send', attributes: [
|
{ id: '_lbSearch', title: t("hidden-subtree.search-notes-title"), type: 'launcher', command: 'searchNotes', icon: 'bx bx-search', attributes: [
|
||||||
{ type: 'label', name: 'desktopOnly' }
|
{ type: 'label', name: 'desktopOnly' }
|
||||||
] },
|
] },
|
||||||
{ id: '_lbNoteMap', title: 'Note Map', type: 'launcher', targetNoteId: '_globalNoteMap', icon: 'bx bxs-network-chart' },
|
{ id: '_lbJumpTo', title: t("hidden-subtree.jump-to-note-title"), type: 'launcher', command: 'jumpToNote', icon: 'bx bx-send', attributes: [
|
||||||
{ id: '_lbCalendar', title: 'Calendar', type: 'launcher', builtinWidget: 'calendar', icon: 'bx bx-calendar' },
|
{ type: 'label', name: 'desktopOnly' }
|
||||||
{ id: '_lbRecentChanges', title: 'Recent Changes', type: 'launcher', command: 'showRecentChanges', icon: 'bx bx-history', attributes: [
|
] },
|
||||||
{ type: 'label', name: 'desktopOnly' }
|
{ id: '_lbNoteMap', title: t("hidden-subtree.note-map-title"), type: 'launcher', targetNoteId: '_globalNoteMap', icon: 'bx bxs-network-chart' },
|
||||||
] },
|
{ id: '_lbCalendar', title: t("hidden-subtree.calendar-title"), type: 'launcher', builtinWidget: 'calendar', icon: 'bx bx-calendar' },
|
||||||
{ id: '_lbSpacer1', title: 'Spacer', type: 'launcher', builtinWidget: 'spacer', baseSize: "50", growthFactor: "0" },
|
{ id: '_lbRecentChanges', title: t("hidden-subtree.recent-changes-title"), type: 'launcher', command: 'showRecentChanges', icon: 'bx bx-history', attributes: [
|
||||||
{ id: '_lbBookmarks', title: 'Bookmarks', type: 'launcher', builtinWidget: 'bookmarks', icon: 'bx bx-bookmark' },
|
{ type: 'label', name: 'desktopOnly' }
|
||||||
{ id: '_lbToday', title: "Open Today's Journal Note", type: 'launcher', builtinWidget: 'todayInJournal', icon: 'bx bx-calendar-star' },
|
] },
|
||||||
{ id: '_lbSpacer2', title: 'Spacer', type: 'launcher', builtinWidget: 'spacer', baseSize: "0", growthFactor: "1" },
|
{ id: '_lbSpacer1', title: t("hidden-subtree.spacer-title"), type: 'launcher', builtinWidget: 'spacer', baseSize: "50", growthFactor: "0" },
|
||||||
{ id: '_lbQuickSearch', title: "Quick Search", type: "launcher", builtinWidget: "quickSearch", icon: "bx bx-rectangle" },
|
{ id: '_lbBookmarks', title: t("hidden-subtree.bookmarks-title"), type: 'launcher', builtinWidget: 'bookmarks', icon: 'bx bx-bookmark' },
|
||||||
{ id: '_lbProtectedSession', title: 'Protected Session', type: 'launcher', builtinWidget: 'protectedSession', icon: 'bx bx bx-shield-quarter' },
|
{ id: '_lbToday', title: t("hidden-subtree.open-today-journal-note-title"), type: 'launcher', builtinWidget: 'todayInJournal', icon: 'bx bx-calendar-star' },
|
||||||
{ id: '_lbSyncStatus', title: 'Sync Status', type: 'launcher', builtinWidget: 'syncStatus', icon: 'bx bx-wifi' },
|
{ id: '_lbSpacer2', title: t("hidden-subtree.spacer-title"), type: 'launcher', builtinWidget: 'spacer', baseSize: "0", growthFactor: "1" },
|
||||||
{ id: '_lbSettings', title: 'Settings', type: 'launcher', command: 'showOptions', icon: 'bx bx-cog' }
|
{ id: '_lbQuickSearch', title: t("hidden-subtree.quick-search-title"), type: "launcher", builtinWidget: "quickSearch", icon: "bx bx-rectangle" },
|
||||||
]
|
{ id: '_lbProtectedSession', title: t("hidden-subtree.protected-session-title"), type: 'launcher', builtinWidget: 'protectedSession', icon: 'bx bx bx-shield-quarter' },
|
||||||
}
|
{ id: '_lbSyncStatus', title: t("hidden-subtree.sync-status-title"), type: 'launcher', builtinWidget: 'syncStatus', icon: 'bx bx-wifi' },
|
||||||
]
|
{ id: '_lbSettings', title: t("hidden-subtree.settings-title"), type: 'launcher', command: 'showOptions', icon: 'bx bx-cog' }
|
||||||
},
|
]
|
||||||
{
|
}
|
||||||
id: '_options',
|
]
|
||||||
title: 'Options',
|
},
|
||||||
type: 'book',
|
{
|
||||||
icon: 'bx-cog',
|
id: '_options',
|
||||||
children: [
|
title: t("hidden-subtree.options-title"),
|
||||||
{ id: '_optionsAppearance', title: 'Appearance', type: 'contentWidget', icon: 'bx-layout' },
|
type: 'book',
|
||||||
{ id: '_optionsShortcuts', title: 'Shortcuts', type: 'contentWidget', icon: 'bxs-keyboard' },
|
icon: 'bx-cog',
|
||||||
{ id: '_optionsTextNotes', title: 'Text Notes', type: 'contentWidget', icon: 'bx-text' },
|
children: [
|
||||||
{ id: '_optionsCodeNotes', title: 'Code Notes', type: 'contentWidget', icon: 'bx-code' },
|
{ id: '_optionsAppearance', title: t("hidden-subtree.appearance-title"), type: 'contentWidget', icon: 'bx-layout' },
|
||||||
{ id: '_optionsImages', title: 'Images', type: 'contentWidget', icon: 'bx-image' },
|
{ id: '_optionsShortcuts', title: t("hidden-subtree.shortcuts-title"), type: 'contentWidget', icon: 'bxs-keyboard' },
|
||||||
{ id: '_optionsSpellcheck', title: 'Spellcheck', type: 'contentWidget', icon: 'bx-check-double' },
|
{ id: '_optionsTextNotes', title: t("hidden-subtree.text-notes"), type: 'contentWidget', icon: 'bx-text' },
|
||||||
{ id: '_optionsPassword', title: 'Password', type: 'contentWidget', icon: 'bx-lock' },
|
{ id: '_optionsCodeNotes', title: t("hidden-subtree.code-notes-title"), type: 'contentWidget', icon: 'bx-code' },
|
||||||
{ id: '_optionsEtapi', title: 'ETAPI', type: 'contentWidget', icon: 'bx-extension' },
|
{ id: '_optionsImages', title: t("hidden-subtree.images-title"), type: 'contentWidget', icon: 'bx-image' },
|
||||||
{ id: '_optionsBackup', title: 'Backup', type: 'contentWidget', icon: 'bx-data' },
|
{ id: '_optionsSpellcheck', title: t("hidden-subtree.spellcheck-title"), type: 'contentWidget', icon: 'bx-check-double' },
|
||||||
{ id: '_optionsSync', title: 'Sync', type: 'contentWidget', icon: 'bx-wifi' },
|
{ id: '_optionsPassword', title: t("hidden-subtree.password-title"), type: 'contentWidget', icon: 'bx-lock' },
|
||||||
{ id: '_optionsOther', title: 'Other', type: 'contentWidget', icon: 'bx-dots-horizontal' },
|
{ id: '_optionsEtapi', title: t("hidden-subtree.etapi-title"), type: 'contentWidget', icon: 'bx-extension' },
|
||||||
{ id: '_optionsAdvanced', title: 'Advanced', type: 'contentWidget' }
|
{ id: '_optionsBackup', title: t("hidden-subtree.backup-title"), type: 'contentWidget', icon: 'bx-data' },
|
||||||
]
|
{ id: '_optionsSync', title: t("hidden-subtree.sync-title"), type: 'contentWidget', icon: 'bx-wifi' },
|
||||||
}
|
{ id: '_optionsOther', title: t("hidden-subtree.other"), type: 'contentWidget', icon: 'bx-dots-horizontal' },
|
||||||
]
|
{ id: '_optionsAdvanced', title: t("hidden-subtree.advanced-title"), type: 'contentWidget' }
|
||||||
};
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
interface CheckHiddenExtraOpts {
|
interface CheckHiddenExtraOpts {
|
||||||
restoreNames?: boolean;
|
restoreNames?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkHiddenSubtree(force = false, extraOpts: CheckHiddenExtraOpts = {}) {
|
function checkHiddenSubtree(force = false, extraOpts: CheckHiddenExtraOpts = {}) {
|
||||||
if (!force && !migrationService.isDbUpToDate()) {
|
if (!force && !migrationService.isDbUpToDate()) {
|
||||||
// on-delete hook might get triggered during some future migration and cause havoc
|
// on-delete hook might get triggered during some future migration and cause havoc
|
||||||
log.info("Will not check hidden subtree until migration is finished.");
|
log.info("Will not check hidden subtree until migration is finished.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (force) {
|
||||||
|
HIDDEN_SUBTREE_DEFINITION = buildHiddenSubtreeDefinition();
|
||||||
|
}
|
||||||
|
|
||||||
checkHiddenSubtreeRecursively('root', HIDDEN_SUBTREE_DEFINITION, extraOpts);
|
checkHiddenSubtreeRecursively('root', HIDDEN_SUBTREE_DEFINITION, extraOpts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,5 +193,52 @@
|
|||||||
"test_sync": {
|
"test_sync": {
|
||||||
"not-configured": "Sync server host is not configured. Please configure sync first.",
|
"not-configured": "Sync server host is not configured. Please configure sync first.",
|
||||||
"successful": "Sync server handshake has been successful, sync has been started."
|
"successful": "Sync server handshake has been successful, sync has been started."
|
||||||
|
},
|
||||||
|
"hidden-subtree": {
|
||||||
|
"root-title": "Hidden Notes",
|
||||||
|
"search-history-title": "Search History",
|
||||||
|
"note-map-title": "Note Map",
|
||||||
|
"sql-console-history-title": "SQL Console History",
|
||||||
|
"shared-notes-title": "Shared Notes",
|
||||||
|
"bulk-action-title": "Bulk Action",
|
||||||
|
"backend-log-title": "Backend Log",
|
||||||
|
"user-hidden-title": "User Hidden",
|
||||||
|
"launch-bar-templates-title": "Launch Bar Templates",
|
||||||
|
"base-abstract-launcher-title": "Base Abstract Launcher",
|
||||||
|
"command-launcher-title": "Command Launcher",
|
||||||
|
"note-launcher-title": "Note Launcher",
|
||||||
|
"script-launcher-title": "Script Launcher",
|
||||||
|
"built-in-widget-title": "Built-in Widget",
|
||||||
|
"spacer-title": "Spacer",
|
||||||
|
"custom-widget-title": "Custom Widget",
|
||||||
|
"launch-bar-title": "Launch Bar",
|
||||||
|
"available-launchers-title": "Available Launchers",
|
||||||
|
"go-to-previous-note-title": "Go to Previous Note",
|
||||||
|
"go-to-next-note-title": "Go to Next Note",
|
||||||
|
"new-note-title": "New Note",
|
||||||
|
"search-notes-title": "Search Notes",
|
||||||
|
"jump-to-note-title": "Jump to Note",
|
||||||
|
"calendar-title": "Calendar",
|
||||||
|
"recent-changes-title": "Recent Changes",
|
||||||
|
"bookmarks-title": "Bookmarks",
|
||||||
|
"open-today-journal-note-title": "Open Today's Journal Note",
|
||||||
|
"quick-search-title": "Quick Search",
|
||||||
|
"protected-session-title": "Protected Session",
|
||||||
|
"sync-status-title": "Sync Status",
|
||||||
|
"settings-title": "Settings",
|
||||||
|
"options-title": "Options",
|
||||||
|
"appearance-title": "Appearance",
|
||||||
|
"shortcuts-title": "Shortcuts",
|
||||||
|
"text-notes": "Text Notes",
|
||||||
|
"code-notes-title": "Code Notes",
|
||||||
|
"images-title": "Images",
|
||||||
|
"spellcheck-title": "Spellcheck",
|
||||||
|
"password-title": "Password",
|
||||||
|
"etapi-title": "ETAPI",
|
||||||
|
"backup-title": "Backup",
|
||||||
|
"sync-title": "Sync",
|
||||||
|
"other": "Other",
|
||||||
|
"advanced-title": "Advanced",
|
||||||
|
"visible-launchers-title": "Visible Launchers"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,5 +193,52 @@
|
|||||||
"test_sync": {
|
"test_sync": {
|
||||||
"not-configured": "Calea către serverul de sincronizare nu este configurată. Configurați sincronizarea înainte.",
|
"not-configured": "Calea către serverul de sincronizare nu este configurată. Configurați sincronizarea înainte.",
|
||||||
"successful": "Comunicarea cu serverul de sincronizare a avut loc cu succes, s-a început sincronizarea."
|
"successful": "Comunicarea cu serverul de sincronizare a avut loc cu succes, s-a început sincronizarea."
|
||||||
|
},
|
||||||
|
"hidden-subtree": {
|
||||||
|
"advanced-title": "Setări avansate",
|
||||||
|
"appearance-title": "Aspect",
|
||||||
|
"available-launchers-title": "Lansatoare disponibile",
|
||||||
|
"backup-title": "Copii de siguranță",
|
||||||
|
"base-abstract-launcher-title": "Lansator abstract de bază",
|
||||||
|
"bookmarks-title": "Semne de carte",
|
||||||
|
"built-in-widget-title": "Widget predefinit",
|
||||||
|
"bulk-action-title": "Acțiuni în masă",
|
||||||
|
"calendar-title": "Calendar",
|
||||||
|
"code-notes-title": "Notițe de cod",
|
||||||
|
"command-launcher-title": "Lansator de comenzi",
|
||||||
|
"custom-widget-title": "Widget personalizat",
|
||||||
|
"etapi-title": "ETAPI",
|
||||||
|
"go-to-previous-note-title": "Mergi la notița anterioară",
|
||||||
|
"images-title": "Imagini",
|
||||||
|
"jump-to-note-title": "Sari la notiță",
|
||||||
|
"launch-bar-title": "Bară de lansare",
|
||||||
|
"new-note-title": "Notiță nouă",
|
||||||
|
"note-launcher-title": "Lansator de notițe",
|
||||||
|
"note-map-title": "Harta notițelor",
|
||||||
|
"open-today-journal-note-title": "Deschide notița de astăzi",
|
||||||
|
"options-title": "Opțiuni",
|
||||||
|
"other": "Diverse",
|
||||||
|
"password-title": "Parolă",
|
||||||
|
"protected-session-title": "Sesiune protejată",
|
||||||
|
"recent-changes-title": "Schimbări recente",
|
||||||
|
"script-launcher-title": "Lansator de script-uri",
|
||||||
|
"search-history-title": "Istoric de căutare",
|
||||||
|
"settings-title": "Setări",
|
||||||
|
"shared-notes-title": "Notițe partajate",
|
||||||
|
"quick-search-title": "Căutare rapidă",
|
||||||
|
"root-title": "Notițe ascunse",
|
||||||
|
"search-notes-title": "Căutare notițe",
|
||||||
|
"shortcuts-title": "Scurtături",
|
||||||
|
"spellcheck-title": "Corectare gramaticală",
|
||||||
|
"sync-status-title": "Starea sincronizării",
|
||||||
|
"sync-title": "Sincronizare",
|
||||||
|
"text-notes": "Notițe text",
|
||||||
|
"user-hidden-title": "Definite de utilizator",
|
||||||
|
"backend-log-title": "Log backend",
|
||||||
|
"spacer-title": "Separator",
|
||||||
|
"sql-console-history-title": "Istoricul consolei SQL",
|
||||||
|
"go-to-next-note-title": "Mergi la notița următoare",
|
||||||
|
"launch-bar-templates-title": "Șabloane bară de lansare",
|
||||||
|
"visible-launchers-title": "Lansatoare vizibile"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user