Skip to content

fix(i18n): dedup 2 CmsUi <tu> entries with differing content (#1546) - #1717

Merged
natechadwick merged 4 commits into
developmentfrom
fix/1546-dedup-cmsui-tuids
Aug 1, 2026
Merged

fix(i18n): dedup 2 CmsUi <tu> entries with differing content (#1546)#1717
natechadwick merged 4 commits into
developmentfrom
fix/1546-dedup-cmsui-tuids

Conversation

@vijaya-boddipudi

Copy link
Copy Markdown
Collaborator

Summary

Delete two duplicate <tu> entries in modules/perc-i18n/src/main/resources/i18n/CmsUi.tmx whose tuid collided but whose <seg> content differed. Runtime last-wins via PSTmxResourceBundle.addResourcesToCache was silently shadowing the first entries and showing the wrong strings to users.

Deleted entries

tuid en-us (deleted) reason
perc.ui.content.view@Remove Shared Asset (Occ1) "Remove shared asset from widget. This will not delete the asset from the system." Long descriptive string; runtime already showed the short Occ2 text for both tooltip and dialog title. User-visible behavior unchanged.
perc.ui.template.layout@Delete Content Of Region (Occ2) "There are already region based CSS settings for region" Unrelated CSS warning copy-pasted onto the wrong tuid. Was causing the JSP checkbox label to show the wrong CSS message.

Kept entries

tuid en-us (kept)
perc.ui.content.view@Remove Shared Asset (Occ2) "Remove Shared Asset"
perc.ui.template.layout@Delete Content Of Region (Occ1) "Delete content of region."

Net change

  • CmsUi.tmx: 1634 → 1632 <tu> entries (−20 lines, 0 additions)
  • Zero duplicates remaining
  • No code changes in JS/JSP — the surviving tuid already matches all existing references

Validation evidence

  • python3 -c "import xml.etree.ElementTree as ET; ET.parse('CmsUi.tmx')" → OK
  • Duplicate scan via Python Counter: No duplicates found
  • cd modules/perc-i18n && ..\mvnw.cmd clean installBUILD SUCCESS (31.7s)
  • cd WebUI && ..\mvnw.cmd clean installBUILD SUCCESS (3:35)
  • No new compile warnings on changed modules

Spotless

Skipped — CmsUi.tmx is outside Spotless's covered set (Java/Markdown/JS/TS per AGENTS.md). A pre-existing unrelated tmp/issue-1689.json encoding issue blocks mvnw.cmd spotless:apply at repo root; confirmed pre-existing by stashing my changes and reproducing the same failure.

Trade-off flagged

The longer descriptive string for Key 1 is permanently lost. Runtime already showed the short text for both surfaces, so no user-visible change. The deleted CSS warning string for Key 2 should ideally get its own tuid in a separate issue (out of scope for #1546).

Related

Co-Authored by Kilo Auto using minimax-coding-plan/MiniMax-M3 with agent fix-1546-dedup.

Delete two duplicate <tu> entries in CmsUi.tmx whose tuid collided
but whose <seg> content differed. Runtime last-wins (PSTmxResourceBundle
addResourcesToCache map.put) was silently shadowing the first entries
and showing the wrong strings to users.

Deleted:
- perc.ui.content.view@Remove Shared Asset (Occ1): long descriptive
  tooltip string. Runtime already showed the short Occ2 text for both
  tooltip and dialog title; user-visible behavior unchanged.
- perc.ui.template.layout@Delete Content Of Region (Occ2): unrelated
  CSS warning that was copy-pasted onto the wrong tuid. It was
  causing the JSP checkbox label to show the wrong CSS message.

Kept:
- perc.ui.content.view@Remove Shared Asset (Occ2): 'Remove Shared Asset'
- perc.ui.template.layout@Delete Content Of Region (Occ1): 'Delete content of region.'

Net: 1634 -> 1632 <tu> entries, zero duplicates remaining.

Validation:
- python3 ET.parse('CmsUi.tmx') OK
- Duplicate scan: no duplicates
- standalone clean install of modules/perc-i18n: BUILD SUCCESS
- standalone clean install of WebUI: BUILD SUCCESS

Refs: #1546, PR #1545

> Co-Authored by Kilo Auto using minimax-coding-plan/MiniMax-M3 with agent fix-1546-dedup.
Comment thread modules/perc-i18n/src/main/resources/i18n/CmsUi.tmx Outdated
Comment thread modules/perc-i18n/src/main/resources/i18n/CmsUi.tmx Outdated
Comment thread modules/perc-i18n/src/main/resources/i18n/CmsUi.tmx Outdated
Add dedicated tuid for the region-CSS-conflict rename dialog
and re-translate the surviving 'Delete Content Of Region' key so
non-en locales match the en-us intent.

Changes:
- Add new tuid 'perc.ui.template.layout@Region CSS Settings Exist'
  in CmsUi.tmx (en-us + es + hi + fr-fr + te + de + pt) holding
  the CSS-warning copy that was previously on 'Delete Content Of
  Region' Occ2.
- Re-translate the kept 'Delete Content Of Region' Occ1 for hi,
  fr-fr, te, de, pt to match the en-us 'Delete content of region.'
  intent (was still carrying the CSS-warning copy before this PR).
- Point all three template_layout.jsp copies
  (WebUI/src/main/webapp/cm/app,
   WebUI/src/main/webapp/cm/pages/app,
   WebUI/war/app) at the new 'Region CSS Settings Exist' key for
  the lead sentence of #perc-region-edit-rename-confirm-dialog
  (line 136). The checkbox label at line 128 still uses
  'Delete Content Of Region' as the dedup PR intended.

Refs #1546

> Co-Authored by Kilo Auto using minimax-coding-plan/MiniMax-M3 with agent fix-1546-dedup.
@natechadwick

Copy link
Copy Markdown
Collaborator

@vijaya-boddipudi You have conflicts blocking the merge.

Merge latest development (6eb925e) into this branch so PR #1717
includes the recent i18n locale additions (#1727 lou + fr-us, #1726
es/hi/fr/ar/nl + RXLOCALE matrix, #1697 bn scaffolding, #1721 tmx
cleanup) and other dependency / Javadoc work that landed since this
branch was created.

Conflict resolution for modules/perc-i18n/src/main/resources/i18n/CmsUi.tmx:

  Took origin/development's version. The i18n team's 'Cleanup tmx
  files' commit (#1721) collapsed the duplicate <tu tuid=...> blocks
  that PR #1717 was supposed to dedup, so this branch's dedup
  deletion has no remaining counterpart to act on. The follow-up
  review-fix changes (added @region CSS Settings Exist tuid and
  re-translated @delete Content Of Region for non-en locales) are
  reapplied on top of this merge in a separate commit so the
  resolved CmsUi.tmx carries the correct intent rather than the
  pre-merge state.

Other affected modules (extensions-nav, perc-ant, etc.) merge
cleanly with origin/development and are committed as-is.

Refs #1546
Reapply the review-fix changes that landed in commit 9ca26d0 on
top of the merge with origin/development, since the i18n team's
'Cleanup tmx files' commit (#1721) collapsed the duplicate <tu>
blocks that this PR's dedup was targeting. The merge kept
origin/development's already-deduplicated version of CmsUi.tmx; this
commit re-adds the two follow-up changes from the review:

1. Add new tuid 'perc.ui.template.layout@Region CSS Settings Exist'
   in CmsUi.tmx with the CSS-warning copy in en-us + es + hi + fr +
   ar + bn + de + fr + it + ja-jp + nl + pt + te + zh-cn + zh-tw
   (the 14 locales that origin/development ships for this surface).
   Previously the CSS-warning copy lived only on the
   @delete Content Of Region key, leaking into the rename-confirm
   dialog in pre-dedup runtime.

2. Re-translate 'perc.ui.template.layout@Delete Content Of Region'
   so every locale matches the en-us 'Delete content of region.'
   intent. The key now reads:
     - en-us: 'Delete content of region.'
     - ar:    'حذف محتوى المنطقة.'
     - bn:    'অঞ্চলের সামগ্রী মুছুন।'
     - de:    'Inhalt der Region löschen.'
     - es:    'Eliminar contenido de la región.'
     - fr:    'Supprimer le contenu de la région.'
     - hi:    'क्षेत्र की सामग्री हटाएँ।'
     - it:    'Elimina il contenuto della regione.'
     - ja-jp: '領域の内容を削除します。'
     - nl:    'Inhoud van de regio verwijderen.'
     - pt:    'Excluir o conteúdo da região.'
     - te:    'ప్రాంతం కంటెంట్u200cను తొలగించండి.'
     - zh-cn: '删除区域内容。'
     - zh-tw: '刪除區域內容。'

The 3 template_layout.jsp files (cm/app, cm/pages/app, war/app)
were already pointing #perc-region-edit-rename-confirm-dialog at
the new key before this merge; no JSP change needed here.

Validation:
- python ET.parse(CmsUi.tmx) -> XML OK, 1633 <tu> entries, 0 dupes
- Keys present: @delete Content Of Region (1x), @region CSS
  Settings Exist (1x), @remove Shared Asset (1x), @what To Do (1x)

Refs #1546, follow-up to PR #1717 review

> Co-Authored by Kilo Auto using minimax-coding-plan/MiniMax-M3 with agent fix-1546-dedup.
@natechadwick
natechadwick enabled auto-merge (squash) August 1, 2026 13:40
@natechadwick
natechadwick disabled auto-merge August 1, 2026 19:57
@natechadwick
natechadwick merged commit 30ac925 into development Aug 1, 2026
5 checks passed
@natechadwick
natechadwick deleted the fix/1546-dedup-cmsui-tuids branch August 1, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n: manually dedup 2 CmsUi <tu> entries with differing content

3 participants