feat(react-intl): added localization keys for all entries#2634
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2634 +/- ##
==========================================
- Coverage 86.37% 86.33% -0.04%
==========================================
Files 102 104 +2
Lines 1064 1083 +19
Branches 293 290 -3
==========================================
+ Hits 919 935 +16
- Misses 139 142 +3
Partials 6 6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
4c6a41f to
c2ce122
Compare
|
@benhalverson I moved the tests on the Basically my last commit is just moving the tests around, fixing eslint issues and that's it. |
And this extremely overcomplicated the review of PR.. I think such changes should be done in separate PRs next time. Because it confuses a lot and does not correlates with PR title |
| @@ -1 +1,73 @@ | |||
| {} | |||
| { | |||
| "blog.authors.list.title.by": "by ", | |||
There was a problem hiding this comment.
From my experience - translation values should not contain spaces like this
There was a problem hiding this comment.
Interesting, is there any real reason why? I believe in some cases it makes sense, but some cases are complex where arbitrary code happens. If you check where they're used, it might make sense. (As I didn't want to refactor the utility itself that is used for the list of authors)
There was a problem hiding this comment.
Usually it produces bugs in case translation team will accidentally remove spaces in other translation file and words will be merged all together in UI. If we need to have space there reliably - it better to have it in code/css than in translation file
True. I overcomplicated this PR by making such changes here. My process of thought was, "If we need basically to update every test here by updating the imports, I could just then reorganise the structure of the tests too". But indeed, it was overkill for this PR, will definitely attempt to avoid it in the future. But rest assured, the tests were not impacted, the changes are just files being moved. You can safely just hide these changes on the diff tab. |
|
Going to get #2654 merged first before rebasing this one and fixing its issues. |
c2ce122 to
ec27a53
Compare
|
@rodion-arr PR ready to be reviewed 🎉 |
2c0fe09 to
e7d860b
Compare
Check List
npm run lint:js -- --fixand/ornpm run lint:md -- --fixfor my JavaScript and/or Markdown changes.npm run testto check if all tests are passing, and/ornpm run test -- -uto update snapshots if I created and/or updated React Components.npm run buildandnpm run build-storybookwork fine.Description
This PR introduces react-intl within all App Components and pages, allowing to the content to be easily translated on the locale files.
This PR also updates tests and snapshots and adds test-utils for react-intl
Related Issues