You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "artemonsh (via GitHub)" <gi...@apache.org> on 2023/02/01 13:24:29 UTC

[GitHub] [superset] artemonsh opened a new pull request, #22938: chore: Localization of superset pt. 3

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

   <!---
   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 -->
   This PR is the continuation of the previous localization PR https://github.com/apache/superset/pull/22772. More charts and elements are localized. However, there is still some work to do in the future.
   
   Difficult cases are marked with `TODO: localize` comment.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### 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
   


-- 
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] rusackas commented on a diff in pull request #22938: chore: Localization of superset pt. 3

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #22938:
URL: https://github.com/apache/superset/pull/22938#discussion_r1094887134


##########
superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx:
##########
@@ -343,7 +343,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
           row: {
             original: { kind },
           },
-        }: any) => kind[0]?.toUpperCase() + kind.slice(1),
+        }: any) => (kind === 'physical' ? t('Physical') : t('Virtual')),

Review Comment:
   I suppose this is less flexible, e.g. we'd be in trouble if we ever added another `kind` but I think it's fine for now. 



-- 
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] rusackas commented on pull request #22938: chore: Localization of superset pt. 3

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #22938:
URL: https://github.com/apache/superset/pull/22938#issuecomment-1414168551

   Oh, and it seems we have some conflicts (ugh) so a rebase is in order. Thanks again, we'll try to stay on top of this so you don't have to rebase often :D 


-- 
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] artemonsh closed pull request #22938: chore: Localization of superset pt. 3

Posted by "artemonsh (via GitHub)" <gi...@apache.org>.
artemonsh closed pull request #22938: chore: Localization of superset pt. 3
URL: https://github.com/apache/superset/pull/22938


-- 
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] rusackas merged pull request #22938: chore: Localization of superset pt. 3

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #22938:
URL: https://github.com/apache/superset/pull/22938


-- 
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] rusackas commented on a diff in pull request #22938: chore: Localization of superset pt. 3

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #22938:
URL: https://github.com/apache/superset/pull/22938#discussion_r1094848542


##########
superset-frontend/src/explore/components/ControlHeader.tsx:
##########
@@ -105,7 +105,7 @@ const ControlHeader: FC<ControlHeaderProps> = ({
         {description && (
           <span>
             <Tooltip
-              id={`${t('description')}-tooltip`}

Review Comment:
   good catch



-- 
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] rusackas commented on a diff in pull request #22938: chore: Localization of superset pt. 3

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #22938:
URL: https://github.com/apache/superset/pull/22938#discussion_r1094904482


##########
superset-frontend/src/SqlLab/components/QueryTable/index.tsx:
##########
@@ -76,17 +76,22 @@ const QueryTable = ({
   const theme = useTheme();
   const dispatch = useDispatch();
 
-  const setHeaders = (column: string) => {
-    if (column === 'sql') {
-      return column.toUpperCase();
-    }
-    return column.charAt(0).toUpperCase().concat(column.slice(1));
+  const QUERY_HISTORY_TABLE_HEADERS_LOCALIZED = {
+    state: t('State'),
+    started: t('Started'),
+    duration: t('Duration'),
+    progress: t('Progress'),
+    rows: t('Rows'),
+    sql: t('SQL'),
+    results: t('Results'),
+    actions: t('Actions'),
   };
+
   const columnsOfTable = useMemo(
     () =>
       columns.map(column => ({
         accessor: column,
-        Header: () => setHeaders(column),
+        Header: QUERY_HISTORY_TABLE_HEADERS_LOCALIZED[column],

Review Comment:
   This is the only part that makes me a little nervous. I haven't done any real spelunking in the code here, but are we confident that these are the only header strings we'll need to worry about for the foreseeable future?
   
   I wonder if it's safer to leave the function in place as a backup, i.e.
   
   ```suggestion
           Header: QUERY_HISTORY_TABLE_HEADERS_LOCALIZED[column] || setHeaders(column),
   ```



-- 
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 #22938: chore: Localization of superset pt. 3

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #22938:
URL: https://github.com/apache/superset/pull/22938#issuecomment-1420782414

   # [Codecov](https://codecov.io/gh/apache/superset/pull/22938?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 [#22938](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c9cfa69) into [master](https://codecov.io/gh/apache/superset/commit/79114bcd29b0ce1685828ff9a60791d13a7459c9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (79114bc) will **increase** coverage by `0.00%`.
   > The diff coverage is `82.35%`.
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #22938   +/-   ##
   =======================================
     Coverage   67.42%   67.42%           
   =======================================
     Files        1878     1878           
     Lines       72116    72134   +18     
     Branches     7864     7868    +4     
   =======================================
   + Hits        48625    48638   +13     
   - Misses      21472    21477    +5     
     Partials     2019     2019           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `53.81% <82.35%> (+<0.01%)` | :arrow_up: |
   
   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/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...s/legacy-preset-chart-nvd3/src/Pie/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL1BpZS9jb250cm9sUGFuZWwudHM=) | `100.00% <ø> (ø)` | |
   | [...s/plugin-chart-echarts/src/BoxPlot/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvQm94UGxvdC9jb250cm9sUGFuZWwudHM=) | `5.55% <ø> (ø)` | |
   | [...s/plugin-chart-echarts/src/Funnel/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvRnVubmVsL2NvbnRyb2xQYW5lbC50c3g=) | `66.66% <ø> (ø)` | |
   | [...gins/plugin-chart-echarts/src/Pie/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvUGllL2NvbnRyb2xQYW5lbC50c3g=) | `28.57% <ø> (ø)` | |
   | [...ns/plugin-chart-echarts/src/Radar/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvUmFkYXIvY29udHJvbFBhbmVsLnRzeA==) | `27.27% <ø> (ø)` | |
   | [...plugin-chart-echarts/src/Sunburst/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvU3VuYnVyc3QvY29udHJvbFBhbmVsLnRzeA==) | `28.57% <ø> (ø)` | |
   | [...chart-echarts/src/Timeseries/Area/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9BcmVhL2NvbnRyb2xQYW5lbC50c3g=) | `40.00% <ø> (ø)` | |
   | [...charts/src/Timeseries/Regular/Bar/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9SZWd1bGFyL0Jhci9jb250cm9sUGFuZWwudHN4) | `35.71% <ø> (ø)` | |
   | [...harts/src/Timeseries/Regular/Line/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9SZWd1bGFyL0xpbmUvY29udHJvbFBhbmVsLnRzeA==) | `33.33% <ø> (ø)` | |
   | [...ts/src/Timeseries/Regular/Scatter/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9SZWd1bGFyL1NjYXR0ZXIvY29udHJvbFBhbmVsLnRzeA==) | `40.00% <ø> (ø)` | |
   | ... and [22 more](https://codecov.io/gh/apache/superset/pull/22938?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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