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

Adding localization #445

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Future998
Copy link
Contributor

  • Replaced the text for localization.
  • Added Select to select the language in the Header.
  • Localization of the DateTime format.
  • Added Russian language.

@rchincha
Copy link
Contributor

@Future998 thanks for the PR.

@rchincha
Copy link
Contributor

image

@rchincha
Copy link
Contributor

@Future998 seems to be working nicely.

Can you pls rebase and fix the merge conflicts?

Copy link
Contributor

@andaaron andaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rchincha
Copy link
Contributor

rchincha commented Nov 1, 2024

@Future998 pls address the ci failures.

@Future998 Future998 force-pushed the localization branch 4 times, most recently from 3dd802a to 0eef473 Compare November 5, 2024 11:17
@Future998
Copy link
Contributor Author

@rchincha, OK, it's ready

Copy link

codecov bot commented Nov 9, 2024

Codecov Report

Attention: Patch coverage is 89.84375% with 13 lines in your changes missing coverage. Please review.

Project coverage is 84.25%. Comparing base (c78b303) to head (384723a).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/components/Login/ThirdPartyLoginComponents.jsx 25.00% 3 Missing ⚠️
src/components/Header/Header.jsx 71.42% 2 Missing ⚠️
src/components/Shared/TagCard.jsx 83.33% 1 Missing ⚠️
src/components/User/ApiKeys/ApiKeyCard.jsx 0.00% 1 Missing ⚠️
...rc/components/User/ApiKeys/ApiKeyConfirmDialog.jsx 0.00% 1 Missing ⚠️
src/components/User/ApiKeys/ApiKeyDialog.jsx 0.00% 1 Missing ⚠️
src/components/User/ApiKeys/ApiKeyRevokeDialog.jsx 0.00% 1 Missing ⚠️
src/components/User/ApiKeys/ApiKeys.jsx 0.00% 1 Missing ⚠️
src/utilities/i18n.js 0.00% 1 Missing ⚠️
.../utilities/vulnerabilityAndSignatureComponents.jsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #445      +/-   ##
==========================================
- Coverage   85.00%   84.25%   -0.76%     
==========================================
  Files          63       64       +1     
  Lines        1961     2039      +78     
  Branches      532      541       +9     
==========================================
+ Hits         1667     1718      +51     
- Misses        284      308      +24     
- Partials       10       13       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Future998
Copy link
Contributor Author

I don't quite understand what to do next?

@Future998 Future998 force-pushed the localization branch 2 times, most recently from 4f37f4e to 73b21a5 Compare November 14, 2024 17:01
@Future998
Copy link
Contributor Author

@rchincha, OK, it's ready

@rchincha
Copy link
Contributor

@Future998 This PR is a little late for the very next release. Will consider this for the next release after.
Also canvasing feedback from the community about ii8n in OCI registries in general.

Copy link
Collaborator

@raulkele raulkele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. The changes look good to me. If we want to add localisation, this will also set the basis for implementing other locales.


const { t, i18n } = useTranslation();
const [selectedLanguage, setSelectedLanguage] = useState(i18n.language);
const handleLanguageChange = (event) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test with language selection would be good to have, just to have it covered as it would be a new feature

- Replaced the text for localization.
- Added Select to select the language in the Header.
- Localization of the DateTime format.
- Added Russian language.

Signed-off-by: Alexander Burmatov <[email protected]>
The translation of the application affected the tests.

Signed-off-by: Alexander Burmatov <[email protected]>
Signed-off-by: Alexander Burmatov <[email protected]>
@Future998
Copy link
Contributor Author

Like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants