GitHub user dosubot[bot] added a comment to the discussion: [6.0.0rc2] Error Enabling Translations
<!-- Answer --> The 404 error persists because Superset’s frontend requests the language pack at `/superset/language_pack/pt/`, but the translation build process generates the JSON file as `superset/translations/pt_BR/LC_MESSAGES/messages.json`—so there’s a mismatch between the requested locale (`pt`) and the available translation (`pt_BR`) [[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/translations/utils.py)]. To resolve this, make sure your `superset_config.py` includes the override function exactly like this: ```python from superset.translations.utils import get_language_pack def override_bootstrap_locale(data): if data.get("locale") == "pt": data["locale"] = "pt_BR" data["language_pack"] = get_language_pack('pt_BR') return data COMMON_BOOTSTRAP_OVERRIDES_FUNC = override_bootstrap_locale ``` This function ensures that when the frontend asks for `pt`, the backend serves the `pt_BR` language pack instead. After adding this, restart your Superset server (not just the frontend build) so the config is picked up. If you’ve already done this and the error persists, double-check that the override function is being executed (e.g., add a log or print statement inside it) and that the generated `messages.json` file is present at `superset/translations/pt_BR/LC_MESSAGES/messages.json` inside your running container [[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/scripts/po2json.sh)]. If everything is in place and you still get a 404, it’s likely the override isn’t being picked up due to a config or server reload issue. Let me know if you want a checklist to debug this step by step. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/64bb2269-de42-4aa1-91cd-8818609e3456?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/64bb2269-de42-4aa1-91cd-8818609e3456?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/64bb2269-de42-4aa1-91cd-8818609e3456?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/64bb2269-de42-4aa1-91cd-8818609e3456?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/64bb2269-de42-4aa1-91cd-8818609e3456?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/64bb2269-de42-4aa1-91cd-8818609e3456?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/64bb2269-de42-4aa1-91cd-8818609e3456?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35312) GitHub link: https://github.com/apache/superset/discussions/35312#discussioncomment-14524808 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
