Skip to content

Build your personal knowledge base with Trilium Notes

client: Translate shared info

Elian Doran8074245758c1
diff --git a/src/public/app/widgets/shared_info.js b/src/public/app/widgets/shared_info.js
index 9183a5c2c0..e6a6ad33e3 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 = `
<div class="shared-info-widget alert alert-warning">
@@ -13,7 +14,7 @@ const TPL = `
}
</style>
- <span class="shared-text"></span> <a class="shared-link external"></a>. For help visit <a href="https://triliumnext.github.io/Docs/Wiki/sharing.html">wiki</a>.
+ <span class="shared-text"></span> <a class="shared-link external"></a>. ${t("shared_info.help_link")}
</div>`;
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 9e08beac43..d842120e08 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 <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki</a>."
}
}
diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json
index 7bc5ccfb6e..598698d7c0 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 <a href=\"https://triliumnext.github.io/Docs/Wiki/sharing.html\">wiki-ul</a>.",
+ "shared_locally": "Această notiță este partajată local la",
+ "shared_publicly": "Această notiță este partajată public la"
}
}