Sitelet https://github.com/dereuromark/cakephp-feedback/pull/24
Skip to content

Use plugin-specific i18n domain for translations - #24

Merged
dereuromark merged 1 commit into
masterfrom
i18n-domain
May 4, 2026
Merged

dereuromark merged 1 commit into
masterfrom
i18n-domain

Conversation

@dereuromark

Copy link
Copy Markdown
Owner

Summary

  • Convert 39 __() calls in src/ and templates/ to __d('feedback', ...). The 41 pre-existing __d('feedback', ...) calls already pointed at the right domain — the rest of the plugin now matches.
  • Refresh resources/locales/feedback.pot via bin/cake i18n extract. The POT was ~8 years stale (POT-Creation-Date 2018-01-16) and missed every string added in the admin backend since then. Went from ~25 to 56 unique msgids; also dropped per-string location comments by switching to --no-location so future regenerations stay tidy.

The existing de/, es/, nl/, sv/ language packs are intentionally left untouched — translators can run msgmerge against the refreshed POT to pull in the new msgids without losing the existing translations.

Why

Plugin strings were landing in the host app's default domain, plus the POT was so out of date that the admin UI was basically untranslatable even where the existing language packs already had relevant translations from older code paths.

Verification (local)

  • phpunit: 21 / 21
  • phpstan: no errors
  • phpcs: clean

Convert __() calls in src/ and templates/ to __d('feedback', ...) so
user-facing strings live in their own translation domain instead of leaking
into the host app's default domain. The 41 pre-existing __d('feedback', ...)
calls already pointed at the right domain — the rest of the plugin now
matches.

Also refresh resources/locales/feedback.pot via cake i18n extract. The POT
was ~8 years stale (POT-Creation-Date 2018-01-16) and missed all the strings
added in the admin backend since then. Switch to --no-location while
regenerating so future regenerations stay tidy.

Existing language files (de/, es/, nl/, sv/) are intentionally left alone —
translators can run msgmerge against the refreshed POT to pull in the new
msgids without losing existing translations.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.72%. Comparing base (0ce019d) to head (52e1bb4).

Files with missing lines Patch % Lines
src/Controller/Admin/FeedbackItemsController.php 25.00% 3 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff            @@
##             master      #24   +/-   ##
=========================================
  Coverage     77.72%   77.72%           
  Complexity      156      156           
=========================================
  Files            11       11           
  Lines           431      431           
=========================================
  Hits            335      335           
  Misses           96       96           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dereuromark
dereuromark merged commit 95c27af into master May 4, 2026
16 checks passed
@dereuromark
dereuromark deleted the i18n-domain branch May 4, 2026 02:23
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