Skip to content

fix: translation label issues found via make-pot audit#2910

Merged
Soare-Robert-Daniel merged 1 commit into
developmentfrom
fix/translation-labels
Jul 3, 2026
Merged

fix: translation label issues found via make-pot audit#2910
Soare-Robert-Daniel merged 1 commit into
developmentfrom
fix/translation-labels

Conversation

@Soare-Robert-Daniel

Copy link
Copy Markdown
Contributor

Summary

Audited the generated .pot files (wp i18n make-pot) for both otter-blocks and otter-pro domains and fixed the issues found:

  • Translator comments dropped by minification: the translators: comments for %1$s + %2$d more (visibility conditions) and Image %d alt text (alternative text) (slider) existed in source but terser dropped them when merging the surrounding statements into ternary chains, so make-pot warned about placeholder strings with no comment. Moving the comments inside the sprintf() call, directly above the __() argument, makes them survive into the production bundle.
  • Leaked attribute name as UI label: the hover box-shadow Spread control in the Button block showed the raw attribute name hoverBoxShadowSpread as its label (and sent it to translators). It also wrapped the control in AutoDisableSyncAttr with the wrong attribute (boxShadowVertical). Both now match the non-hover section.

Verification

  • Rebuilt production bundles and re-ran wp i18n make-pot for both domains: zero warnings, both strings now carry their #. translators: comment in the pot, hoverBoxShadowSpread no longer appears as a msgid.
  • msgfmt --check passes on both generated pots.

🤖 Generated with Claude Code

…attribute name label

- Move translators comments inside sprintf() calls so terser keeps them
  next to the __() call in production bundles, making wp i18n make-pot
  pick them up (%1$s + %2$d more, Image %d alt text).
- Fix hover box-shadow Spread control showing raw attribute name
  hoverBoxShadowSpread as its label and syncing the wrong attribute.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Soare-Robert-Daniel Soare-Robert-Daniel changed the base branch from master to development July 2, 2026 14:07
@pirate-bot

Copy link
Copy Markdown
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 276.77 KB 178.27 KB -98.51 KB (-35.59%)
Blocks 1.55 MB 1.53 MB -16.46 KB (-1.04%)
CSS 105.9 KB 7.87 KB -98.03 KB (-92.57%)
Dashboard 204.08 KB 111.06 KB -93.02 KB (-45.58%)
Onboarding 166.59 KB 68.14 KB -98.45 KB (-59.10%)
Export Import 102.86 KB 4.7 KB -98.16 KB (-95.43%)
Pro 412.66 KB 436.43 KB 23.77 KB (5.76%)

@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for 5f0bf05 is ready 🛎️!

@pirate-bot

Copy link
Copy Markdown
Contributor

E2E Tests

Playwright Test Status: See serial and parallel matrix jobs

Performance Results serverResponse: {"q25":249.3,"q50":254.3,"q75":271.1,"cnt":10}, firstPaint: {"q25":876.5,"q50":935.5,"q75":1070.3,"cnt":10}, domContentLoaded: {"q25":2290.2,"q50":2314.85,"q75":2366.7,"cnt":10}, loaded: {"q25":2292,"q50":2316.7,"q75":2368.5,"cnt":10}, firstContentfulPaint: {"q25":2595.1,"q50":2625,"q75":2684.6,"cnt":10}, firstBlock: {"q25":9116.9,"q50":9235.85,"q75":9253.2,"cnt":10}, type: {"q25":18.48,"q50":19.17,"q75":20.19,"cnt":10}, typeWithoutInspector: {"q25":17.33,"q50":18.55,"q75":19.19,"cnt":10}, typeWithTopToolbar: {"q25":22.48,"q50":25.38,"q75":27.01,"cnt":10}, typeContainer: {"q25":11.21,"q50":12.55,"q75":13.42,"cnt":10}, focus: {"q25":81.44,"q50":87.18,"q75":93.22,"cnt":10}, inserterOpen: {"q25":27.81,"q50":29.35,"q75":30.64,"cnt":10}, inserterSearch: {"q25":11.24,"q50":12.29,"q75":13.24,"cnt":10}, inserterHover: {"q25":4.39,"q50":4.83,"q75":5.18,"cnt":20}, loadPatterns: {"q25":1112.09,"q50":1128.94,"q75":1167.27,"cnt":10}, listViewOpen: {"q25":141.8,"q50":143.41,"q75":155.55,"cnt":10}

@Soare-Robert-Daniel Soare-Robert-Daniel merged commit ab743d2 into development Jul 3, 2026
17 of 19 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the fix/translation-labels branch July 3, 2026 08:55
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.

2 participants