From 8074245758c1f3c316f755855a7713ccee0de090 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 8 Sep 2024 21:19:13 +0300 Subject: [PATCH] client: Translate shared info --- src/public/app/widgets/shared_info.js | 7 ++++--- src/public/translations/en/translation.json | 5 +++++ src/public/translations/ro/translation.json | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/public/app/widgets/shared_info.js b/src/public/app/widgets/shared_info.js index 9183a5c2c..e6a6ad33e 100644 --- a/src/public/app/widgets/shared_info.js +++ b/src/public/app/widgets/shared_info.js @@ -1,6 +1,7 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js"; import options from "../services/options.js"; import attributeService from "../services/attributes.js"; +import { t } from "../services/i18n.js"; const TPL = `
@@ -13,7 +14,7 @@ const TPL = ` } - . For help visit wiki. + . ${t("shared_info.help_link")}
`; export default class SharedInfoWidget extends NoteContextAwareWidget { @@ -36,7 +37,7 @@ export default class SharedInfoWidget extends NoteContextAwareWidget { if (syncServerHost) { link = `${syncServerHost}/share/${shareId}`; - this.$sharedText.text("This note is shared publicly on"); + this.$sharedText.text(t("shared_info.shared_publicly")); } else { let host = location.host; @@ -47,7 +48,7 @@ export default class SharedInfoWidget extends NoteContextAwareWidget { } link = `${location.protocol}//${host}${location.pathname}share/${shareId}`; - this.$sharedText.text("This note is shared locally on"); + this.$sharedText.text(t("shared_info.shared_locally")); } this.$sharedLink.attr("href", link).text(link); diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 9e08beac4..d842120e0 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -1276,5 +1276,10 @@ "export": "Export", "import-into-note": "Import into note", "apply-bulk-actions": "Apply bulk actions" + }, + "shared_info": { + "shared_publicly": "This note is shared publicly on", + "shared_locally": "This note is shared locally on", + "help_link": "For help visit wiki." } } diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json index 7bc5ccfb6..598698d7c 100644 --- a/src/public/translations/ro/translation.json +++ b/src/public/translations/ro/translation.json @@ -1276,5 +1276,10 @@ "search-in-subtree": "Caută în ierarhie", "sort-by": "Ordonare după...", "unprotect-subtree": "Deprotejează ierarhia" + }, + "shared_info": { + "help_link": "Pentru informații vizitați wiki-ul.", + "shared_locally": "Această notiță este partajată local la", + "shared_publicly": "Această notiță este partajată public la" } }