-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(formatters): Add custom d3-time-format locale #24263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #24263 +/- ##
==========================================
- Coverage 69.10% 69.08% -0.02%
==========================================
Files 1906 1904 -2
Lines 74175 74155 -20
Branches 8163 8173 +10
==========================================
- Hits 51259 51232 -27
- Misses 20788 20806 +18
+ Partials 2128 2117 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Also ccing @villebro since he is working on some other localization features. |
e85c700
to
b942848
Compare
@rusackas I added more tests to fix the coverage issue reported in the last CI run. |
@rusackas Is there anything else that I can do to help with the review? |
/testenv up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but would love a second opinion from @kgabryje or @justinpark or @michael-s-molina or @villebro
I know this PR will make a lot of people happy when it's merged, too!
@rusackas Ephemeral environment spinning up at http://52.33.93.221:8080. Credentials are |
up |
Running CI again - fingers crossed! Last chance, @kgabryje / @justinpark / @michael-s-molina / @villebro |
@rusackas I fixed some linting errors caused by merge conflict. |
up |
CI running again 🤞 . Feel free to DM me on slack as well if you need me to push buttons here again ;) |
Hi
A PR is in progress for this.
See #24263
Christophe
Le ven. 7 juin 2024, 14:33, Bara Diaw ***@***.***> a écrit :
… Hello, I've been using superset for 3 months. I want to change the
language to french. I added the D3_TIME_FORMAT with my local configuration
for superset_config.py but it still doesn't work. Could you help me again.
Capture.d.ecran.2024-06-07.122437.png (view on web)
<https://github.com/apache/superset/assets/56593952/467b36cb-0c04-429e-af18-8e85d0c7f667>
—
Reply to this email directly, view it on GitHub
<#24263 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARWCBN2OJWYWY7ZXXAUAUFDZGGSCBAVCNFSM6AAAAAAYW4CNR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUG42DGMZTGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
thanks @cchristofr for your reply, I'll keep waiting then |
oui, moi aussi.
Vous travaillez en France ?
Le ven. 7 juin 2024 à 17:23, Bara Diaw ***@***.***> a écrit :
… thanks @cchristofr <https://github.com/cchristofr> for your reply, I'll
keep waiting then
—
Reply to this email directly, view it on GitHub
<#24263 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARWCBN77V6AMV4VFTBW3ACTZGHF7PAVCNFSM6AAAAAAYW4CNR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGA3DCMBQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Non, je travaille au Sénégal. |
espérons que nous aurons bientôt une gestion multilingue correcte.
Actuellement, le choix FR n'agit que sur la traduction de l'interface mais
pas sur les textes (et formats) dans les graphiques.
Sinon, superset est un bon produit.
Le ven. 7 juin 2024 à 18:54, Bara Diaw ***@***.***> a écrit :
… Non, je travaille au Sénégal.
—
Reply to this email directly, view it on GitHub
<#24263 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARWCBN727OGI4Z5NH5N5PN3ZGHQUJAVCNFSM6AAAAAAYW4CNR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGE4TQMRZGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Closing and re-opening due to a weird glitch with E2E tests. |
Ephemeral environment shutdown and build artifacts deleted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't speak to the code details but everything looked good to me and it's a great feature!
SUMMARY
Adds a configuration option to change the default language of time related data on charts, including the option to translate months. This is related to issues: #3972 , #13442 and #17447.
During the implementation I had to change how the smart formatters were used across the application, because I had to ensure that they were instantiated with the right locale configuration. So instead of importing them directly, I got them through the TimeFormatterRegistry. I'm not sure if is the best option, let me know.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Without time format configuration:
With brazilian portuguese time format configuration:
TESTING INSTRUCTIONS
Add the
D3_TIME_FORMAT
with your locale configuration tosuperset_config.py
following the definition expected by D3 (docs), for example, this is the definition for brazilian portuguese:ADDITIONAL INFORMATION