Changing domT to a default translation function for browser

This commit is contained in:
Jarosław Sadziński
2022-10-19 20:44:56 +02:00
parent 2586b595a5
commit 2f29df1b17
6 changed files with 58 additions and 23 deletions

View File

@@ -101,6 +101,17 @@ function makeAnonIntro(homeModel: HomeModel) {
css.docListHeader(t('HomeIntro.Welcome'), testId('welcome-title')),
```
Function `t` on the client side is also able to use `DomContents` values (so material produced by
the GrainJS library) for interpolation. For example:
```ts
dom('span', t('Argument', {
arg1: dom('span', 'First'),
arg2: dom.domComputed(obs, (value) => dom('span', value))
}));
```
Some things are not supported at this moment and will need to be addressed in future development
tasks: