Skip to content
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

feat(i18nHelpers): sw-922 apply testId to copy #1079

Merged
merged 2 commits into from
Mar 14, 2023

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Mar 14, 2023

What's included

  • refactor(i18nHelpers): sw-922 translate break apart
  • feat(i18nHelpers): sw-922 apply testId to copy

Notes

  • exposes a testId prop for i18next to allow either the use of the locale string key on a span with a data-test attribute wrapped around the immediate copy, or a custom identifier
  • this does restructure aspects of our i18next implementation

How to test

Coverage and basic unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test
  3. confirm tests come back clean

Check the build

  1. update the NPM packages with $ yarn
  2. $ yarn build
  3. confirm tests come back clean

Example

...

Updates issue/story

sw-922

@cdcabrera cdcabrera added the 202304 project phase label Mar 14, 2023
@cdcabrera cdcabrera force-pushed the sw-922-enhance-i18next branch from 5273fdf to 0bc5ba8 Compare March 14, 2023 01:03
@codecov-commenter
Copy link

Codecov Report

Merging #1079 (0bc5ba8) into dev (047387f) will increase coverage by 0.02%.
The diff coverage is 92.85%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1079      +/-   ##
==========================================
+ Coverage   93.50%   93.53%   +0.02%     
==========================================
  Files         123      123              
  Lines        4128     4159      +31     
  Branches     1681     1695      +14     
==========================================
+ Hits         3860     3890      +30     
- Misses        250      253       +3     
+ Partials       18       16       -2     
Impacted Files Coverage Δ
src/common/helpers.js 100.00% <ø> (ø)
src/components/i18n/i18nHelpers.js 92.68% <92.85%> (+4.58%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 047387f...0bc5ba8. Read the comment docs.

@cdcabrera cdcabrera changed the title feat(i18nHelpers): sw-922 apply isTestId to copy feat(i18nHelpers): sw-922 apply testId to copy Mar 14, 2023
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Mar 14, 2023
…nsights#1079)

* helpers, move noopTranslate
* i18nHelpers, break apart for testing, noopTranslate
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Mar 14, 2023
@cdcabrera cdcabrera force-pushed the sw-922-enhance-i18next branch from 0bc5ba8 to 329b10e Compare March 14, 2023 01:17
@cdcabrera cdcabrera force-pushed the sw-922-enhance-i18next branch from 329b10e to a195d07 Compare March 14, 2023 01:30
@cdcabrera cdcabrera merged commit 09c67be into RedHatInsights:dev Mar 14, 2023
cdcabrera added a commit that referenced this pull request Mar 14, 2023
* helpers, move noopTranslate
* i18nHelpers, break apart for testing, noopTranslate
cdcabrera added a commit that referenced this pull request Mar 21, 2023
* helpers, move noopTranslate
* i18nHelpers, break apart for testing, noopTranslate
cdcabrera added a commit that referenced this pull request Apr 6, 2023
* helpers, move noopTranslate
* i18nHelpers, break apart for testing, noopTranslate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202304 project phase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants