Make WordPress Core

Opened 6 weeks ago

Closed 4 days ago

#64980 closed defect (bug) (fixed)

Notes needs gettext

Reported by: timse201's profile timse201 Owned by: audrasjb's profile audrasjb
Milestone: 7.0 Priority: normal
Severity: normal Version: trunk
Component: I18N Keywords: has-patch i18n-change dev-reviewed commit fixed-major
Focuses: Cc:

Description

Notes is used for 2 different functions. Link notes and notes in the editor.

"Notiz" and "Anmerkungen" in German

Change History (13)

#2 @sabernhardt
6 weeks ago

  • Milestone changed from Awaiting Review to 7.0

I'll set this to 7.0 for now.

#3 @audrasjb
6 weeks ago

  • Keywords needs-patch added

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

This ticket was mentioned in PR #11402 on WordPress/wordpress-develop by @sanket.parmar.


6 weeks ago
#4

  • Keywords has-patch added; needs-patch removed

## Summary

Fixes a translation ambiguity where the string "Notes" is used in two distinct UI contexts with different meanings, causing conflicts for translators (e.g. German requires "Anmerkungen" for the Link Manager field vs. "Notiz" for the editor collaborative Notes feature).

## Changes

  • src/wp-admin/includes/meta-boxes.php — Replaced _e( 'Notes' ) with _ex( 'Notes', 'link manager notes field label' ) and added a /* translators: */ comment on the Notes textarea label in the Link Manager edit screen.

## Why

WordPress 6.9 introduced a collaborative "Notes" feature in the block editor. Both it and the pre-existing Link Manager "Notes" field share the same bare translation string, making it impossible for translators to supply different translations for each context. Using _ex() with a context string resolves this ambiguity per WordPress i18n best practices.

## Testing

No behavioral change — this is a translation context fix only. Verify by confirming the Link Manager edit screen still renders the "Notes" label correctly.

---

Trac ticket: https://core.trac.wordpress.org/ticket/64980

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


6 weeks ago

#6 @audrasjb
6 weeks ago

  • Keywords commit added
  • Owner set to audrasjb
  • Status changed from new to accepted

The PR looks good. Self assigning for commit.

#7 @audrasjb
6 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 62185:

I18N: Provide gettext context to disambiguate translation strings for "Notes".

"Notes" translation string is used in both the Notes features and in the Link Manager, and they can have different meaning in some Locales, like in German for example. This changeset helps disambuguating these different contexts.

Props westonruter, dmsnell, johnbillion.
Fixes #64980.

#8 @audrasjb
6 weeks ago

  • Keywords dev-feedback added; commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport.

#9 @audrasjb
6 weeks ago

Note wrong props, should have been:
Props timse201, sanketparmar.

I'm fixing this manually on the Make/Core tool.

Last edited 6 weeks ago by audrasjb (previous) (diff)

#10 @audrasjb
5 weeks ago

  • Keywords i18n-change added

#11 @desrosj
5 days ago

  • Keywords dev-reviewed commit added; dev-feedback removed

[62185] looks good for backporting.

#12 @desrosj
5 days ago

  • Keywords fixed-major added

Adding fixed-major so the ticket is properly grouped by workflow reports.

#13 @audrasjb
4 days ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 62316:

I18N: Provide gettext context to disambiguate translation strings for "Notes".

"Notes" translation string is used in both the Notes features and in the Link Manager, and they can have different meaning in some Locales, like in German for example. This changeset helps disambuguating these different contexts.

Reviewed by desrosj, audrasjb.
Merges [62185] to the 7.0 branch.
Props timse201, sanketparmar.
Fixes #64980.

Note: See TracTickets for help on using tickets.