GitHub user manimovassagh added a comment to the discussion: Latvian 
localization

Great initiative -- always good to see more localization coverage. A few things 
that might help smooth the process:

1. **Generate the base `.po` file** if you haven't already:
   ```bash
   cd superset-frontend
   pybabel extract -F babel.cfg -o messages.pot .
   pybabel init -i messages.pot -d translations -l lv
   ```

2. **Backend translations** live in `superset/translations/`. You'll need to 
create `superset/translations/lv/LC_MESSAGES/messages.po` and compile it:
   ```bash
   pybabel compile -d superset/translations
   ```

3. **Register the locale** -- Add `lv` to `LANGUAGES` in your 
`superset_config.py`:
   ```python
   LANGUAGES = {
       "en": {"flag": "us", "name": "English"},
       "lv": {"flag": "lv", "name": "Latviešu"},
   }
   ```
   Make sure `lv` is included in the available locales list in the Flask-Babel 
config.

4. **Dependencies** -- Good call on the upstream PRs to humanize and 
Flask-AppBuilder. ECharts translations are trickier since those are bundled 
separately, but the PR you linked should cover the chart-level strings.

When you're ready to submit the PR to Superset itself, the contribution 
guidelines ask that you include the `.po` file (not the compiled `.mo`). The CI 
pipeline handles compilation. Looking forward to seeing Latvian support land!

GitHub link: 
https://github.com/apache/superset/discussions/38758#discussioncomment-16233490

----
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]

Reply via email to