Bug description

During our 5.0.0 upgrade we noticed that localization is broken because of missing /app/superset/translations/*/LC_MESSAGES/messages.json files in the current 5.0.0 Docker image.

The error we're seeing in the logs from here: https://github.com/apache/superset/blob/6fc734da5154524b2e235c4df0d75977a7d5211f/superset/translations/utils.py#L51

ERROR:superset.translations.utils:Error loading language pack for, falling back on en fr

Running the following shows the files are missing:

docker run -it \
  apache/superset:5.0.0@sha256:270e7ee9577bf35579549ba80b5f8cb1bb9abd42109c0a161a2361e6134843a3 \
  ls -la /app/superset/translations/fr/LC_MESSAGES/messages.json
---
ls: cannot access '/app/superset/translations/fr/LC_MESSAGES/messages.json': No such file or directory

Not a problem for us to workaround by adding the files ourselves, but just wanted to let you know.

Screenshots/recordings

No response

Superset version

5.0.0

Python version

Not applicable

Node version

Not applicable

Browser

Not applicable

Additional context

Here is our LANGUAGES from superset_config.py:

LANGUAGES = {
    "en": {"flag": "ca", "name": "English"},
    "fr": {"flag": "ca", "name": "Français"},
}

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

This is a documented change in Superset 5.0.0: translations (including the frontend messages.json files) are no longer included in the default Docker image. To include them, you need to build your own image with the build argument BUILD_TRANSLATIONS=true. This change was made to reduce image size and build time for users who don't need localization. You can find this in the release notes and Dockerfile logic—see UPDATING.md and Dockerfile.

There are no existing tickets tracking this as a bug, since it's an intentional change. If you need localization, set BUILD_TRANSLATIONS=true when building your Docker image to generate and include the necessary translation files.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: patheard

Whoops, my bad. Thanks AI.