Skip to content

Build your personal knowledge base with Trilium Notes

feat(code): add translations for settings change

Elian Doranfac16ffd2ab7
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 6ba46d7e2d..6bd1657f51 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1246,13 +1246,11 @@
"reprocessing_embeddings": "Reprocessing...",
"reprocess_started": "Embedding reprocessing started in the background",
"reprocess_error": "Error starting embedding reprocessing",
-
"reprocess_index": "Rebuild Search Index",
"reprocess_index_description": "Optimize the search index for better performance. This uses existing embeddings without regenerating them (much faster than reprocessing all embeddings).",
"reprocessing_index": "Rebuilding...",
"reprocess_index_started": "Search index optimization started in the background",
"reprocess_index_error": "Error rebuilding search index",
-
"index_rebuild_progress": "Index Rebuild Progress",
"index_rebuilding": "Optimizing index ({{percentage}}%)",
"index_rebuild_complete": "Index optimization complete",
@@ -1952,5 +1950,10 @@
},
"svg": {
"export_to_png": "The diagram could not be exported to PNG."
+ },
+ "code_theme": {
+ "title": "Appearance",
+ "word_wrapping": "Word wrapping",
+ "color-scheme": "Color scheme"
}
}
diff --git a/apps/client/src/widgets/type_widgets/options/code_notes/code_theme.ts b/apps/client/src/widgets/type_widgets/options/code_notes/code_theme.ts
index a47d9144cf..f56aff682e 100644
--- a/apps/client/src/widgets/type_widgets/options/code_notes/code_theme.ts
+++ b/apps/client/src/widgets/type_widgets/options/code_notes/code_theme.ts
@@ -3,6 +3,7 @@ import OptionsWidget from "../options_widget";
import server from "../../../../services/server";
import CodeMirror, { getThemeById } from "@triliumnext/codemirror";
import { DEFAULT_PREFIX } from "../../abstract_code_type_widget";
+import { t } from "../../../../services/i18n";
// TODO: Deduplicate
interface Theme {
@@ -83,18 +84,18 @@ export default class CodeMirror extends EditorView {
const TPL = /*html*/`\
<div class="options-section">
- <h4>Color theme</h4>
+ <h4>${t("code_theme.title")}</h4>
<div class="form-group row">
<div class="col-md-6">
- <label for="color-theme">Color scheme</label>
+ <label for="color-theme">${t("code_theme.color-scheme")}</label>
<select id="color-theme" class="theme-select form-select"></select>
</div>
<div class="col-md-6 side-checkbox">
<label class="form-check tn-checkbox">
<input type="checkbox" class="word-wrap form-check-input" />
- Word Wrapping
+ ${t("code_theme.word_wrapping")}
</label>
</div>
</div>