diff --git a/ftl/core/editing.ftl b/ftl/core/editing.ftl index 92a1f7bca..89e876b98 100644 --- a/ftl/core/editing.ftl +++ b/ftl/core/editing.ftl @@ -39,6 +39,7 @@ editing-subscript = Subscript editing-superscript = Superscript editing-tags = Tags editing-to-make-a-cloze-deletion-on = To make a cloze deletion on an existing note, you need to change it to a cloze type first, via 'Notes>Change Note Type' +editing-toggle-sticky = Toggle sticky editing-underline-text = Underline text editing-unordered-list = Unordered list editing-warning-cloze-deletions-will-not-work = Warning, cloze deletions will not work until you switch the type at the top to Cloze. diff --git a/ts/editor/index.ts b/ts/editor/index.ts index 8596939d5..57671daac 100644 --- a/ts/editor/index.ts +++ b/ts/editor/index.ts @@ -191,7 +191,7 @@ export function setFormat(cmd: string, arg?: string, nosave = false): void { } } -const i18n = setupI18n({ +export const i18n = setupI18n({ modules: [ ModuleName.EDITING, ModuleName.KEYBOARD, diff --git a/ts/editor/label-container.ts b/ts/editor/label-container.ts index 96a489e5c..6b657fbe6 100644 --- a/ts/editor/label-container.ts +++ b/ts/editor/label-container.ts @@ -2,10 +2,12 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import type { EditorField } from "./editor-field"; +import * as tr from "lib/i18n"; import { registerShortcut } from "lib/shortcuts"; import { bridgeCommand } from "./lib"; -import { getCurrentField, forEditorField } from "."; +import { appendInParentheses } from "./helpers"; +import { getCurrentField, forEditorField, i18n } from "."; import pinIcon from "./pin-angle.svg"; function toggleStickyCurrentField() { @@ -37,6 +39,10 @@ export class LabelContainer extends HTMLDivElement { super(); this.className = "d-flex justify-content-between"; + i18n.then(() => { + this.title = appendInParentheses(tr.editingToggleSticky(), "F9"); + }); + this.label = document.createElement("span"); this.label.className = "fieldname"; this.appendChild(this.label);