Translations with variables stopped working on production after update
See original GitHub issueI had a similar issue earlier, but now I have tried everything, with zero results 😕 After updating lingui-react to 1.1.1 and updating babel plugin to the latest version, some of my translation stopped working (in production -> dev = undefined). Only those, which have a variable or component inside and are untranslated, eg.
"Výsledky hledání pro <0>{searchedString}</0>": {
"translation": "",
"origin": [
[
"src\\components\\pages\\SearchResults.js",
34
]
]
}
SearchResults.js:
<Trans>
Výsledky hledání pro <span className={cls.highlight}>{searchedString}</span>
</Trans>
It renders Výsledky hledání pro {searchedString}
. I tried to extract & compile my catalog several times… only thing that works, is adding a translation, which is impossible for me to do for every such translation for every language at this point of this project 😞 .
I hope it has a simple solution or I am doing something very wrong.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
django fails to translate strings containing several variables
Edit2: It seems to be a bigger, repeating problem. Common attribute in these cases is that the string contains several variables. django ...
Read more >Change variable name to preferred language using scripting
Solved: Hello Community, I'm stuck on one request catalog item/form in ServiceNow. The short story is, when for example employee from other ...
Read more >The complexities of translation and the need for dynamic ...
Translation is a complex undertaking that usually requires you to take advantage of dynamic variables and other parameters in your source ...
Read more >24 Working with dates and times - Stata
You specify the appropriate display format for the new variable so that, rather than displaying ... With that specification, date() could not only...
Read more >Translation API overview - Drupal
For the most part, you cannot use variables inside t() calls, because the pattern matching used to extract translatable text will not know...
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
Coolio! I’m just working on the fix, should be ready in an hour. Thank you for your feedback 👍
Also, new CLI options published in docs