question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: i18nMark should accept default value

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
HamidAghdaeecommented, Aug 8, 2018

@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.

0reactions
tricoder42commented, Sep 11, 2018

@FredyC Yeah, you’re right! Edited and fixed, thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found