michael-s-molina opened a new pull request #12595: URL: https://github.com/apache/superset/pull/12595
### SUMMARY This PR fixes translation files and updates translation generation docs. Previously most translations were commented and line number references in PO files were broken. When we followed the instructions in the section `Translating` of `CONTRIBUTING.md` all new texts were also commented and old texts were kept in translation files causing maintainability issues. Since all translation file texts were commented the PO to JSON generation also failed because it wouldn't identify any change. To fix these issues I applied the following process in this PR: - Uncommented all translation file texts - Updated all translation files with new texts and line number references - Merged previous translations with updated files - Removed all old texts (unused) - Changed the section `Translating` of `CONTRIBUTING.md` with new instructions to reflect this workflow - Enabled i18n and tested language shifts - I also created a script to help PO to JSON translation Now if we follow the new translation instructions we'll have our files being correctly updated without introducing maintainability issues. I also fully translated Superset to Brazilian Portuguese 🙌🏼 . This has two major objectives: - Support a new language - Have a fully completed translation file. This will enable translation completion tests. As you can see in the screenshots some parts of the UI are not being translated and this means that we have texts in the application that are not encapsulated by translation functions. The last contribution of this PR is about version release. We should always update our translation files when we release a new version. This ensures that customers who rely on translation or community contributions have access to the updated PO and JSON files for the version. This PR is also a requirement for our capitalization work # 12343 because we need the translation process to work correctly so that we can change the texts and not lose the previous translations. @junlincc @rusackas @ktmud @mihir174 ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <img width="1772" alt="Screen Shot 2021-01-19 at 9 03 03 AM" src="https://user-images.githubusercontent.com/70410625/105034478-4ce9ef00-5a38-11eb-916e-c1fd69bfd8b0.png"> <img width="1770" alt="Screen Shot 2021-01-19 at 9 03 27 AM" src="https://user-images.githubusercontent.com/70410625/105034485-4f4c4900-5a38-11eb-9dd2-5c12cdb7f600.png"> <img width="1772" alt="Screen Shot 2021-01-19 at 9 04 13 AM" src="https://user-images.githubusercontent.com/70410625/105034489-507d7600-5a38-11eb-880a-8a689d29891f.png"> <img width="1771" alt="Screen Shot 2021-01-19 at 9 04 36 AM" src="https://user-images.githubusercontent.com/70410625/105034492-51aea300-5a38-11eb-83ff-c2bc338e214d.png"> <img width="1769" alt="Screen Shot 2021-01-19 at 9 05 15 AM" src="https://user-images.githubusercontent.com/70410625/105034496-52dfd000-5a38-11eb-928c-db82ff443f83.png"> <img width="1769" alt="Screen Shot 2021-01-19 at 9 05 40 AM" src="https://user-images.githubusercontent.com/70410625/105034505-55422a00-5a38-11eb-827d-a65b5fe35c25.png"> <img width="1781" alt="Screen Shot 2021-01-19 at 9 07 04 AM" src="https://user-images.githubusercontent.com/70410625/105034515-570bed80-5a38-11eb-90a5-9f0823eb872a.png"> <img width="1775" alt="Screen Shot 2021-01-19 at 9 07 27 AM" src="https://user-images.githubusercontent.com/70410625/105034519-583d1a80-5a38-11eb-967f-b463d2f97b8c.png"> <img width="1780" alt="Screen Shot 2021-01-19 at 9 08 00 AM" src="https://user-images.githubusercontent.com/70410625/105034521-58d5b100-5a38-11eb-9240-4817e2779c42.png"> <img width="1778" alt="Screen Shot 2021-01-19 at 9 08 15 AM" src="https://user-images.githubusercontent.com/70410625/105034523-596e4780-5a38-11eb-96eb-a3e526a920c8.png"> ### TRANSLATION FIXES TEST PLAN 1 - Change any file that contains translatable texts 2 - Follow the guidelines in the section `Translating` of `CONTRIBUTING.md` 3 - Check that translation files are updated and previous translations are kept intact ### BRAZILIAN PORTUGUESE SUPPORT TEST PLAN 1 - Enable i18n (to do that you can comment line 290 in superset/config.py) 2 - Change language to Brazilian Portuguese in the right upper corner flag icon 3 - Navigate through all modules and see translated texts ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
