Opened 5 months ago
Closed 3 months ago
#64984 closed defect (bug) (fixed)
reply needs gettext
| Reported by: | timse201 | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0 |
| Component: | I18N | Version: | 7.0 |
| Severity: | normal | Keywords: | fixed-major dev-reviewed i18n-change |
| Cc: | Focuses: |
Description
reply is used as a noun and verb (button)
Change History (15)
This ticket was mentioned in PR #11406 on WordPress/wordpress-develop by @sanket.parmar.
5 months ago
#3
- Keywords has-patch added; needs-patch removed
## Summary
Fixes the ambiguous translation of the string 'Reply' used as a button/link label in comments UI. In some languages (e.g., German), "Reply" as a noun and as an imperative verb translate differently. Without a translator context, GlotPress cannot distinguish between uses, leading to mistranslations.
Replaces all __( 'Reply' ) occurrences with _x( 'Reply', 'verb' ) and adds /* translators: */ docblock comments, consistent with the existing pattern used for _x( 'Spam', 'verb' ) in the same codebase.
## Changes
src/wp-admin/includes/dashboard.php— Use_x()for Reply button in dashboard comment actions.src/wp-admin/includes/class-wp-comments-list-table.php— Use_x()for Reply button in comments list table row actions.src/wp-includes/comment-template.php— Use_x()for defaultreply_textinget_comment_reply_link().src/js/_enqueues/admin/edit-comments.js— Exposewp.i18n._xalongsidewp.i18n.__, and use_x()for both Reply button text assignments.
## Testing
- Verify the comments admin screens (
/wp-admin/edit-comments.php) still show "Reply" buttons correctly. - Verify the comment reply link renders correctly on the front end.
- Verify the dashboard Recent Comments widget still shows a "Reply" action link.
- Optionally: confirm the new
verbcontext appears in GlotPress under thewp/devproject strings for'Reply'.
---
Trac ticket: https://core.trac.wordpress.org/ticket/64984
---
## Use of AI Tools
AI assistance: Yes
Tool(s): GitHub Copilot
Model(s): Claude Sonnet 4.6
Used for: Identifying all affected locations, implementing the _x() replacements, and drafting this PR description; changes were reviewed before submission.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
5 months ago
#6
@
5 months ago
- Keywords changes-requested added; good-first-bug commit removed
Removing commit.
This needs to be also fixed on Gutenberg's side, too.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
4 months ago
#8
@
4 months ago
- Keywords commit added; changes-requested removed
As per today's bug scrub: This needs to be fixed on Gutenberg side too, but we can always commit this patch in Core, and open a GB PR in parallel.
Re-adding commit keyword.
#12
@
3 months ago
- Keywords dev-feedback fixed-major added; has-patch commit removed
- Resolution fixed
- Status closed → reopened
Reopening for backport consideration.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
To be clear, what is needed here is a context for translators, using the
_x()function.See https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#disambiguation-by-context