You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "FrancescoCastaldi (via GitHub)" <gi...@apache.org> on 2026/03/29 16:18:10 UTC
[D] How do i force translations changes? and how to speed up building processing? [superset]
GitHub user FrancescoCastaldi created a discussion: How do i force translations changes? and how to speed up building processing?
Hi, How can I force translation updates to take effect, and how can I speed up the build process in Apache Superset? Iām looking for the best way to refresh translated content and reduce build time during development or deployment.
GitHub link: https://github.com/apache/superset/discussions/38932
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi edited a comment on the discussion: How do i force translations changes? and how to speed up building processing?
cd superset-frontend && npm run build-translation
not working:
PS C:\Users\xxxx\fresh_superset\superset-frontend> npm run build-translation
> superset@6.0.0 build-translation
> scripts/po2json.sh
'scripts' is not recognized as an internal or external command,
operable program or batch file.
PS C:\Users\xxx\fresh_superset\superset-frontend>
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16370163
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How do i force translations changes? and how to speed up building processing?
<!-- Answer -->
To force translation changes and speed up builds in Apache Superset:
## Forcing Translation Updates
You need to compile translations for **both** backend and frontend:
**Backend (.po ā .mo):**
```bash
pybabel compile -d superset/translations
```
Or: `flask fab babel-compile --target superset/translations` [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/scripts/translations/generate_mo_files.sh#L22)
**Frontend (.po ā .json):**
```bash
cd superset-frontend && npm run build-translation
```
This converts `.po` files to JSON format for the JavaScript frontend [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/scripts/po2json.sh#L31-L32).
After compiling, make sure translations are enabled in your config (the `LANGUAGES` dict shouldn't be empty) and **restart Superset** for changes to take effect .
## Speeding Up the Build Process
- **Skip translation compilation** during Docker builds if not needed by setting `BUILD_TRANSLATIONS=false`
- **Extraction optimization**: The babel config already excludes `node_modules`, `superset-ui-demo`, and `migrations` directories to speed up extraction [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/translations/babel.cfg)
- **Runtime caching**: Superset lazy-loads and caches language packs in memory, so translations are only loaded once on first access
If you're updating translation catalogs (extracting new strings), use `scripts/translations/babel_update.sh` which handles both Python and JS/TS extraction [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/scripts/translations/babel_update.sh#L43-L61).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b4b67a8c-034c-4169-91eb-642147069651?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b4b67a8c-034c-4169-91eb-642147069651?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b4b67a8c-034c-4169-91eb-642147069651?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b4b67a8c-034c-4169-91eb-642147069651?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b4b67a8c-034c-41
69-91eb-642147069651?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination) | [Report š](https://app.dosu.dev/response-feedback/b4b67a8c-034c-4169-91eb-642147069651?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report) | [Other](https://app.dosu.dev/response-feedback/b4b67a8c-034c-4169-91eb-642147069651?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge) [](https://cursor.com/link/prompt?text=To%20force%20translation%20changes%20and%20speed%20up%20builds%20in%20Apache%20Superset%3A%0A%0A%23%23%20Forcing%20Translation%20Updates%0A%0AYou%20need%20to%20compile%20translations%20for%20%2A%2Aboth%2A%2A%20backend%20and%20frontend%3A%0A%0A%2A%2ABackend%20%28.po%20%E2%86%92%20.mo%29%3A%2A%2A%0A%0A%60%60%60bash%0Apybabel%20compile%20-d%20superset/translations%0A%60%60%60%0A%0AOr%3A%20%60flask%20fab%20babel-compile%20--target%20superset/translations%60%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/scripts/translations/generate_mo_files.sh%23L22%29%0A%0A%2A%2AFrontend%20%28.po%20%E2%86%92%20.json%29%3A%2A%2A%0A%0A%60%60%60
bash%0Acd%20superset-frontend%20%26%26%20npm%20run%20build-translation%0A%60%60%60%0A%0AThis%20converts%20%60.po%60%20files%20to%20JSON%20format%20for%20the%20JavaScript%20frontend%20%5B%5B2%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/scripts/po2json.sh%23L31-L32%29.%0A%0AAfter%20compiling%2C%20make%20sure%20translations%20are%20enabled%20in%20your%20config%20%28the%20%60LANGUAGES%60%20dict%20shouldn%27t%20be%20empty%29%20and%20%2A%2Arestart%20Superset%2A%2A%20for%20changes%20to%20take%20effect%20.%0A%0A%23%23%20Speeding%20Up%20the%20Build%20Process%0A%0A-%20%2A%2ASkip%20translation%20compilation%2A%2A%20during%20Docker%20builds%20if%20not%20needed%20by%20setting%20%60BUILD_TRANSLATIONS%3Dfalse%60%20%0A-%20%2A%2AExtraction%20optimization%2A%2A%3A%20The%20babel%20config%20already%20excludes%20%60node_modules%60%2C%20%60superset-ui-demo%60%2C%20and%20%60migrations%60%20directories%20to%20speed%20up%20extraction%20%5B%5B3
%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/translations/babel.cfg%29%0A-%20%2A%2ARuntime%20caching%2A%2A%3A%20Superset%20lazy-loads%20and%20caches%20language%20packs%20in%20memory%2C%20so%20translations%20are%20only%20loaded%20once%20on%20first%20access%20%0A%0AIf%20you%27re%20updating%20translation%20catalogs%20%28extracting%20new%20strings%29%2C%20use%20%60scripts/translations/babel_update.sh%60%20which%20handles%20both%20Python%20and%20JS/TS%20extraction%20%5B%5B4%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/scripts/translations/babel_update.sh%23L43-L61%29.) [](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord) [](https://twitter.com/intent/tw
eet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/38932)
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16368728
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi added a comment to the discussion: How do i force translations changes? and how to speed up building processing?
I'm using docker desktop and how can i launch theese commands with VS Code? (on windows)
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16369063
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi added a comment to the discussion: How do i force translations changes? and how to speed up building processing?
cd superset-frontend && npm run build-translation
not working:
PS C:\Users\admmaps\fresh_superset\superset-frontend> npm run build-translation
> superset@6.0.0 build-translation
> scripts/po2json.sh
'scripts' is not recognized as an internal or external command,
operable program or batch file.
PS C:\Users\admmaps\fresh_superset\superset-frontend>
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16370163
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi edited a comment on the discussion: How do i force translations changes? and how to speed up building processing?
cd superset-frontend && npm run build-translation
not working:
PS C:\Users\xxxx\fresh_superset\superset-frontend> npm run build-translation
> superset@6.0.0 build-translation
> scripts/po2json.sh
'scripts' is not recognized as an internal or external command,
operable program or batch file.
PS C:\Users\xxx\fresh_superset\superset-frontend>
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16370163
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi edited a comment on the discussion: How do i force translations changes? and how to speed up building processing?
I'm using docker desktop and how can i launch theese commands with VS Code? (on windows)
cd superset-frontend && npm run build-translation
not working:
PS C:\Users\xxxx\fresh_superset\superset-frontend> npm run build-translation
superset@6.0.0 build-translation
scripts/po2json.sh
'scripts' is not recognized as an internal or external command,
operable program or batch file.
PS C:\Users\xxx\fresh_superset\superset-frontend> @Dosu
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16371918
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: How do i force translations changes? and how to speed up building processing?
<!-- Answer -->
To force translation changes and speed up builds in Apache Superset:
## Forcing Translation Updates
You need to compile translations for **both** backend and frontend:
**Backend (.po ā .mo):**
```bash
pybabel compile -d superset/translations
```
Or: `flask fab babel-compile --target superset/translations` [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/scripts/translations/generate_mo_files.sh#L22)
**Frontend (.po ā .json):**
```bash
cd superset-frontend && npm run build-translation
```
This converts `.po` files to JSON format for the JavaScript frontend [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/scripts/po2json.sh#L31-L32).
After compiling, make sure translations are enabled in your config (the `LANGUAGES` dict shouldn't be empty) and **restart Superset** for changes to take effect .
## Speeding Up the Build Process
- **Skip translation compilation** during Docker builds if not needed by setting `BUILD_TRANSLATIONS=false`
- **Extraction optimization**: The babel config already excludes `node_modules`, `superset-ui-demo`, and `migrations` directories to speed up extraction [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/translations/babel.cfg)
- **Runtime caching**: Superset lazy-loads and caches language packs in memory, so translations are only loaded once on first access
If you're updating translation catalogs (extracting new strings), use `scripts/translations/babel_update.sh` which handles both Python and JS/TS extraction [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/scripts/translations/babel_update.sh#L43-L61).
<!-- 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=b4b67a8c-034c-4169-91eb-642147069651) [](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/38932#discussioncomment-16368728
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi closed a discussion: How do i force translations changes? and how to speed up building processing?
Hi, How can I force translation updates to take effect, and how can I speed up the build process in Apache Superset? Iām looking for the best way to refresh translated content and reduce build time during development or deployment.
GitHub link: https://github.com/apache/superset/discussions/38932
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi deleted a comment on the discussion: How do i force translations changes? and how to speed up building processing?
I'm using docker desktop and how can i launch theese commands with VS Code? (on windows)
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16369063
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi deleted a comment on the discussion: How do i force translations changes? and how to speed up building processing?
cd superset-frontend && npm run build-translation
not working:
PS C:\Users\xxxx\fresh_superset\superset-frontend> npm run build-translation
> superset@6.0.0 build-translation
> scripts/po2json.sh
'scripts' is not recognized as an internal or external command,
operable program or batch file.
PS C:\Users\xxx\fresh_superset\superset-frontend>
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16370163
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi edited a comment on the discussion: How do i force translations changes? and how to speed up building processing?
I'm using docker desktop and how can i launch theese commands with VS Code? (on windows)
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16369063
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi added a comment to the discussion: How do i force translations changes? and how to speed up building processing?
I'm using docker desktop and how can i launch theese commands with VS Code? (on windows)
cd superset-frontend && npm run build-translation
not working:
PS C:\Users\xxxx\fresh_superset\superset-frontend> npm run build-translation
superset@6.0.0 build-translation
scripts/po2json.sh
'scripts' is not recognized as an internal or external command,
operable program or batch file.
PS C:\Users\xxx\fresh_superset\superset-frontend>
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16371918
----
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] How do i force translations changes? and how to speed up building processing? [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
GitHub user FrancescoCastaldi edited a comment on the discussion: How do i force translations changes? and how to speed up building processing?
I'm using docker desktop and how can i launch theese commands with VS Code? (on windows)
cd superset-frontend && npm run build-translation
not working:
PS C:\Users\xxxx\fresh_superset\superset-frontend> npm run build-translation
superset@6.0.0 build-translation
scripts/po2json.sh
'scripts' is not recognized as an internal or external command,
operable program or batch file.
PS C:\Users\xxx\fresh_superset\superset-frontend>
GitHub link: https://github.com/apache/superset/discussions/38932#discussioncomment-16371918
----
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