-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable pseudolocalization from pseudolocale folder #836
Enable pseudolocalization from pseudolocale folder #836
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/lingui-js/js-lingui/h9c3mabfw |
docs/tutorials/cli.rst
Outdated
The pseudolocalization is automatically created from default messages. | ||
PseudoLocale string have to be in `locale` config as well. Otherwise no folder is going to be created. | ||
Pseudolocalized text is created on ``yarn compile`` command. | ||
The pseudolocalization is automatically created from TODOTODOTODO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have already in documentation what is the prioritisation of compiling messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. It's:
- translation
- fallback (using the new
fallbackLocales
) - message key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be worth adding it to documentation? I just can't figure out where it could fit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, absolutely. Somewhere inside compile
docs? Because it ultimately happens at compile step.
Codecov Report
@@ Coverage Diff @@
## main #836 +/- ##
========================================
Coverage 83.74% 83.75%
========================================
Files 39 51 +12
Lines 1335 1625 +290
Branches 357 457 +100
========================================
+ Hits 1118 1361 +243
- Misses 129 158 +29
- Partials 88 106 +18
Continue to review full report at Codecov.
|
Would these changes resolve #838 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the status of this PR? I see you've removed some code, but I don't see anything that replaces it. That code was just obsolete?
docs/tutorials/cli.rst
Outdated
The pseudolocalization is automatically created from default messages. | ||
PseudoLocale string have to be in `locale` config as well. Otherwise no folder is going to be created. | ||
Pseudolocalized text is created on ``yarn compile`` command. | ||
The pseudolocalization is automatically created from TODOTODOTODO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, absolutely. Somewhere inside compile
docs? Because it ultimately happens at compile step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will improve documentation and then it can be merged
Co-authored-by: Tomáš Ehrlich <tomas.ehrlich@gmail.com>
Co-authored-by: Tomáš Ehrlich <tomas.ehrlich@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! I've just did a last check and found two small typos. Could you please check?
Co-authored-by: Tomáš Ehrlich <tomas.ehrlich@gmail.com>
I am happy with the changes. I have tested them and it looks to be working for me. |
73a23fe
to
3c53c19
Compare
This PR utilises standard getTranslation eg. we first try to get translation from locale folder, then from fallback, and then keys, etc...
This will allow us to set text that is going to be pseudolocalized and it will close #744
I do not think there is a reason to change to pseudolocalizing on extract, but it will solve the issue @nathanforce is having.