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: Improve localization workflow such that it allows for branch/PR focused translation #8565

Merged
merged 5 commits into from
Apr 17, 2024

Conversation

desi
Copy link
Contributor

@desi desi commented Feb 11, 2024

This allows for branch/PR focused translations

Description

Currently, translation only happens once changes to the en.json file are merged to main. These changes could include new keys being added or changes to english text. What this means is that there is no way currently to require that translations be in place before the feature goes live. It could make it through translation before being released but there is currently no way to require that we wait for translations.

Related issues

Fixes: 8564

Manual testing steps - To be done after merge and with Desi

Use case 1 (feature branch requires translation):

  • Developer creates a branch for feature which requires translations
  • They add keys or change english source and when they are ready for translations to be done they create a PR and add the label “ready-for-translation”
  • Manually trigger crowdin-branch-pr-ready-for-translation.yml ON THE BRANCH
  • Confirm branch created in crowdin with just the untranslated keys (plus any untranslated ones from main or any translated but not merged keys from main) - This is where we could get confusion on the BLEND side.
  • Wait for translations (Desi will likely have to talk to BLEND to let them know what we are doing and get these translations done so that we can finish out the test)
  • Manually trigger the translation check before translations complete (confirm no translation PR created)
  • Manually trigger the translation check after translations complete (confirm PR created off this branch)
  • Merge translation PR into branch, manually remove label (later PR will do this automatically), manually delete localization branch for this branch (later PR will do this automatically)
  • Merge PR for feature to main
  • Manually trigger crowdin-upload-both-sources-translations.yml and ensure translations show on main in crowdin.
  • Manually trigger crowdin-branch-cleanup.yml and make sure the branch is removed from crowdin

Use Case 2 (main branch translations):

  • Developer is working just normally and adds new keys or changes english version in some way.
  • They go through normal PR flow once they merge to main
  • Manually trigger crowdin-upload-both-sources-translations.yml
  • Confirm new keys are on main
  • Work with Blend to get one thing translated so we can see crowdin-pull-branch-pr-completed-translations.yml pull down the partial translation
  • Manually trigger crowdin-pull-branch-pr-completed-translations.yml and check the localization PR has the translations.

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

github-actions bot commented Feb 11, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.50%. Comparing base (7012f65) to head (7c86692).
Report is 187 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8565      +/-   ##
==========================================
+ Coverage   40.90%   45.50%   +4.60%     
==========================================
  Files        1245     1275      +30     
  Lines       30150    31202    +1052     
  Branches     2895     3184     +289     
==========================================
+ Hits        12333    14199    +1866     
+ Misses      17114    16163     -951     
- Partials      703      840     +137     

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

@desi
Copy link
Contributor Author

desi commented Feb 13, 2024

I have read the CLA Document and I hereby sign the CLA

Copy link

sonarcloud bot commented Feb 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@desi desi changed the title Improve localization workflow such that it allows for branch/PR focused translation feat:Improve localization workflow such that it allows for branch/PR focused translation Feb 16, 2024
@desi desi changed the title feat:Improve localization workflow such that it allows for branch/PR focused translation feat: Improve localization workflow such that it allows for branch/PR focused translation Feb 16, 2024
@desi desi added release-7.17.0 Issue or pull request that will be included in release 7.17.0 No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. team-wallet-framework labels Feb 16, 2024
@desi desi added release-7.18.0 Issue or pull request that will be included in release 7.18.0 and removed release-7.17.0 Issue or pull request that will be included in release 7.17.0 labels Feb 27, 2024
@desi desi added release-7.19.0 Issue or pull request that will be included in release 7.19.0 and removed release-7.18.0 Issue or pull request that will be included in release 7.18.0 labels Mar 18, 2024
@desi desi force-pushed the feat/dm-improve-localization branch 2 times, most recently from 7897cdb to 7c86692 Compare March 20, 2024 22:31
 -  This allows for branch/PR focused translations
@desi desi force-pushed the feat/dm-improve-localization branch from 7c86692 to dc227bd Compare March 20, 2024 23:05
@desi desi marked this pull request as ready for review March 20, 2024 23:27
@desi desi requested a review from a team as a code owner March 20, 2024 23:27
@desi desi requested a review from a team April 14, 2024 18:53
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Apr 14, 2024
@gauthierpetetin gauthierpetetin added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 15, 2024
Copy link

sonarcloud bot commented Apr 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Looks good!

@desi desi merged commit 3ef99f1 into main Apr 17, 2024
31 checks passed
@desi desi deleted the feat/dm-improve-localization branch April 17, 2024 17:24
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 17, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2024
@metamaskbot metamaskbot added the release-7.22.0 Issue or pull request that will be included in release 7.22.0 label Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. release-7.19.0 Issue or pull request that will be included in release 7.19.0 release-7.22.0 Issue or pull request that will be included in release 7.22.0 team-wallet-framework
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Feat]: Improve localization workflow such that it allows for branch/PR focused translation
6 participants