sadpandajoe opened a new pull request, #44587:
URL: https://github.com/apache/superset/pull/44587
### SUMMARY
Every SQL Lab query fails with a 500 when the UI language is Slovak.
`superset/sql_lab.py:587-591` renders the per-statement progress message with
`gettext("Running block %(block_num)s out of %(block_count)s",
block_num=..., block_count=...)`.
The Slovak catalog translated that msgid as
`"Spouští sa príkaz %(statement_num)s z %(statement_count)s"` — the msgstr
referenced `statement_num`/`statement_count`, placeholder names the caller
does
not pass, so formatting it raised `KeyError('statement_num')` on every
statement.
Introduced by 5549100601 ("feat(i18n): add missing Slovak translations",
#40219). The msgid itself had been renamed from `statement_*` to `block_*` a
year earlier in cf315388f2 ("feat(sqllab): use sqlglot instead of sqlparse",
#33542), at which point the Slovak entry was still empty; #40219 then
backfilled
it with a Czech-derived string that carried the pre-rename placeholder names.
The entry was marked `#, fuzzy`, but that does not make it inert:
`Dockerfile:168`
compiles catalogs with `pybabel compile --use-fuzzy`, so the broken msgstr
ships
and is used.
This corrects the msgstr to `"Spúšťa sa blok %(block_num)s z
%(block_count)s"` —
matching both the placeholders the caller passes and the terminology of the
sibling entry already in the Slovak catalog, `"Block %(block_num)s out of
%(block_count)s"` → `"Blok %(block_num)s z %(block_count)s"` — and drops the
now
inaccurate `fuzzy` flag. A regression test asserts the Slovak msgstr's
placeholder set is a subset of the English source's.
This is the same defect class already fixed for French (#38468) and Czech
(#40165). Issue #44551 reports it in 19 further locales; this PR deliberately
fixes only Slovak, the locale with a confirmed reproduction, rather than
bundling a multi-language sweep into one change.
### TESTING INSTRUCTIONS
1. Set the UI language to Slovak (`sk`) — either via the language picker, or
by
setting `BABEL_DEFAULT_LOCALE = "sk"` in `superset_config.py`.
2. Make sure the translations are compiled with fuzzy entries included, as
the
Docker image does: `pybabel compile --use-fuzzy -d superset/translations`.
3. Open SQL Lab and run any query, e.g. `SELECT 1`.
4. Before this change the query fails with a 500 and the logs show
`KeyError: 'statement_num'`. After it, the query succeeds and the progress
message reads "Spúšťa sa blok 1 z 1".
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #44551
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] 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
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]