You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/24 14:54:01 UTC

[GitHub] [superset] stephenLYZ opened a new pull request, #19828: chore: add custom eslint plugin to prevent translation variables

stephenLYZ opened a new pull request, #19828:
URL: https://github.com/apache/superset/pull/19828

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Since flask-babel is a static translation translation service, it can’t handle strings that include variables.(refer to https://github.com/apache/superset/pull/19641). This PR adds a custom eslint plugin to catch these.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   ### before
   <img width="1048" alt="WeChate0e5c68e6cfe29327a6415ef0122fe59" src="https://user-images.githubusercontent.com/11830681/164982376-2edb5a96-fe8b-4cb1-beda-37426a592ba1.png">
   
   ### after
   <img width="582" alt="WeChat137288c0d44b2fe669013b794badf966" src="https://user-images.githubusercontent.com/11830681/164982379-55e8f62c-a64d-4ece-a407-1ad8080598f5.png">
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   **Test Rule**
   ```
   cd superset-frontend
   npm run test ./tools/eslint-plugin-translation-vars
   ```
   **Lint**
   
   ```
   npm run _lint
   ```
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   cc @villebro @zhaoyongjie @geido 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #19828: chore: add custom eslint plugin to prevent translation variables

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #19828:
URL: https://github.com/apache/superset/pull/19828#issuecomment-1107864224

   # [Codecov](https://codecov.io/gh/apache/superset/pull/19828?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19828](https://codecov.io/gh/apache/superset/pull/19828?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a0a8626) into [master](https://codecov.io/gh/apache/superset/commit/800ced5e257d5d83d6dbe4ced0e7318ac40d026f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (800ced5) will **not change** coverage.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #19828   +/-   ##
   =======================================
     Coverage   66.55%   66.55%           
   =======================================
     Files        1692     1692           
     Lines       64802    64802           
     Branches     6657     6657           
   =======================================
     Hits        43129    43129           
     Misses      19973    19973           
     Partials     1700     1700           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.25% <100.00%> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19828?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ntend/src/views/CRUD/annotation/AnnotationList.tsx](https://codecov.io/gh/apache/superset/pull/19828/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYW5ub3RhdGlvbi9Bbm5vdGF0aW9uTGlzdC50c3g=) | `69.35% <ø> (ø)` | |
   | [...erset-frontend/src/SqlLab/utils/newQueryTabName.ts](https://codecov.io/gh/apache/superset/pull/19828/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi91dGlscy9uZXdRdWVyeVRhYk5hbWUudHM=) | `86.66% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19828?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19828?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [800ced5...a0a8626](https://codecov.io/gh/apache/superset/pull/19828?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on pull request #19828: chore: add custom eslint plugin to prevent translation variables

Posted by GitBox <gi...@apache.org>.
villebro commented on PR #19828:
URL: https://github.com/apache/superset/pull/19828#issuecomment-1110801500

   Nice work @stephenLYZ ! ❤️ 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie merged pull request #19828: chore: add custom eslint plugin to prevent translation variables

Posted by GitBox <gi...@apache.org>.
zhaoyongjie merged PR #19828:
URL: https://github.com/apache/superset/pull/19828


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org