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

Feature: Add i18n module #575

Merged
merged 35 commits into from
Apr 9, 2024
Merged

Feature: Add i18n module #575

merged 35 commits into from
Apr 9, 2024

Conversation

mayan-000
Copy link
Collaborator

@mayan-000 mayan-000 commented Mar 25, 2024

Description

This PR adds the i18n module which exports the Singleton class for handling the request for text translation and parsing the substitutions accordingly.

Relevant Technical Choices

  • Introduce a new i18n package for exporting the class for handling the request for text translation and parsing the substitutions accordingly.
  • Create _locales file in i18n package, and have translation of each package, eg. _locales/cli/messages.json
  • Add script to merge package's json file into _locales/en/messages.json file
  • Write scripts to extract translatable text from files like open-cookie-database.json, PSInfo.json, related_website_sets.json and merge with a single message.json.

Below pointers will be taken care in upcoming PRs

  • Use translation functions in all package like design-system, common, extension, library-detection, cli-dashboard
  • Get translation done for all required languages.
  • Handle new changes and string updation.
  • Add testcases for functionality.

Testing Instructions

  • This PR only adds i18n infrastructure, it doesn't implement any functions of i18n module.
  • The only testing this PR need is that all functionality is working without any breakage.

Additional Information:

Screenshot/Screencast


Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

Fixes #566

@mayan-000 mayan-000 changed the title Feature: Add I18n module Feature: Add i18n module Mar 25, 2024
@mayan-000 mayan-000 self-assigned this Mar 25, 2024
@mohdsayed mohdsayed added this to the v0.7.0 milestone Mar 28, 2024
@mohdsayed mohdsayed added the feature Feature/capability of the tool label Mar 28, 2024
@mayan-000 mayan-000 marked this pull request as ready for review April 9, 2024 04:01
@mohdsayed

This comment was marked as resolved.

@mayan-000 mayan-000 requested a review from mohdsayed April 9, 2024 06:33
@mohdsayed mohdsayed merged commit a83a404 into develop Apr 9, 2024
4 checks passed
@mohdsayed mohdsayed deleted the feat/add-i18n branch April 9, 2024 06:54
@mohdsayed mohdsayed mentioned this pull request Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature/capability of the tool
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants