mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
chore(i18n): translate geo map messages
This commit is contained in:
parent
5a40d3f020
commit
d814a4d49f
@ -1,3 +1,4 @@
|
|||||||
|
import { t } from "../../services/i18n.js";
|
||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js"
|
import NoteContextAwareWidget from "../note_context_aware_widget.js"
|
||||||
|
|
||||||
const TPL = `\
|
const TPL = `\
|
||||||
@ -22,7 +23,7 @@ const TPL = `\
|
|||||||
|
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="geo-map-create-child-note floating-button btn bx bx-folder-plus"
|
class="geo-map-create-child-note floating-button btn bx bx-folder-plus"
|
||||||
title="Create new child note and add it to the map" />
|
title="${t("geo-map.create-child-note-title")}" />
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
export default class GeoMapButtons extends NoteContextAwareWidget {
|
export default class GeoMapButtons extends NoteContextAwareWidget {
|
||||||
|
@ -128,7 +128,7 @@ export default class GeoMapTypeWidget extends TypeWidget {
|
|||||||
this.L = L;
|
this.L = L;
|
||||||
const map = this.geoMapWidget.map;
|
const map = this.geoMapWidget.map;
|
||||||
if (!map) {
|
if (!map) {
|
||||||
throw new Error("Unable to load map.");
|
throw new Error(t("geo-map.unable-to-load-map"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.note) {
|
if (!this.note) {
|
||||||
@ -273,7 +273,7 @@ export default class GeoMapTypeWidget extends TypeWidget {
|
|||||||
icon: "plus",
|
icon: "plus",
|
||||||
id: "geo-new-note",
|
id: "geo-new-note",
|
||||||
title: "New note",
|
title: "New note",
|
||||||
message: "Click on the map to create a new note at that location or press Escape to dismiss."
|
message: t("geo-map.create-child-note-instruction")
|
||||||
});
|
});
|
||||||
|
|
||||||
this.#changeState(State.NewNote);
|
this.#changeState(State.NewNote);
|
||||||
|
@ -2,6 +2,7 @@ import appContext from "../../components/app_context.js";
|
|||||||
import type { ContextMenuEvent } from "../../menus/context_menu.js";
|
import type { ContextMenuEvent } from "../../menus/context_menu.js";
|
||||||
import contextMenu from "../../menus/context_menu.js";
|
import contextMenu from "../../menus/context_menu.js";
|
||||||
import linkContextMenu from "../../menus/link_context_menu.js";
|
import linkContextMenu from "../../menus/link_context_menu.js";
|
||||||
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
export default function openContextMenu(noteId: string, e: ContextMenuEvent) {
|
export default function openContextMenu(noteId: string, e: ContextMenuEvent) {
|
||||||
contextMenu.show({
|
contextMenu.show({
|
||||||
@ -9,9 +10,9 @@ export default function openContextMenu(noteId: string, e: ContextMenuEvent) {
|
|||||||
y: e.pageY,
|
y: e.pageY,
|
||||||
items: [
|
items: [
|
||||||
...linkContextMenu.getItems(),
|
...linkContextMenu.getItems(),
|
||||||
{ title: "Open location", command: "openGeoLocation", uiIcon: "bx bx-map-alt" },
|
{ title: t("geo-map-context.open-location"), command: "openGeoLocation", uiIcon: "bx bx-map-alt" },
|
||||||
{ title: "----" },
|
{ title: "----" },
|
||||||
{ title: "Remove from map", command: "deleteFromMap", uiIcon: "bx bx-trash" }
|
{ title: t("geo-map-context.remove-from-map"), command: "deleteFromMap", uiIcon: "bx bx-trash" }
|
||||||
],
|
],
|
||||||
selectMenuItemHandler: ({ command }, e) => {
|
selectMenuItemHandler: ({ command }, e) => {
|
||||||
if (command === "deleteFromMap") {
|
if (command === "deleteFromMap") {
|
||||||
|
@ -1630,5 +1630,14 @@
|
|||||||
},
|
},
|
||||||
"note_tooltip": {
|
"note_tooltip": {
|
||||||
"note-has-been-deleted": "Note has been deleted."
|
"note-has-been-deleted": "Note has been deleted."
|
||||||
|
},
|
||||||
|
"geo-map": {
|
||||||
|
"create-child-note-title": "Create a new child note and add it to the map",
|
||||||
|
"create-child-note-instruction": "Click on the map to create a new note at that location or press Escape to dismiss.",
|
||||||
|
"unable-to-load-map": "Unable to load map."
|
||||||
|
},
|
||||||
|
"geo-map-context": {
|
||||||
|
"open-location": "Open location",
|
||||||
|
"remove-from-map": "Remove from map"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1379,7 +1379,8 @@
|
|||||||
"image": "Imagine",
|
"image": "Imagine",
|
||||||
"launcher": "Scurtătură",
|
"launcher": "Scurtătură",
|
||||||
"widget": "Widget",
|
"widget": "Widget",
|
||||||
"confirm-change": "Nu se recomandă schimbarea tipului notiței atunci când ea are un conținut. Procedați oricum?"
|
"confirm-change": "Nu se recomandă schimbarea tipului notiței atunci când ea are un conținut. Procedați oricum?",
|
||||||
|
"geo-map": "Hartă geografică (beta)"
|
||||||
},
|
},
|
||||||
"protect_note": {
|
"protect_note": {
|
||||||
"toggle-off": "Deprotejează notița",
|
"toggle-off": "Deprotejează notița",
|
||||||
@ -1633,5 +1634,13 @@
|
|||||||
"notes": {
|
"notes": {
|
||||||
"duplicate-note-suffix": "(dupl.)",
|
"duplicate-note-suffix": "(dupl.)",
|
||||||
"duplicate-note-title": "{{ noteTitle }} {{ duplicateNoteSuffix }}"
|
"duplicate-note-title": "{{ noteTitle }} {{ duplicateNoteSuffix }}"
|
||||||
|
},
|
||||||
|
"geo-map-context": {
|
||||||
|
"open-location": "Deschide locația",
|
||||||
|
"remove-from-map": "Înlătură de pe hartă"
|
||||||
|
},
|
||||||
|
"geo-map": {
|
||||||
|
"create-child-note-title": "Crează o notiță nouă și adaug-o pe hartă",
|
||||||
|
"unable-to-load-map": "Nu s-a putut încărca harta."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,5 +248,8 @@
|
|||||||
"backend_log": {
|
"backend_log": {
|
||||||
"log-does-not-exist": "Fișierul de loguri de backend „{{ fileName }}” nu există (încă).",
|
"log-does-not-exist": "Fișierul de loguri de backend „{{ fileName }}” nu există (încă).",
|
||||||
"reading-log-failed": "Nu s-a putut citi fișierul de loguri de backend „{{fileName}}”."
|
"reading-log-failed": "Nu s-a putut citi fișierul de loguri de backend „{{fileName}}”."
|
||||||
|
},
|
||||||
|
"geo-map": {
|
||||||
|
"create-child-note-instruction": "Clic pe hartă pentru a crea o nouă notiță la acea poziție sau apăsați Escape pentru a renunța."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user