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
add translation for 2 widgets
Nriver83388ecf1c8f
diff --git a/src/public/app/widgets/find.js b/src/public/app/widgets/find.jsindex cf505aab19..5c24c36fad 100644--- a/src/public/app/widgets/find.js+++ b/src/public/app/widgets/find.js@@ -3,6 +3,7 @@* https://github.com/antoniotejada/Trilium-FindWidget*/+import { t } from "../services/i18n.js";import NoteContextAwareWidget from "./note_context_aware_widget.js";import FindInText from "./find_in_text.js";import FindInCode from "./find_in_code.js";@@ -53,12 +54,12 @@ const TPL = `<div class="form-check"><input type="checkbox" class="form-check-input find-widget-case-sensitive-checkbox">- <label tabIndex="-1" class="form-check-label">case sensitive</label>+ <label tabIndex="-1" class="form-check-label">${t('find.case_sensitive')}</label></div><div class="form-check"><input type="checkbox" class="form-check-input find-widget-match-words-checkbox">- <label tabIndex="-1" class="form-check-label">match words</label>+ <label tabIndex="-1" class="form-check-label">${t('find.match_words')}</label></div><div class="find-widget-found-wrapper">@@ -273,7 +274,7 @@ export default class FindWidget extends NoteContextAwareWidget {async entitiesReloadedEvent({loadResults}) {if (loadResults.isNoteContentReloaded(this.noteId)) {- this.$totalFound.text("?")- }+ this.$totalFound.text("?")+ }}}diff --git a/src/public/app/widgets/highlights_list.js b/src/public/app/widgets/highlights_list.jsindex 6c728c8b3e..ef4a0c2ac1 100644--- a/src/public/app/widgets/highlights_list.js+++ b/src/public/app/widgets/highlights_list.js@@ -5,6 +5,7 @@* - For example, if there is a formula in the middle of the highlighted text, the two ends of the formula will be regarded as two entries*/+import { t } from "../services/i18n.js";import attributeService from "../services/attributes.js";import RightPanelWidget from "./right_panel_widget.js";import options from "../services/options.js";@@ -43,14 +44,14 @@ const TPL = `<div class="highlights-list-widget">export default class HighlightsListWidget extends RightPanelWidget {get widgetTitle() {- return "Highlights List";+ return t("highlights_list_2.title");}get widgetButtons() {return [new OnClickButtonWidget().icon("bx-cog")- .title("Options")+ .title(t("highlights_list_2.options")).titlePlacement("left").onClick(() => appContext.tabManager.openContextWithNote('_optionsTextNotes', { activate: true })).class("icon-action"),diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.jsonindex 1421197ecd..892ac1c393 100644--- a/src/public/translations/cn/translation.json+++ b/src/public/translations/cn/translation.json@@ -1335,5 +1335,13 @@"toggle-on-hint": "将此笔记设为模板","toggle-off-hint": "取消笔记模板设置"},- "open-help-page": "打开帮助页面"+ "open-help-page": "打开帮助页面",+ "find": {+ "case_sensitive": "区分大小写",+ "match_words": "匹配单词"+ },+ "highlights_list_2": {+ "title": "高亮列表",+ "options": "选项"+ }}diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex 8f661f08b7..9e2c4916b0 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -602,10 +602,10 @@"sync_status": {"unknown": "<p>Sync status will be known once the next sync attempt starts.</p><p>Click to trigger sync now.</p>","connected_with_changes": "<p>Connected to the sync server. <br>There are some outstanding changes yet to be synced.</p><p>Click to trigger sync.</p>",- "connected_no_changes":"<p>Connected to the sync server.<br>All changes have been already synced.</p><p>Click to trigger sync.</p>",- "disconnected_with_changes":"<p>Establishing the connection to the sync server was unsuccessful.<br>There are some outstanding changes yet to be synced.</p><p>Click to trigger sync.</p>",- "disconnected_no_changes":"<p>Establishing the connection to the sync server was unsuccessful.<br>All known changes have been synced.</p><p>Click to trigger sync.</p>",- "in_progress":"Sync with the server is in progress."+ "connected_no_changes": "<p>Connected to the sync server.<br>All changes have been already synced.</p><p>Click to trigger sync.</p>",+ "disconnected_with_changes": "<p>Establishing the connection to the sync server was unsuccessful.<br>There are some outstanding changes yet to be synced.</p><p>Click to trigger sync.</p>",+ "disconnected_no_changes": "<p>Establishing the connection to the sync server was unsuccessful.<br>All known changes have been synced.</p><p>Click to trigger sync.</p>",+ "in_progress": "Sync with the server is in progress."},"left_pane_toggle": {"show_panel": "Show panel",@@ -1335,5 +1335,13 @@"toggle-on-hint": "Make the note a template","toggle-off-hint": "Remove the note as a template"},- "open-help-page": "Open help page"+ "open-help-page": "Open help page",+ "find": {+ "case_sensitive": "case sensitive",+ "match_words": "match words"+ },+ "highlights_list_2": {+ "title": "Highlights List",+ "options": "Options"+ }}