Skip to content

Fix untranslated error strings#500

Merged
dkotter merged 3 commits into
WordPress:developfrom
yusufhay:fix/181-i18n-error-strings-fork
May 5, 2026
Merged

Fix untranslated error strings#500
dkotter merged 3 commits into
WordPress:developfrom
yusufhay:fix/181-i18n-error-strings-fork

Conversation

@yusufhay
Copy link
Copy Markdown
Contributor

@yusufhay yusufhay commented May 3, 2026

What?

Closes #181

Fixes several untranslated user-facing error strings in image-generation and summarization flows.

Why?

Issue #181 calls for an internationalization audit across user-facing surfaces. These helper functions still contained hard-coded English error messages that can surface in the UI, which makes the plugin less ready for translation.

How?

  • wrap hard-coded image-generation error strings in __()
  • localize the invalid-response fallback in summarization
  • replace the string-interpolated prompt-generation failure with a translated sprintf() message
  • keep the patch focused on concrete user-facing error paths

Use of AI Tools

AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5
Used for: identifying likely untranslated strings and drafting the initial patch/PR text; final file changes were reviewed and committed by me.

Testing Instructions

  1. Review the changed files and confirm the new fallback error strings use the ai text domain.
  2. Verify the image-generation helpers now use translated fallback messages for invalid responses.
  3. Verify summarization now uses a translated invalid-response fallback.

Screenshots or screencast

Not applicable.

Changelog Entry

Fixed - Localize several user-facing fallback error strings in image-generation and summarization flows.

Open WordPress Playground Preview

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @codetrappers-ct.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: codetrappers-ct.

Co-authored-by: yusufhay <yusufmudagal@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@dkotter dkotter added this to the 0.9.0 milestone May 4, 2026
@dkotter
Copy link
Copy Markdown
Collaborator

dkotter commented May 4, 2026

@yusufhay Looks like there's a handful of conflicts here. Could you ensure your branch has the latest changes from develop and resolve those conflicts?

@yusufhay yusufhay force-pushed the fix/181-i18n-error-strings-fork branch from 933bf07 to 9e736d4 Compare May 4, 2026 23:28
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.16%. Comparing base (3ec6c5e) to head (f538b80).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #500      +/-   ##
=============================================
+ Coverage      69.15%   69.16%   +0.01%     
  Complexity       981      981              
=============================================
  Files             63       63              
  Lines           4649     4648       -1     
=============================================
  Hits            3215     3215              
+ Misses          1434     1433       -1     
Flag Coverage Δ
unit 69.16% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@dkotter dkotter merged commit 6d62448 into WordPress:develop May 5, 2026
18 checks passed
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.

Internationalization audit and string coverage review

3 participants