antalotec opened a new issue, #45986:
URL: https://github.com/apache/superset/issues/45986

   ### Bug description
   
   ### What
   
   The `pt` and `pt_BR` catalogs each contain **64 entries whose placeholders 
no longer sit
   where the source puts them**. Both catalogs carry the same 64 msgids with
   character-for-character identical translations, so this looks like a single 
edit applied
   to both.
   
   Two shapes:
   
   **1. The placeholder is glued to the surrounding words** (22 entries):
   
   | msgid | pt / pt_BR | renders as |
   |---|---|---|
   | `Auto refresh set to %s seconds` | `Atualização automática definida 
para%ssegundos` | "…definida para30segundos" |
   | `There was an issue deleting the selected %s` | `Ocorreu um problema ao 
excluir o%sselecionado` | "…ao excluir odashboardselecionado" |
   | `Deleted %s item(s)` | `Itens%sexcluídos` | "Itens5excluídos" |
   
   **2. The placeholder has moved to the end of the phrase** (42 entries), 
which changes the
   sentence rather than just the spacing:
   
   | msgid | pt / pt_BR | renders as |
   |---|---|---|
   | `Add %s view(s)` | `Adicionar visualizações%s` | "Adicionar 
visualizações3" |
   | `All %s hidden columns` | `Todas as colunas ocultas%s` | "Todas as colunas 
ocultas12" |
   | `Showing %s of %s items` | `Mostrando%sde itens%s` | placeholders in the 
wrong order |
   
   ### When
   
   Neither catalog had any of these in **6.1.0** (May 2026): the count goes 
from **0** to
   **64** in both. They arrived with #43022 (*chore(i18n): update pt/pt_BR 
translations and
   rebuild translation index*, +5735/−5720), merged on 2026-10-07.
   
   ### How to reproduce the detection
   
   ```python
   import polib, re
   glued = re.compile(r"\w%s\w")                       # both sides
   one_side = re.compile(r"(\w%s(?!\w))|((?<!\w)%s\w)")  # one side
   for e in polib.pofile("superset/translations/pt/LC_MESSAGES/messages.po"):
       if e.obsolete or not e.msgid or not e.msgstr:
           continue
       for pat in (glued, one_side):
           if pat.search(e.msgstr) and not pat.search(e.msgid):
               print(repr(e.msgid), "->", repr(e.msgstr))
               break
   ```
   
   Note the heuristic only makes sense for languages that separate words with 
spaces: on
   `zh`, `ja` or `th` it reports false positives, so any automated check would 
need to skip
   them.
   
   ### Why this is reported rather than fixed
   
   Inserting the missing spaces repairs the first group, but the second needs 
the sentence
   rewritten so the placeholder goes back where the source has it
   (`Adicionar %s visualizações`, not `Adicionar visualizações %s`). That is a 
judgement call
   for a Portuguese speaker, and we are not one — hence an issue rather than a 
pull request.
   
   Happy to supply the full list of the 64 msgids, or to open a PR for the 
mechanical subset
   if that is useful.
   
   ---
   
   Developed at MYSPHERA, S.L.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   Not applicable
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Not applicable
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


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