refactor(llm): proper translation use for element interpolation

This commit is contained in:
Elian Doran
2026-04-01 15:01:31 +03:00
parent ab2467b074
commit bb72b0cdfc
4 changed files with 14 additions and 7 deletions

View File

@@ -313,6 +313,7 @@ Trilium provides powerful user scripting capabilities:
- Translation files in `apps/client/src/translations/`
- Use translation system via `t()` function
- Automatic pluralization: Add `_other` suffix to translation keys (e.g., `item` and `item_other` for singular/plural)
- When a translated string contains **interpolated components** (e.g. links, note references) whose order may vary across languages, use `<Trans>` from `react-i18next` instead of `t()`. This lets translators reorder components freely (e.g. `"<Note/> in <Parent/>"` vs `"in <Parent/>, <Note/>"`)
## Testing Conventions