Abdulrehman-PIAIC80387 opened a new pull request, #40166:
URL: https://github.com/apache/superset/pull/40166
### SUMMARY
Fixes #40165. Same bug pattern as #39566 (French), which was fixed by
#38494. Czech was missed in that original sweep.
`superset/sql_lab.py:494` calls `__(\"Running block %(block_num)s out of
%(block_count)s\", block_num=..., block_count=...)`. The Czech `.po`
substituted `%(statement_num)s` / `%(statement_count)s` — variables that don't
exist in the call — causing `KeyError('statement_num')` to propagate as
`SupersetErrorsException` and break every SQL Lab query when
`BABEL_DEFAULT_LOCALE = "cs"`.
### BEFORE/AFTER
```diff
#, fuzzy, python-format
msgid "Running block %(block_num)s out of %(block_count)s"
-msgstr "Spouští se příkaz %(statement_num)s z %(statement_count)s"
+msgstr "Spouští se příkaz %(block_num)s z %(block_count)s"
```
### TESTING INSTRUCTIONS
1. In `superset_config.py` set `BABEL_DEFAULT_LOCALE = "cs"`
2. Restart Superset
3. Open SQL Lab and run any query (e.g. `SELECT 1`)
4. Before: query fails with `'statement_num'`. After: query executes
normally.
### ADDITIONAL INFORMATION
- [x] Has associated issue: #40165
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] 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]