mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	feat(code): add translations for settings change
This commit is contained in:
		
							parent
							
								
									e3aa8afcad
								
							
						
					
					
						commit
						fac16ffd2a
					
				| @ -1246,13 +1246,11 @@ | |||||||
|     "reprocessing_embeddings": "Reprocessing...", |     "reprocessing_embeddings": "Reprocessing...", | ||||||
|     "reprocess_started": "Embedding reprocessing started in the background", |     "reprocess_started": "Embedding reprocessing started in the background", | ||||||
|     "reprocess_error": "Error starting embedding reprocessing", |     "reprocess_error": "Error starting embedding reprocessing", | ||||||
| 
 |  | ||||||
|     "reprocess_index": "Rebuild Search Index", |     "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).", |     "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...", |     "reprocessing_index": "Rebuilding...", | ||||||
|     "reprocess_index_started": "Search index optimization started in the background", |     "reprocess_index_started": "Search index optimization started in the background", | ||||||
|     "reprocess_index_error": "Error rebuilding search index", |     "reprocess_index_error": "Error rebuilding search index", | ||||||
| 
 |  | ||||||
|     "index_rebuild_progress": "Index Rebuild Progress", |     "index_rebuild_progress": "Index Rebuild Progress", | ||||||
|     "index_rebuilding": "Optimizing index ({{percentage}}%)", |     "index_rebuilding": "Optimizing index ({{percentage}}%)", | ||||||
|     "index_rebuild_complete": "Index optimization complete", |     "index_rebuild_complete": "Index optimization complete", | ||||||
| @ -1952,5 +1950,10 @@ | |||||||
|   }, |   }, | ||||||
|   "svg": { |   "svg": { | ||||||
|     "export_to_png": "The diagram could not be exported to PNG." |     "export_to_png": "The diagram could not be exported to PNG." | ||||||
|  |   }, | ||||||
|  |   "code_theme": { | ||||||
|  |     "title": "Appearance", | ||||||
|  |     "word_wrapping": "Word wrapping", | ||||||
|  |     "color-scheme": "Color scheme" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ import OptionsWidget from "../options_widget"; | |||||||
| import server from "../../../../services/server"; | import server from "../../../../services/server"; | ||||||
| import CodeMirror, { getThemeById } from "@triliumnext/codemirror"; | import CodeMirror, { getThemeById } from "@triliumnext/codemirror"; | ||||||
| import { DEFAULT_PREFIX } from "../../abstract_code_type_widget"; | import { DEFAULT_PREFIX } from "../../abstract_code_type_widget"; | ||||||
|  | import { t } from "../../../../services/i18n"; | ||||||
| 
 | 
 | ||||||
| // TODO: Deduplicate
 | // TODO: Deduplicate
 | ||||||
| interface Theme { | interface Theme { | ||||||
| @ -83,18 +84,18 @@ export default class CodeMirror extends EditorView { | |||||||
| 
 | 
 | ||||||
| const TPL = /*html*/`\ | const TPL = /*html*/`\ | ||||||
| <div class="options-section"> | <div class="options-section"> | ||||||
|     <h4>Color theme</h4> |     <h4>${t("code_theme.title")}</h4> | ||||||
| 
 | 
 | ||||||
|     <div class="form-group row"> |     <div class="form-group row"> | ||||||
|         <div class="col-md-6"> |         <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> |             <select id="color-theme" class="theme-select form-select"></select> | ||||||
|         </div> |         </div> | ||||||
| 
 | 
 | ||||||
|         <div class="col-md-6 side-checkbox"> |         <div class="col-md-6 side-checkbox"> | ||||||
|             <label class="form-check tn-checkbox"> |             <label class="form-check tn-checkbox"> | ||||||
|                 <input type="checkbox" class="word-wrap form-check-input" /> |                 <input type="checkbox" class="word-wrap form-check-input" /> | ||||||
|                 Word Wrapping |                 ${t("code_theme.word_wrapping")} | ||||||
|             </label> |             </label> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran