Feature: i18nMark should accept default value
See original GitHub issueI’m wondering why i18nMark
doesn’t accept a default value? why just an Id? I think it’s use is similar to defineMessages
of react-intl.
Our use case is to create a json translations resource file from an object of key value pairs in source code.
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
API Reference - React (@lingui/react) - LinguiJS
Default rendering component can be set using defaultComponent prop in <I18nProvider>. ... Component passed to render will receive the translation value as a ......
Read more >Essentials - i18next documentation
In case you're using the saveMissing functionality, it will also pass the defaultValue to your chosen backend, like shown in this React.js example....
Read more >Default parameters - JavaScript - MDN Web Docs
Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
Read more >JavaScript @lingui/react i18nMark Examples
JavaScript i18nMark - 30 examples found. These are the top rated real world JavaScript examples of @lingui/react.i18nMark extracted from open source ...
Read more >How to use the @lingui/react.i18nMark function in ... - Snyk
HELD_ARCANA]) export default class ArcanaTracking extends Module { static ... type: "TYPE_NOT_BOOLEAN", message: i18nMark("Must be a boolean value") } ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tricoder42 you got it. From my point of view I don’t ever want a situation in which the developer has to maintain the integrity of both the source code and the message catalog. Either the message catalog is generated from the source code (which you’ve done a great job at) OR the source code can reference the catalog having a guarantee that the key value pair exists.
@FredyC Yeah, you’re right! Edited and fixed, thank you!