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/05/16 13:48:20 UTC

[GitHub] [superset] aehanno opened a new pull request, #20078: fix : Fixing the untranslated strings

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

   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Fixing the untranslated strings
   
   ### ADD INFORMATION
   fix issue : https://github.com/apache/superset/pull/20061


-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1085634140


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -47,7 +48,7 @@ function displayHeaderCell(
       >
         {ArrowIcon}
       </span>
-      <span className="toggle-val">{parseLabel(name)}</span>
+      <span className="toggle-val">{t(parseLabel(name))}</span>

Review Comment:
   Hello @villebro @aehanno!
   We should not translate the results of the parseLabel function, because users can just set the verbose name of the column/metric in the dataset or manual SQL, excluding the string 'metric' that appears in the top left corner.
   ![image](https://user-images.githubusercontent.com/66589759/214359754-b5c1a28c-2084-4f41-a57e-f83cefc62765.png)
   
   To translate that metric, we can just add a translation for the METRIC_KEY constant at superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx:59, and it will work properly.
   Result of translating METRIC_KEY:
   ![image](https://user-images.githubusercontent.com/66589759/214359989-68ed7755-046d-4dfb-b6c6-d5a2793355dc.png)



-- 
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] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   I don't know why I have still warning for prettier as I launch this command before push `npx prettier --update ../superset/translations/**/LC_MESSAGES/*.json`



-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1090229575


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   Please rebuild the pot file, then the po files. Afterwards, regenerate the messages.json file and restart the Flask server.



-- 
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] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -47,7 +48,7 @@ function displayHeaderCell(
       >
         {ArrowIcon}
       </span>
-      <span className="toggle-val">{parseLabel(name)}</span>
+      <span className="toggle-val">{t(parseLabel(name))}</span>

Review Comment:
   I just do the correction, thanks



-- 
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 #20078: fix: Fixing untranslated FR strings

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

   @villebro the merging is blocked awaiting your review. Holler if you think there's more to work on here :) Thanks!


-- 
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] ETselikov commented on pull request #20078: fix: Fixing the untranslated strings

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

   @aehanno Hi! We are looking forward into improving translations as the same places you address in this PR. Are you planning on finishing your work here and merging it into master?


-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1087108690


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   We do not need to change the parseLabel function. Instead, we can simply translate the METRIC_KEY constant in superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx:58



-- 
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] aehanno commented on pull request #20078: fix: Fixing the untranslated strings

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

   Hi @villebro  and @Always-prog, I've resolved the conflicts, so can I have a review before I have any more ?
   
   Thanks


-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1087107953


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {

Review Comment:
   We do not need to change the parseLabel function. Instead, we can simply translate the METRIC_KEY constant in superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx:58



-- 
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] aehanno commented on pull request #20078: fix: Fixing the untranslated strings

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

   > @aehanno Hi! We are looking forward into improving translations as the same places you address in this PR. Are you planning on finishing your work here and merging it into master?
   
   Hi @ETselikov, I'm a little block on this change https://github.com/apache/superset/pull/20078#discussion_r986497228
   I don't have the list of values of the variable name
   
   If you have any idea, I will do the change and merge my branch


-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1093674195


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   I builded your mo files on my and found that after building everything is fine. With or without Prettier refactoring, there are no warnings. 
   However, the messages.json files that you pushed are still getting warnings from Prettier on my. Can you please check your translation using the `npm run check-translation` command on your computer before pushing and make it works?
   Maybe you don't need to refactor messages.json by prettier?



-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1090725271


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   It works on me, but anyway you need to build .pot file and .po files.
   Here's instructions: https://superset.apache.org/docs/contributing/translations/



-- 
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] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   Okay because, I got a job in error becuse of that



-- 
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 #20078: fix: Fixing the untranslated strings

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

   Oh, ok, if this JSON was generated by the script, I think we're good. I feared you hand-edited the JSON and opened a PR (it wouldn't be the first time that's happened).


-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1092772064


##########
superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx:
##########
@@ -313,7 +313,7 @@ export const useExploreAdditionalActionsMenu = (
               icon={<Icons.FileOutlined css={iconReset} />}
               disabled={!canDownloadCSV}
             >
-              {t('Export to .CSV')}
+              {t('test')}

Review Comment:
   Here must be Export to .CSV



-- 
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] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   It's what I did and I have this return 
   ![Capture d’écran du 2023-02-01 17-53-41](https://user-images.githubusercontent.com/104373599/216184245-1bdc155b-d5ca-4185-a6b4-e25c9fb900cb.png)
   



-- 
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 #20078: fix: Fixing the untranslated strings

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/20078?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 [#20078](https://codecov.io/gh/apache/superset/pull/20078?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f7ef429) into [master](https://codecov.io/gh/apache/superset/commit/3f8e9a567aa500c707dd024676cc3f6b721e0c71?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3f8e9a5) will **decrease** coverage by `11.37%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head f7ef429 differs from pull request most recent head eea57c0. Consider uploading reports for the commit eea57c0 to get more accurate results
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #20078       +/-   ##
   ===========================================
   - Coverage   66.65%   55.28%   -11.38%     
   ===========================================
     Files        1793     1794        +1     
     Lines       68559    68688      +129     
     Branches     7294     7294               
   ===========================================
   - Hits        45701    37976     -7725     
   - Misses      20991    28845     +7854     
     Partials     1867     1867               
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `52.89% <ø> (-0.19%)` | :arrow_down: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `52.79% <ø> (-0.19%)` | :arrow_down: |
   | python | `57.89% <ø> (-23.52%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `50.92% <ø> (-0.14%)` | :arrow_down: |
   
   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/20078?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ivot-table/src/react-pivottable/TableRenderers.jsx](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtcGl2b3QtdGFibGUvc3JjL3JlYWN0LXBpdm90dGFibGUvVGFibGVSZW5kZXJlcnMuanN4) | `0.00% <ø> (ø)` | |
   | [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `42.07% <ø> (ø)` | |
   | [...perset-frontend/src/views/CRUD/welcome/Welcome.tsx](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9XZWxjb21lLnRzeA==) | `74.28% <ø> (ø)` | |
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset/key\_value/commands/update.py](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `0.00% <0.00%> (-88.89%)` | :arrow_down: |
   | [superset/key\_value/commands/delete.py](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZS5weQ==) | `0.00% <0.00%> (-85.30%)` | :arrow_down: |
   | [superset/key\_value/commands/delete\_expired.py](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZV9leHBpcmVkLnB5) | `0.00% <0.00%> (-80.77%)` | :arrow_down: |
   | [superset/dashboards/commands/importers/v0.py](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9pbXBvcnRlcnMvdjAucHk=) | `15.62% <0.00%> (-76.25%)` | :arrow_down: |
   | [superset/datasets/commands/update.py](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvdXBkYXRlLnB5) | `25.00% <0.00%> (-69.05%)` | :arrow_down: |
   | [superset/datasets/commands/create.py](https://codecov.io/gh/apache/superset/pull/20078/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-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvY3JlYXRlLnB5) | `31.25% <0.00%> (-68.75%)` | :arrow_down: |
   | ... and [296 more](https://codecov.io/gh/apache/superset/pull/20078/diff?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


[GitHub] [superset] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   When I put t('metric') for the METRIC_KEY constant, I don't see the trnaslation in the chart



-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1087106979


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -20,12 +20,15 @@
 import React from 'react';
 import { t } from '@superset-ui/core';
 import PropTypes from 'prop-types';
-import { t } from '@superset-ui/core';
 import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {

Review Comment:
   We do not need to change the parseLabel function. Instead, we can simply translate the METRIC_KEY constant in superset-frontend/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx:58



-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1090229575


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   Because you need to rebuild pot file, then rebuild po files and build messages.json again.



-- 
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] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   Oh okay, I did it but not so easy to work with this generation because that remove some translation



-- 
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] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   @Always-prog it's okay I find the problem



-- 
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] aehanno commented on pull request #20078: fix: Fixing untranslated FR strings

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

   Thanks @villebro and @rusackas for approvals. Do you know what's the next step to merge this PR 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] aehanno commented on pull request #20078: fix : Fixing the untranslated strings

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

   @villebro, PR you ask me to create from an other one


-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1092772444


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   Hello.
   I think we can ignore that warning.



-- 
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] aehanno commented on pull request #20078: fix: Fixing untranslated FR strings

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

   > Left a few comments
   
   HI @villebro, I need your review to move this ticket forward.
   
   Thanks


-- 
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 #20078: fix: Fixing the untranslated strings

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

   @villebro @michael-s-molina can you confirm or deny a concern here? It looks like this PR is editing the JSON files, which were (or could be) generated from the `.po` files, according to the docs: https://superset.apache.org/docs/contributing/translations/
   
   Is it a risky/bad idea to make these updates this way? Should people be editing the `.po` files rather than `.json`? 


-- 
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] michael-s-molina merged pull request #20078: fix: Fixing untranslated FR strings

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina merged PR #20078:
URL: https://github.com/apache/superset/pull/20078


-- 
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] aehanno commented on pull request #20078: fix: Fixing the untranslated strings

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

   HI @villebro, if you can check, if it's okay for you 


-- 
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] aehanno commented on pull request #20078: fix: Fixing the untranslated strings

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

   Hi @villebro, I just do the changes you request
   
   can you do a review of the new code to merge the PR after
   
   Thanks


-- 
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] aehanno commented on pull request #20078: fix: Fixing the untranslated strings

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

   Hi @Always-prog  and @villebro, I update the PR with master and check your comments, it's possible for you to check that to closed this ticket as soon as possible ?
   Thank you 


-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1093627017


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   Where did you receive information that the messages.json files need to be refactored with Prettier? As I understand it, they can be pushed as builded. And your previous commits with changed messages.json passed all tests.



-- 
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] aehanno commented on a diff in pull request #20078: fix: Fixing the untranslated strings

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


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   I did the change, tell me if it's okay for you



-- 
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] Always-prog commented on a diff in pull request #20078: fix: Fixing the untranslated strings

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on code in PR #20078:
URL: https://github.com/apache/superset/pull/20078#discussion_r1090710382


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -24,7 +24,11 @@ import { PivotData, flatKey } from './utilities';
 import { Styles } from './Styles';
 
 const parseLabel = value => {
-  if (typeof value === 'number' || typeof value === 'string') {
+  if (typeof value === 'string') {
+    if (value === 'metric') return t('metric');

Review Comment:
   Ok, let me test it.



-- 
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] aehanno commented on pull request #20078: fix: Fixing the untranslated strings

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

   > @villebro @michael-s-molina can you confirm or deny a concern here? It looks like this PR is editing the JSON files, which were (or could be) generated from the `.po` files, according to the docs: https://superset.apache.org/docs/contributing/translations/
   > 
   > Is it a risky/bad idea to make these updates this way? Should people be editing the `.po` files rather than `.json`?
   
   Hi @rusackas, I used the script po2json.sh to generate json file from po file but All the translation with "#, fuzzy" are not display in the json file.
   It's normal or not ?
   
   Thanks for your answer 


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