Closed qleroy closed 3 months ago
I confirm that French i18n does not work out of the box for the top menu (Dashboards | Charts | Datasets | SQL).
I also confirm that following these steps solves the problem of the localization not been taken into account :
pybabel compile -d superset/translations
BABEL_DEFAULT_LOCALE = "fr"
LANGUAGES = { "fr": {"flag": "fr", "name": "French"}, }
3. `docker build -t superset31fr .`
4. changed docker-compose-non-dev.yml with local Docker image *superset31fr:latest* : `x-superset-image: &superset-image superset31fr:latest`
5. `docker-compose -f docker-compose-non-dev.yml up`
![Screenshot showing French localization for top menu Tableaux de bord | Graphiques | Jeux de données | SQL ](https://github.com/apache/superset/assets/31072389/455b6179-2741-4579-8d77-51d931e80b45)
A step needs to be added to the Docker build to include `pybabel compile -d superset/translations` .
Yep, this is all a bit of a mess.
.pot
file up to date (I intend to add CI for this, and just merged a PR bringing it up to date).po
files up to date (I intend to add CI for this).mo
files are .gitignore
'd, we should do the same for .json
files, removing them from the reponpm
script to generate .mo
and .json
fies easily--ignore-obsolete
flag in our translation build scripts, so files stay slim once they're kept currentIf we do all that, then hopefully things will stay up to date, stay clean, and people will contribute in all the right ways. Then we can revisit the topic of enhancing/automating the population of translations.
CC @mistercrunch since we were just talking about all this elsewhere.
Bug description
All translated strings related to FAB are ignored, e.g. the navbar.
This is due to the absence of the compiled messages.mo files in the Docker image.
The solution is to run
and add this possibly to the docker/docker-init.sh script.
How to reproduce the bug
Set a language different than English. For example add
to your docker/pythonpath_dev/superset_config_docker.py
Run Superset with docker compose
Screenshots/recordings
Before running pybabel compile -d superset/translations
After running pybabel compile -d superset/translations
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist