mirror of
https://github.com/zadam/trilium.git
synced 2026-03-01 18:13:39 +01:00
1.2 KiB
Vendored
1.2 KiB
Vendored
Adding a new locale
Once the Weblate translations for a single language have reached ~50% in coverage, it's time to add it to the application.
To do so:
- In
packages/commonslook fori18n.tsand add a new entry toUNSORTED_LOCALESfor the language. - In
packages/commonslook fordayjs.tsand add a mapping for the new language inDAYJS_LOADER. Sort the entire list. - In
apps/client, look forcollections/calendar/index.tsxand modifyLOCALE_MAPPINGSto add support to the new language. - In
apps/client, look forwidgets/type_widgets/canvas/i18n.tsand modifyLANGUAGE_MAPPINGS. A unit test ensures that the language is actually loadable. - In
apps/client, look forwidgets/type_widgets/MindMap.tsxand modifyLOCALE_MAPPINGS. The type definitions should already validate if the new value is supported by Mind Elixir. - In
packages/ckeditor5, look fori18n.tsand modifyLOCALE_MAPPINGS. The import validation should already check if the new value is supported by CKEditor, and there's also a test to ensure it. - Locale mappings for PDF.js might need adjustment. To do so, in
packages/pdfjs-viewer/scripts/build.tsthere isLOCALE_MAPPINGS.