superset icon indicating copy to clipboard operation
superset copied to clipboard

fix: translating variables

Open aehanno opened this issue 3 years ago • 6 comments

SUMMARY

translating variables

ADDITIONAL INFORMATION

Fixes https://github.com/apache/superset/issues/20060

aehanno avatar May 16 '22 14:05 aehanno

@villebro , i will be glad to discuss with you about variable translation.

Without adding translation on those varaibles, we have any translation on the second part of those sentence I only find this solution and after testing, I didn't catch error with this correction

I understand your worries about that, and i will be glad to understand any other solution to solve that problem

aehanno avatar Jun 06 '22 15:06 aehanno

@aehanno can you show a before and after of these changes? I'd like to understand how these translations are being picked up

villebro avatar Jun 15 '22 07:06 villebro

Codecov Report

Merging #20080 (afb2301) into master (17fbb2d) will decrease coverage by 11.04%. The diff coverage is n/a.

@@             Coverage Diff             @@
##           master   #20080       +/-   ##
===========================================
- Coverage   67.47%   56.44%   -11.04%     
===========================================
  Files        1880     1880               
  Lines       72283    72282        -1     
  Branches     7881     7880        -1     
===========================================
- Hits        48772    40797     -7975     
- Misses      21486    29460     +7974     
  Partials     2025     2025               
Flag Coverage Δ
hive 52.73% <ø> (ø)
mysql ?
postgres ?
presto 52.62% <ø> (ø)
python 59.18% <ø> (-22.95%) :arrow_down:
sqlite ?
unit 52.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ivot-table/src/react-pivottable/TableRenderers.jsx 0.00% <ø> (ø)
.../components/FiltersBadge/FilterIndicator/index.tsx 87.50% <ø> (ø)
...t-frontend/src/dashboard/components/SliceAdder.jsx 60.27% <ø> (ø)
...nts/controls/DateFilterControl/DateFilterLabel.tsx 61.45% <ø> (-0.40%) :arrow_down:
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) :arrow_down:
superset/tags/core.py 4.54% <0.00%> (-95.46%) :arrow_down:
superset/key_value/commands/update.py 0.00% <0.00%> (-90.91%) :arrow_down:
superset/key_value/commands/delete.py 0.00% <0.00%> (-87.88%) :arrow_down:
superset/key_value/commands/delete_expired.py 0.00% <0.00%> (-84.00%) :arrow_down:
superset/dashboards/commands/importers/v0.py 15.62% <0.00%> (-76.25%) :arrow_down:
... and 288 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Jun 15 '22 08:06 codecov[bot]

@aehanno can you show a before and after of these changes? I'd like to understand how these translations are being picked up

Hey @villebro, yes of course, I can show you an exemple. It's in dashboard edition in charts tab.

For this one, I added modification in SliceAdder.jsx file,

There is before my correction label: t('Sort by %s', label), Before

And this one is after my correction label: t('Sort by %s', t(label)), After

We can see the second part is well translate in the second image

aehanno avatar Jun 15 '22 13:06 aehanno

Looks like this needs a rebase. There have been some other PRs recently adding translations as well, so I hope it's not too painful.

We also still need some validation of the language itself, if @mistercrunch or anyone else that speaks French has time to scope it out :)

rusackas avatar Jan 31 '23 00:01 rusackas

Sadly, it looks like this never passed, CI, never got validation of the translated strings, and now is in need of a rebase again. @aehanno would you mind doing a rebase, and we can try again to get this across the finish line? Thanks!

rusackas avatar Feb 09 '24 20:02 rusackas