rijekaDrina opened a new pull request, #41137:
URL: https://github.com/apache/superset/pull/41137

   ### SUMMARY
   
   Adds **Serbian** translations to Superset in both scripts used in practice:
   
   - **`sr` (Cyrillic)** — the canonical catalog. Strings were AI-drafted with 
the
     repo's own `scripts/translations/backfill_po.py` (using existing 
translations
     in other languages as cross-language reference context), then **fully
     human-reviewed**: every machine-drafted `#, fuzzy` entry was checked,
     corrected where needed, and accepted. The catalog is now 0 fuzzy.
   - **`sr_Latn` (Latin / Gaj's alphabet)** — generated **deterministically** 
from
     the reviewed Cyrillic catalog via a 1:1 transliteration script
     (`scripts/translations/cyrillic_to_latin_sr.py`), so the two scripts can 
never
     drift. English `msgid`s, `%(name)s` / `{name}` placeholders, and HTML 
markup
     contain no Cyrillic and pass through untouched.
   
   Both catalogs cover 4925 messages and are fully translated.
   
   Registers both locales in `superset/config.py`:
   
   ```python
   "sr": {"flag": "rs", "name": "Serbian (Cyrillic)"},
   "sr_Latn": {"flag": "rs", "name": "Serbian (Latin)"},
   ```
   
   (The `rs` flag is provided by the existing Flask-AppBuilder famfamfam flag
   sprite — no new asset is needed.)
   
   Tooling added under `scripts/translations/` to keep the two scripts in sync 
and
   to support reviewing AI-drafted catalogs in general:
   `cyrillic_to_latin_sr.py`, `latin_to_cyrillic_sr.py`, `triage_fuzzy.py`,
   `review_fuzzy.py`. `backfill_po.py` is updated to register Serbian in
   `LANGUAGE_NAMES`.
   
   Notable review fixes: restored a dropped `%s` placeholder in
   `"%s ENCRYPTED EXTRA"`, and repaired one plural entry
   (`"The parameter %(parameters)s ..."`) whose three forms had been overwritten
   with the literal `[0]/[1]/[2]` breakdown text.
   
   Compiled `.mo` files and `translation_index.json` are intentionally **not**
   committed (gitignored build artifacts).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — adds new translation catalogs; no visual change beyond the two new 
entries
   in the language picker once `LANGUAGES` enables them.
   
   ### TESTING INSTRUCTIONS
   
   1. Enable the languages in `superset_config.py`:
      ```python
      LANGUAGES = {
          "en": {"flag": "us", "name": "English"},
          "sr": {"flag": "rs", "name": "Serbian (Cyrillic)"},
          "sr_Latn": {"flag": "rs", "name": "Serbian (Latin)"},
      }
      ```
   2. Compile catalogs: `pybabel compile -d superset/translations` and, from
      `superset-frontend/`, `npm run build-translation`.
   3. Start Superset, open the language picker, and switch to **Serbian 
(Cyrillic)**
      and **Serbian (Latin)** — the UI renders in each script.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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