Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(i18n): translate geo map messages
Elian Dorand814a4d49fc0
diff --git a/src/public/app/widgets/floating_buttons/geo_map_button.ts b/src/public/app/widgets/floating_buttons/geo_map_button.tsindex 19e224048f..5fd9a341ef 100644--- a/src/public/app/widgets/floating_buttons/geo_map_button.ts+++ b/src/public/app/widgets/floating_buttons/geo_map_button.ts@@ -1,3 +1,4 @@+import { t } from "../../services/i18n.js";import NoteContextAwareWidget from "../note_context_aware_widget.js"const TPL = `\@@ -22,7 +23,7 @@ const TPL = `\<button type="button"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>`;export default class GeoMapButtons extends NoteContextAwareWidget {diff --git a/src/public/app/widgets/type_widgets/geo_map.ts b/src/public/app/widgets/type_widgets/geo_map.tsindex 299003e221..eb54dd4899 100644--- a/src/public/app/widgets/type_widgets/geo_map.ts+++ b/src/public/app/widgets/type_widgets/geo_map.ts@@ -128,7 +128,7 @@ export default class GeoMapTypeWidget extends TypeWidget {this.L = L;const map = this.geoMapWidget.map;if (!map) {- throw new Error("Unable to load map.");+ throw new Error(t("geo-map.unable-to-load-map"));}if (!this.note) {@@ -273,7 +273,7 @@ export default class GeoMapTypeWidget extends TypeWidget {icon: "plus",id: "geo-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);diff --git a/src/public/app/widgets/type_widgets/geo_map_context_menu.ts b/src/public/app/widgets/type_widgets/geo_map_context_menu.tsindex 12bbfaa915..f19d655c4b 100644--- a/src/public/app/widgets/type_widgets/geo_map_context_menu.ts+++ b/src/public/app/widgets/type_widgets/geo_map_context_menu.ts@@ -2,6 +2,7 @@ import appContext from "../../components/app_context.js";import type { ContextMenuEvent } from "../../menus/context_menu.js";import contextMenu from "../../menus/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) {contextMenu.show({@@ -9,9 +10,9 @@ export default function openContextMenu(noteId: string, e: ContextMenuEvent) {y: e.pageY,items: [...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: "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) => {if (command === "deleteFromMap") {diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex 4a24da87a1..b491882851 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -1630,5 +1630,14 @@},"note_tooltip": {"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"}}diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.jsonindex cf2ecfb7d5..9ffb158fd5 100644--- a/src/public/translations/ro/translation.json+++ b/src/public/translations/ro/translation.json@@ -1379,7 +1379,8 @@"image": "Imagine","launcher": "Scurtătură","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": {"toggle-off": "Deprotejează notița",@@ -1633,5 +1634,13 @@"notes": {"duplicate-note-suffix": "(dupl.)","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."}}diff --git a/translations/ro/server.json b/translations/ro/server.jsonindex 2f25db39d2..bc6e7519a2 100644--- a/translations/ro/server.json+++ b/translations/ro/server.json@@ -248,5 +248,8 @@"backend_log": {"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}}”."+ },+ "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."}}