dosubot[bot] commented on issue #35959:
URL: https://github.com/apache/superset/issues/35959#issuecomment-3480977131

   <!-- Answer -->
   You do not need to manually copy translation files if you build your 
Superset 5.0.0 Docker image with `BUILD_TRANSLATIONS=true`—the build process 
should generate and include both backend (.mo) and frontend (.json) translation 
files automatically from the source .po files 
[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/Dockerfile#L27-L210).
   
   If French translations still don't work, here’s what to check:
   
   - Make sure the build logs show that translation steps (like `npm run 
build-translation` and `pybabel compile`) ran without errors and produced files 
for French.
   - In your built image, confirm that 
`superset/translations/fr/LC_MESSAGES/messages.json` (frontend) and 
`superset/translations/fr/LC_MESSAGES/messages.mo` (backend) exist.
   - If the French option appears but doesn’t work, check the browser console 
for 404 errors or “Failed to fetch language pack” messages—this means the 
frontend JSON file is missing or not loaded 
[source](https://github.com/apache/superset/issues/35330#issuecomment-3351457023).
   - Locale codes must match between frontend and backend. For most setups, 
`"fr"` is correct, but if you use a variant or see a mismatch, add a bootstrap 
override in `superset_config.py`:
   
   ```python
   from superset.translations.utils import get_language_pack
   
   def override_bootstrap_locale(data):
       if data.get("locale") == "fr":
           data["locale"] = "fr"
           data["language_pack"] = get_language_pack('fr')
       return data
   
   COMMON_BOOTSTRAP_OVERRIDES_FUNC = override_bootstrap_locale
   ```
   
   - Some UI elements may remain untranslated if their keys are missing from 
the French translation files, especially in chart plugins and new UI features 
[source](https://github.com/apache/superset/discussions/34540#discussioncomment-13994711).
   
   If you follow these steps and translations still don’t work, check for 
errors in your build logs and browser console, and verify the translation files 
are present in the image. Let me know what you find!
   
   
   <!-- 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/ec96fac4-79dd-40d1-8a03-afd1420888cb?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/ec96fac4-79dd-40d1-8a03-afd1420888cb?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/ec96fac4-79dd-40d1-8a03-afd1420888cb?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/ec96fac4-79dd-40d1-8a03-afd1420888cb?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/ec96fac4-79dd-40d1-8a03-afd1420888cb?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/ec96fac4-79dd-40d1-8a03-afd1420888cb?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/ec96fac4-79dd-40d1-8a03-afd1420888cb?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35959)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to