You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "gabriela-schuster (via GitHub)" <gi...@apache.org> on 2025/09/26 14:52:58 UTC
[D] [6.0.0rc2] Error Enabling Translations [superset]
GitHub user gabriela-schuster created a discussion: [6.0.0rc2] Error Enabling Translations
I am having trouble enabling pt_BR (but any language actually) translations in Superset 6.0.0rc2 (6.0.0rc1 doesn't seem to work also)
I am building it with the flag `BUILD_TRANSLATIONS: true`, as shown in my docker compose below:
```
superset:
image: apache/superset:6.0.0rc2
container_name: superset
restart: always
build:
context: .docker/superset
dockerfile: Dockerfile
args:
BUILD_TRANSLATIONS: true
```
Also, i am setting my `superset_config.py` with the required variables:
```
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
"pt_BR": {"flag": "br", "name": "Brazilian Portuguese"},
}
BABEL_DEFAULT_FOLDER = "superset/translations"
BABEL_DEFAULT_LOCALE = 'pt_BR'
BABEL_DEFAULT_TIMEZONE = 'America/Sao_Paulo'
```
But when "pt_BR" is selected as active language, in the Superset web interface, I get an 404 error in the web console:
```
Failed to fetch language pack, falling back to default.
Response { type: "basic", url: "https://superset.eyeforest.dev/superset/language_pack/pt/", redirected: false, status: 404, ok: false, statusText: "NOT FOUND", headers: Headers(14), body: ReadableStream, bodyUsed: false }
```
Is there any missing config?
GitHub link: https://github.com/apache/superset/discussions/35312
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "gabriela-schuster (via GitHub)" <gi...@apache.org>.
GitHub user gabriela-schuster edited a discussion: [6.0.0rc2] Error Enabling Translations
I am having trouble enabling pt_BR (but any language actually) translations in Superset 6.0.0rc2 (6.0.0rc1 doesn't seem to work also)
I am building it with the flag `BUILD_TRANSLATIONS: true`, as shown in my docker compose below:
```
superset:
image: apache/superset:6.0.0rc2
container_name: superset
restart: always
build:
context: .docker/superset
dockerfile: Dockerfile
args:
BUILD_TRANSLATIONS: true
```
Also, i am setting my `superset_config.py` with the required vars:
```
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
"pt_BR": {"flag": "br", "name": "Brazilian Portuguese"},
}
BABEL_DEFAULT_FOLDER = "superset/translations"
BABEL_DEFAULT_LOCALE = 'pt_BR'
BABEL_DEFAULT_TIMEZONE = 'America/Sao_Paulo'
```
But when "pt_BR" is selected as active language, in the Superset web interface, I get an 404 error in the web console:
```
Failed to fetch language pack, falling back to default.
Response { type: "basic", url: "https://superset.eyeforest.dev/superset/language_pack/pt/", redirected: false, status: 404, ok: false, statusText: "NOT FOUND", headers: Headers(14), body: ReadableStream, bodyUsed: false }
```
Is there any missing config?
GitHub link: https://github.com/apache/superset/discussions/35312
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on 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?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=64bb2269-de42-4aa1-91cd-8818609e3456) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35312#discussioncomment-14524808
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: [6.0.0rc2] Error Enabling Translations
<!-- Answer -->
Superset 6.0.0rc2 expects the translation build script to be at `superset-frontend/scripts/po2json.sh`. If you get a "not found" error, it's likely your source checkout or Docker build context is missing this file. The script is still required and hasn't been replaced in this version—it's a bash script that converts `.po` files to frontend `.json` translation files using `po2json` and `prettier` ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/package.json), [script](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/scripts/po2json.sh)).
To fix this, make sure your build context includes the full `superset-frontend/scripts` directory and that `po2json.sh` is present before running `npm run build-translation`. If you're building a Docker image, check your Dockerfile and build context to ensure this directory is copied into the image. There are no alternative or updated methods for building frontend translation files in 6.0.0rc2—the process still relies on this shell script.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=7115b350-8095-4875-9420-634b26362f77) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35312#discussioncomment-14524444
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "gabriela-schuster (via GitHub)" <gi...@apache.org>.
GitHub user gabriela-schuster added a comment to the discussion: [6.0.0rc2] Error Enabling Translations
Even after _manually_ copying po2json.sh inside the container, and running is sucessfully with `npm run build-translation`, i still get the 404 route error
GitHub link: https://github.com/apache/superset/discussions/35312#discussioncomment-14524777
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "gabriela-schuster (via GitHub)" <gi...@apache.org>.
GitHub user gabriela-schuster edited a discussion: [6.0.0rc2] Error Enabling Translations
I am having trouble enabling pt_BR (but any language actually) translations in Superset 6.0.0rc2 (6.0.0rc1 doesn't seem to work also)
I am building it with the flag `BUILD_TRANSLATIONS: true`, as shown in my docker compose below:
```
superset:
image: apache/superset:6.0.0rc2
container_name: superset
restart: always
build:
context: .docker/superset
dockerfile: Dockerfile
args:
BUILD_TRANSLATIONS: true
```
Also, i am setting my `superset_config.py` with the required vars:
```
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
"pt_BR": {"flag": "br", "name": "Brazilian Portuguese"},
}
BABEL_DEFAULT_FOLDER = "superset/translations"
BABEL_DEFAULT_LOCALE = 'pt_BR'
BABEL_DEFAULT_TIMEZONE = 'America/Sao_Paulo'
```
But when "pt_BR" is selected as active language, in the Superset web interface, I get an 404 error in the web console:
```
Failed to fetch language pack, falling back to default.
Response { type: "basic", url: "https://superset.eyeforest.dev/superset/language_pack/pt/", redirected: false, status: 404, ok: false, statusText: "NOT FOUND", headers: Headers(14), body: ReadableStream, bodyUsed: false }
```
Is there any missing config? I've followed the docs and read the [UPDATING.md](https://github.com/apache/superset/blob/6.0.0rc2/UPDATING.md) for version 6.0.0, but nothing seems to work
GitHub link: https://github.com/apache/superset/discussions/35312
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "gabriela-schuster (via GitHub)" <gi...@apache.org>.
GitHub user gabriela-schuster edited a discussion: [6.0.0rc2] Error Enabling Translations
I am having trouble enabling pt_BR (but any language actually) translations in Superset 6.0.0rc2 (6.0.0rc1 doesn't seem to work also)
I am building it with the flag `BUILD_TRANSLATIONS: true`, as shown in my docker compose below:
```
superset:
image: apache/superset:6.0.0rc2
container_name: superset
restart: always
build:
context: .docker/superset
dockerfile: Dockerfile
args:
BUILD_TRANSLATIONS: true
```
Also, i am setting my `superset_config.py` with the required vars:
```
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
"pt_BR": {"flag": "br", "name": "Brazilian Portuguese"},
}
BABEL_DEFAULT_FOLDER = "superset/translations"
BABEL_DEFAULT_LOCALE = 'pt_BR'
BABEL_DEFAULT_TIMEZONE = 'America/Sao_Paulo'
```
But when "pt_BR" is selected as active language, in the Superset web interface, I get an 404 error in the web console:
```
Failed to fetch language pack, falling back to default.
Response { type: "basic", url: "https://superset.eyeforest.dev/superset/language_pack/pt/", redirected: false, status: 404, ok: false, statusText: "NOT FOUND", headers: Headers(14), body: ReadableStream, bodyUsed: false }
```
Is there any missing config? I've followed the docs and read the [UPDATING.md](https://github.com/apache/superset/blob/6.0.0rc2/UPDATING.md) for version 6.0.0, but it doesn't seem to work
GitHub link: https://github.com/apache/superset/discussions/35312
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
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 notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: [6.0.0rc2] Error Enabling Translations
<!-- Greeting -->
Hi @gabriela-schuster! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
<!-- Answer -->
The 404 error happens because Superset’s frontend requests the language pack using the short code `pt`, but your translation files are for `pt_BR`. To fix this, add the following override function to your `superset_config.py`:
```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
```
After adding this, rebuild your frontend translations by running:
```bash
cd superset-frontend/
npm run build-translation
```
This will ensure Superset serves the correct language pack and resolves the 404 error. This approach works for any language where the frontend and backend locale codes might mismatch. More details and examples are available [here](https://github.com/apache/superset/discussions/33594) and [here](https://github.com/apache/superset/issues/34058).
<!-- 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/16d863cf-efc9-4395-beee-5ea1cee0b5be?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/16d863cf-efc9-4395-beee-5ea1cee0b5be?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/16d863cf-efc9-4395-beee-5ea1cee0b5be?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/16d863cf-efc9-4395-beee-5ea1cee0b5be?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/16d863cf-efc9-4395-beee-5ea1cee0b5be?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/16d863cf-efc9-4395-beee-5ea1cee0b5be?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/16d863cf-efc9-4395-beee-5ea1cee0b5be?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-14523320
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: [6.0.0rc2] Error Enabling Translations
<!-- Answer -->
Superset 6.0.0rc2 expects the translation build script to be at `superset-frontend/scripts/po2json.sh`. If you get a "not found" error, it's likely your source checkout or Docker build context is missing this file. The script is still required and hasn't been replaced in this version—it's a bash script that converts `.po` files to frontend `.json` translation files using `po2json` and `prettier` ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/package.json), [script](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/scripts/po2json.sh)).
To fix this, make sure your build context includes the full `superset-frontend/scripts` directory and that `po2json.sh` is present before running `npm run build-translation`. If you're building a Docker image, check your Dockerfile and build context to ensure this directory is copied into the image. There are no alternative or updated methods for building frontend translation files in 6.0.0rc2—the process still relies on this shell script.
<!-- 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/7115b350-8095-4875-9420-634b26362f77?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7115b350-8095-4875-9420-634b26362f77?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7115b350-8095-4875-9420-634b26362f77?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7115b350-8095-4875-9420-634b26362f77?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7115b350-8095-4875-9420-634b26362f77?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7115b350-8095-4875-9420-634b26362f77?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7115b350-8095-4875-9420-634b26362f77?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-14524444
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "gabriela-schuster (via GitHub)" <gi...@apache.org>.
GitHub user gabriela-schuster added a comment to the discussion: [6.0.0rc2] Error Enabling Translations
Adittionally, my superset build does not contain `scripts/po2json.sh`, so when i run `npm run build-translation`, it throws a not found error:
```
# npm run build-translation
> superset@6.0.0 build-translation
> scripts/po2json.sh
sh: 1: scripts/po2json.sh: not found
```
it does not include this script even after changing to 6.0.0rc2-dev image
GitHub link: https://github.com/apache/superset/discussions/35312#discussioncomment-14524418
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] [6.0.0rc2] Error Enabling Translations [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: [6.0.0rc2] Error Enabling Translations
<!-- Greeting -->
Hi @gabriela-schuster! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
<!-- Answer -->
The 404 error happens because Superset’s frontend requests the language pack using the short code `pt`, but your translation files are for `pt_BR`. To fix this, add the following override function to your `superset_config.py`:
```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
```
After adding this, rebuild your frontend translations by running:
```bash
cd superset-frontend/
npm run build-translation
```
This will ensure Superset serves the correct language pack and resolves the 404 error. This approach works for any language where the frontend and backend locale codes might mismatch. More details and examples are available [here](https://github.com/apache/superset/discussions/33594) and [here](https://github.com/apache/superset/issues/34058).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=16d863cf-efc9-4395-beee-5ea1cee0b5be) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35312#discussioncomment-14523320
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org