Replies: 15 comments
|
French translations are supported in Superset 5.0.0, but they are not included in the default Docker image to reduce size and build time. To enable French (or any other non-English) translations, you need to build your own Docker image with the build argument The translation files are located at If you build your image with To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
This comment was marked as spam.
This comment was marked as spam.
thank you for your reply, so do I need to manually copy the translation files? @dosu says I don't need to. I build with but translations don't work. BTW, what are the correct paths for messages.po (backend) and messages.json (frontend) ? |
|
You do not need to manually copy translation files if you build your Superset 5.0.0 Docker image with If French translations still don't work, here’s what to check:
from superset.translations.utils import get_language_pack
def override_bootstrap_locale(data):
if data.get("locale") == "fr":
data["locale"] = "fr"
data["language_pack"] = get_language_pack('fr')
return data
COMMON_BOOTSTRAP_OVERRIDES_FUNC = override_bootstrap_locale
If you follow these steps and translations still don’t work, check for errors in your build logs and browser console, and verify the translation files are present in the image. Let me know what you find! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
|
@dosu in my container the path /app/superset/translations/fr/LC_MESSAGES/ is empty, yet I've built it with BUILD_TRANSLATIONS=true I noticed in the UI I see few menu items translated in french, but the majority are still in english, this looks like a bug |
|
This is a known issue in Superset 5.0.0: even with Workaround:
This will ensure the files are present and translations work as expected. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
|
@dosu I've copied the files your mentioned to my container, the translation is still not working /app$ ls /app/superset/translations/fr/LC_MESSAGES/ |
|
If you have messages.json, messages.mo, and messages.po in /app/superset/translations/fr/LC_MESSAGES/ but French translations still aren't working, here are the most likely causes and next steps:
If you check these and still have issues, please share any errors from the browser console or server logs, and confirm the contents of your translation files. This will help pinpoint whether it's a file, config, or runtime loading issue. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
|
@dosu it seems I can get translations when I compile the code source, for example running How to get that? |
|
I agree with jpchev in this, we are experiencing the same difficulties. this should be included in a distinct image. I suggest adding a build label like "standard" or "default" or something like that. This will make sure the images we now know as "lean" will still be what we expect. The only thing this new label will change is enabling BUILD_TRANSLATIONS. In the future other features can be added back into this image, like the postgres driver if needed. |
|
Here's how I solved this: at the end of the official Dockerfile, I added: btw, I also seized the opportunity to add some optional dependencies, such as database drivers, like so (before and, of course, I have to add The drawback is that I have to keep a fork of superset but the advantage is that the build is, I believe, as fast as possible (because it will only rebuild the required stages, not the whole image) and the changes are easy to maintain. But if the compiled translation files could be provided as release artifacts, we could make this even faster/more maintainable. |
|
@dosubot how much would the size of the |
|
The translation source files ( Beyond size, the other considerations for keeping them omitted were:
That said, there's been significant community friction around this — since database drivers were already removed in 4.0 (meaning most users build custom images anyway), bundling translations would reduce a pain point without meaningfully changing the customization story. Multiple users in this thread and in this discussion have requested an official image variant with translations included. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
This one's really a product tradeoff question (do we bundle all translations by default, given the size cost) rather than a bug, so moving it to a Discussion. In the meantime the docs could probably be clearer about the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bug description
hello, I use this docker file to build my superset container, it's based on the 5.0.0,
I need the french translation, but it's not clear at all how to get it.
I tried to build the frontend on my machine starting from the git code, but that doesn't work.
I think it's very important to have a well documented procedure to get a specific translation. Moving from 4.1.2 to 5.0.0 it's a big pain, since I've lost the translation and don't know how to get it back
Screenshots/recordings
No response
Superset version
5.0.0
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
All reactions