Call missingMessage when translation key is empty
See original GitHub issuePlease consider the scenario where we have 2 translation files:
# en-us.yml
sample_translation:
translation_1: Lorem ipsum
translation_2: dolor sit amet
# de-de.yml
sample_translation:
translation_1: Lorem ipsum
translation_2:
In this case while using German translations within the application, when we encounter sample_translation.translation_2
an error ‚A message must be provided as a String or AST.’ will be thrown and app will break.
If we could run missingMessage
not only when translation is undefined
, but also when it is null
(key exists but there is no translation text) the error from MessageFormat
won’t be thrown.
What do you think? Does it make any sense?
If it does, I can try to prepare PR for this one 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Firebase transaction api call current data is null - Stack Overflow
Firebase usually returns a null value while retrieving a key for the first time but while saving it checks if the new value...
Read more >My transaction didn't process and I received a transaction ...
Pick up Card, This error message implies that the credit card being used has been reported lost or stolen with the credit card...
Read more >Error Codes Guide - Developer Central - Verifone
Display Message Additional Display Message Possible Reasons for the Message
Success The transaction is successful.
Transaction Cancelled Operator Abort
Transaction Cancelled Operator Timeout
Read more >Posting keys for account determination for transaction RWS do ...
Because the posting key is missing, the system cannot generate any automatic postings. Maintain the posting keys necessary for transaction RWS.
Read more >Payment Transaction Response Codes - Worldpay Support
Response Code Response Message Response Type
001 Transaction Received Info
000 Approved Approved
010 Partially Approved Approved
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
Hm, I see. 🙂
Maybe it would make more sense to strip these
null
keys during build time, since they unnecessarily inflate the size of the translations bundle?If your translations tool does not support that, I’m sure we can accommodate for that. We wanted to beef up our build pipeline anyway. 💪
Would this be an alright solution for you?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.