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

   ### SUMMARY
   The "chart referenced by annotation layer was not found" error in 
`superset/common/query_context_processor.py` was an f-string inside `gettext`, 
so it has never been translatable. It also breaks the pot drift check added in 
#44467 on the Python 3.12 unit-test job: with 3.12's f-string tokenization (PEP 
701), Babel picks up the literal `"value"` and `"name"` dict keys inside the 
f-string's replacement fields and extracts them as a bogus msgid `valuename`. 
Python 3.11 skips the f-string, so only the `next` job fails.
   
   This changes the call to a normal parameterized gettext message and 
regenerates the catalogs with `scripts/translations/babel_update.sh`. The 
regeneration also picks up the reworded connection-move message from #44036, 
which merged without a catalog update and makes `check_pot_drift` fail on 3.11 
as well.
   
   ### TESTING INSTRUCTIONS
   - `python scripts/translations/check_pot_drift.py` passes under Python 3.11.
   - The same passes under 3.12, e.g. `uv run --no-project --python 3.12 --with 
babel==2.17.0 --with jinja2==3.1.6 -- python 
scripts/translations/check_pot_drift.py`. Before this change it reports 
`valuename` as missing.
   - `pytest tests/unit_tests/common/ tests/unit_tests/scripts/translations/`
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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
   
   The same fix is already on the `7.0` release branch.


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