Skip to content

Commit

Permalink
docs typos
Browse files Browse the repository at this point in the history
  • Loading branch information
eddow committed Jun 10, 2024
1 parent fad09ee commit c321e91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Setting the locales can be done with `i18nClient.setLocales([...])`.
### Other locales

The `I18nClient` also have 2 properties:
The `I18nClient` also has 2 properties:

- `timeZone`: A timezone used when displaying dates (if none is specified) with [this format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)
- `currency`: A currency to use when displaying a number with `style: currency` (3-uppercase code: USD, EUR, ...)
Expand Down
6 changes: 3 additions & 3 deletions docs/interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ Object.assign(processors, {
Where `TContext` contains mostly the `client` (the object containing all the language specification)
The arguments will mainly be strings or object when flat named lists are specified

The syntax to use them is `{processor | arg1 | arg2}`.
The syntax to use them is `{processor:: arg1 | arg2}`.

example: `{upper | $1}` will render the first argument in upper-case
example: `{upper :: $1}` will render the first argument in upper-case

> :information_source: `{$2[upper] | $1}` is also possible, in which case the second argument can both specify a text key, a processor or be defaulted to the `upper` processor.
> :information_source: `{$2[upper] :: $1}` is also possible, in which case the second argument can both specify a text key, a processor or be defaulted to the `upper` processor.
#### Casing

Expand Down
1 change: 1 addition & 0 deletions src/client/interpolation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const formats: Record<'date' | 'number' | 'relative', Record<string, obje
}

export const processors: Record<string, (...args: any[]) => string> = {
// TODO Interpolation should have access to localeFlagsEngine
upper(str: string) {
return str.toUpperCase()
},
Expand Down

0 comments on commit c321e91

Please sign in to comment.