client: Translate template switch

This commit is contained in:
Elian Doran 2024-09-08 22:14:51 +03:00
parent e4066ba164
commit 3bdb87d3aa
No known key found for this signature in database
3 changed files with 14 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import SwitchWidget from "./switch.js";
import attributeService from "../services/attributes.js";
import { t } from "../services/i18n.js";
/**
* Switch for the basic properties widget which allows the user to select whether the note is a template or not, which toggles the `#template` attribute.
@ -14,11 +15,11 @@ export default class TemplateSwitchWidget extends SwitchWidget {
doRender() {
super.doRender();
this.$switchOnName.text("Template");
this.$switchOnButton.attr("title", "Make the note a template");
this.$switchOnName.text(t("template_switch.template"));
this.$switchOnButton.attr("title", t("template_switch.toggle-on-hint"));
this.$switchOffName.text("Template");
this.$switchOffButton.attr("title", "Remove the note as a template");
this.$switchOffButton.attr("title", t("template_switch.toggle-off-hint"));
this.$helpButton.attr("data-help-page", "template.html").show();
this.$helpButton.on('click', e => utils.openHelp($(e.target)));

View File

@ -1312,5 +1312,10 @@
"toggle-off-title": "Unshare the note",
"shared-branch": "This note exists only as a shared note, unsharing would delete it. Do you want to continue and thus delete this note?",
"inherited": "Note cannot be unshared here because it is shared through inheritance from an ancestor."
},
"template_switch": {
"template": "Template",
"toggle-on-hint": "Make the note a template",
"toggle-off-hint": "Remove the note as a template"
}
}

View File

@ -1312,5 +1312,10 @@
"shared-branch": "Această notiță există doar ca o notiță partajată, anularea partajării ar cauza ștergerea ei. Sigur doriți ștergerea notiței?",
"toggle-off-title": "Anulează partajarea notițeii",
"toggle-on-title": "Partajează notița"
},
"template_switch": {
"template": "Șablon",
"toggle-off-hint": "Înlătură notița ca șablon",
"toggle-on-hint": "Marchează notița drept șablon"
}
}