Replies: 2 comments 1 reply
-
|
This looks really good. One minor aesthetic suggestion -- as it is common for braces to represent objects/maps and brackets to represent lists/arrays, maybe wrap the key/value map in braces rather than brackets: |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
added in version |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Similar tho the
{select} formatin the ICU-syntax,typesafe-i18nshould be able to handleswitch-caseoptions.Main use-case is something like gender-related output, but it could be used for uther use-cases too.
I propose this could look like:
named keys
{0},{1},{2}, ...index-based keys
{key},{key2}, ...better readability trough spacing
Spacing is allowed and will be trimmed before inserting it into the sentence.
default case
A
default-caseshould be marked with*formatter chaining
It should be possible to chain it and pass it to another formatter
typesafety
This should be implemented in a typesafe way, so you would also need to pass the same options for all other translations.
Beta Was this translation helpful? Give feedback.
All reactions