metamask-mobile
metamask-mobile copied to clipboard
feat: Improve localization workflow such that it allows for branch/PR focused translation
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
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
- [x] I’ve followed MetaMask Coding Standards.
- [x] I've clearly explained what problem this PR is solving and how it is solved.
- [x] I've linked related issues
- [x] 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.
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 Report
All modified and coverable lines are covered by tests :white_check_mark:
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I have read the CLA Document and I hereby sign the CLA
Quality Gate passed
Issues
0 New issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication