mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Add tooltip for Toggly sticky icon
This commit is contained in:
parent
d7232212a8
commit
b6aa59f2c7
3 changed files with 9 additions and 2 deletions
|
@ -39,6 +39,7 @@ editing-subscript = Subscript
|
||||||
editing-superscript = Superscript
|
editing-superscript = Superscript
|
||||||
editing-tags = Tags
|
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-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-underline-text = Underline text
|
||||||
editing-unordered-list = Unordered list
|
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.
|
editing-warning-cloze-deletions-will-not-work = Warning, cloze deletions will not work until you switch the type at the top to Cloze.
|
||||||
|
|
|
@ -191,7 +191,7 @@ export function setFormat(cmd: string, arg?: string, nosave = false): void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const i18n = setupI18n({
|
export const i18n = setupI18n({
|
||||||
modules: [
|
modules: [
|
||||||
ModuleName.EDITING,
|
ModuleName.EDITING,
|
||||||
ModuleName.KEYBOARD,
|
ModuleName.KEYBOARD,
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
import type { EditorField } from "./editor-field";
|
import type { EditorField } from "./editor-field";
|
||||||
|
import * as tr from "lib/i18n";
|
||||||
|
|
||||||
import { registerShortcut } from "lib/shortcuts";
|
import { registerShortcut } from "lib/shortcuts";
|
||||||
import { bridgeCommand } from "./lib";
|
import { bridgeCommand } from "./lib";
|
||||||
import { getCurrentField, forEditorField } from ".";
|
import { appendInParentheses } from "./helpers";
|
||||||
|
import { getCurrentField, forEditorField, i18n } from ".";
|
||||||
import pinIcon from "./pin-angle.svg";
|
import pinIcon from "./pin-angle.svg";
|
||||||
|
|
||||||
function toggleStickyCurrentField() {
|
function toggleStickyCurrentField() {
|
||||||
|
@ -37,6 +39,10 @@ export class LabelContainer extends HTMLDivElement {
|
||||||
super();
|
super();
|
||||||
this.className = "d-flex justify-content-between";
|
this.className = "d-flex justify-content-between";
|
||||||
|
|
||||||
|
i18n.then(() => {
|
||||||
|
this.title = appendInParentheses(tr.editingToggleSticky(), "F9");
|
||||||
|
});
|
||||||
|
|
||||||
this.label = document.createElement("span");
|
this.label = document.createElement("span");
|
||||||
this.label.className = "fieldname";
|
this.label.className = "fieldname";
|
||||||
this.appendChild(this.label);
|
this.appendChild(this.label);
|
||||||
|
|
Loading…
Reference in a new issue