GitHub user dosubot[bot] added a comment to the discussion: Can't translate the "Settings" on the menu for brazilian portuguese
<!-- Greeting --> Hi @ViniciusCavalcanteSantos! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> The translation for "Settings" to "Configurações" does exist in the Brazilian Portuguese translation file, and your debugging confirms that the backend is returning the correct translation when using `__("Settings")`. This suggests that the translation files are compiled and available, and your locale is set correctly. However, there are a few important details in Superset's configuration and frontend that can affect whether translations appear in the UI: 1. **LANGUAGES Configuration**: In `superset/config.py`, the `LANGUAGES` dictionary must include `'pt_BR'` for Brazilian Portuguese. If this dictionary is empty or missing your language, translations may not be enabled in the UI—even if the backend is set up correctly. By default, Superset disables translations because many are incomplete. Make sure your `LANGUAGES` setting looks something like this: ```python LANGUAGES = { "en": {"flag": "us", "name": "English"}, "pt_BR": {"flag": "br", "name": "Brazilian Portuguese"}, # add other languages as needed } ``` [Reference](https://github.com/apache/superset/blob/master/superset/config.py) 2. **Frontend Language Selection**: If you have more than one language in `LANGUAGES`, Superset will show a language dropdown in the UI. This allows users to switch languages on the fly. If the dropdown is not present, it may indicate that the frontend is not aware of your language configuration, and thus not applying translations as expected. [Reference](https://github.com/apache/superset/blob/master/docs/docs/contributing/howtos.mdx) 3. **Frontend Translation Mechanism**: The frontend uses its own translation system (`@superset-ui/translation`). If the translation for "Settings" is not appearing, it could be that the frontend bundle does not include the latest translations, or that the translation key is missing from the frontend's language pack. The backend and frontend translations are separate, so a translation working in Python does not guarantee it works in the React UI. [Reference](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/translation/TranslatorSingleton.ts) 4. **Rebuild Frontend Assets**: If you have updated translation files, you may need to rebuild the frontend assets to ensure the new translations are picked up. **Summary of what to check:** - Ensure `LANGUAGES` in your config includes `'pt_BR'`. - Make sure the language dropdown appears in the UI. - Confirm that the translation for "Settings" exists in both backend and frontend translation files. - Rebuild frontend assets after updating translations. There are no open issues or discussions specifically about the "Settings" menu item not translating for these languages, but incomplete or missing frontend translations is a common cause for this type of problem. If you have confirmed all the above and the issue persists, it may be necessary to check the frontend translation files and ensure the translation key for "Settings" is present and correctly mapped for Brazilian Portuguese. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/126700d9-2c5a-4b06-be1e-b84b8a8f0549?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/126700d9-2c5a-4b06-be1e-b84b8a8f0549?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/126700d9-2c5a-4b06-be1e-b84b8a8f0549?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/126700d9-2c5a-4b06-be1e-b84b8a8f0549?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/126700d9-2c5a-4b06-be1e-b84b8a8f0549?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/126700d9-2c5a-4b06-be1e-b84b8a8f0549?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/126700d9-2c5a-4b06-be1e-b84b8a8f0549?feedback_type=other)</sup> [](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/33594) GitHub link: https://github.com/apache/superset/discussions/33594#discussioncomment-13286477 ---- 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]
