dosubot[bot] commented on issue #35999: URL: https://github.com/apache/superset/issues/35999#issuecomment-3490864947
<!-- Greeting --> Hi @adis-sabotic! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> The frontend error you’re seeing when switching to Serbian/Montenegrin is almost certainly because Superset can’t find or load the required frontend translation file for your custom language. Superset’s frontend expects a JSON translation bundle (like `sr.json`) to exist and be registered for the language you select. If this file is missing or not referenced correctly, you’ll get errors like the one in your console ([source](https://github.com/apache/superset/issues/35959), [source](https://github.com/apache/superset/discussions/35323)). Here’s what you need to check and do: 1. **Frontend translation file**: Make sure you have a valid `sr.json` file (or `messages.json` for `sr`) generated from your `.po` file. This file should contain at least the keys for the Time Range filter you want to translate. 2. **Build process**: When building your Docker image, run `npm run build-translation` in the `superset-frontend` directory and set the build argument `BUILD_TRANSLATIONS=true`. This ensures your custom translation files are generated and included ([source](https://github.com/apache/superset/discussions/35323)). 3. **Registration/config**: Confirm that your custom language is registered in the frontend config (like in `supportedLanguages.js` or similar). The language code in the dropdown must match the translation file name. 4. **Locale override (if needed)**: If your language code in the dropdown doesn’t match the translation folder, add a bootstrap override in `superset_config.py` to map the frontend locale to the backend language pack ([example](https://github.com/apache/superset/discussions/35323)). 5. **Verify in Docker**: After building, check that your Docker image contains the correct translation files in `/app/superset/translations/sr/LC_MESSAGES/messages.json` (or wherever your frontend expects them). If you only want to translate the Time Range filter, your JSON file can be minimal—just include the relevant keys. Missing or incomplete translation files will cause the frontend to fail to initialize the language, resulting in the error you’re seeing ([source](https://github.com/apache/superset/issues/31610)). If the language appears in the selector but doesn’t work, check your browser’s network tab for 404 errors on the translation file. That’s a sign the file is missing or misconfigured. Let me know if you want a sample Dockerfile snippet or more details for your specific setup! <!-- 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/f0028267-fba5-460c-b785-c5446305f776?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f0028267-fba5-460c-b785-c5446305f776?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f0028267-fba5-460c-b785-c5446305f776?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f0028267-fba5-460c-b785-c5446305f776?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f0028267-fba5-460c-b785-c5446305f776?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f0028267-fba5-460c-b785-c5446305f776?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f0028267-fba5-460c-b785-c5446305f776?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](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/issues/35999) -- 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]
