Skip to content

Commit

Permalink
b4 plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
eddow committed Jun 20, 2024
1 parent d6acdbc commit 43c7bb8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ error(key: string, error: string, spec: object): string

## TODO

- make the difference between a missing key (dev issue) or a missing translation in the key (translator issue)
- tests:
- interpolation errors
- deserialization errors
Expand Down
2 changes: 1 addition & 1 deletion docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ We'll call them for commodity the client-side client (CSC) and server-side clien

When the application knows well it enters several zones while doing an action (like login-in if zoned by rights), it might be interesting for the SSC to provide a differential in the loaded dictionary in one packet instead of relying on further requests through the regular `condense` mechanism.

For this, **after** SSR-rendering, `payload = SSC.getPartialLoad(excludedZones: Zone[] = [])` can be called with the list of zones the CSC **already** possess. It will return a completely json-able in a compact format of the loaded dictionary
For this, **after** SSR-rendering, `payload = SSC.getPartialLoad(excludedZones: Zone[] = [])` can be called with the list of zones the CSC **already** possess. It will return a completely json-able differential of the zones the CSC misses.

This partial answer can be conveyed in the answer with the action' results (especially useful in a page load action) and given to the CSC with `CSC.usePartial(payload)`

Expand Down
6 changes: 4 additions & 2 deletions docs/interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,17 @@ Its format is the one taken by `Date.toLocaleString()`
We of course speak about the ones hard-coded in the Intl javascript core of Node and the browsers.

- `relative(n, opt?)` where `n` is number+unit (ex. `1month` or `-2 seconds`) - just forwards to `Intl.RelativeTimeFormat`. Note that there is a `formats.relative` like for dates or number
- `DisplayNames`: relative to `Intl.DisplayNames`
- relative to `Intl.DisplayNames`:
- `region(c)` ex: 'HU' -> "Hungary"
- `language(c)` ex: 'en-UK' -> "British English"
- `script(c)` ex: 'Kana' -> "Katakana"
- `currency(c)` ex: 'USD' -> "Us dollars"
- `list(x, y, z, ..., opt?)` where arguments can be array (this will be flattened) allows the "..., ... and ..." auto-formating - cfr. `Intl.ListFormat`
-

### Plurals and ordinals

These two processors use a specific key, respectively `internals.plurals` and `internal.ordinals`.
These two processors use a specific key, respectively `internals.plurals` and `internals.ordinals`.
These key contain js-like object who, for english would be:

```
Expand Down

0 comments on commit 43c7bb8

Please sign in to comment.