Opened 7 days ago
Last modified 5 days ago
#64982 new defect (bug)
library should be changed to media library in core or needs gettext
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | I18N | Keywords: | has-patch |
| Focuses: | Cc: |
Description
library is used for media library and for Gutenberg libraries. We have a single short word in German for media library that differs.
Change History (5)
This ticket was mentioned in PR #11404 on WordPress/wordpress-develop by @sanket.parmar.
5 days ago
#3
- Keywords has-patch added; needs-patch removed
## Summary
The string "Library" was used in two unrelated contexts without translator context:
- As the Media Library submenu item in the admin menu
- As the installed fonts tab label in the Font Library page
In languages like German, these concepts use different words (Mediathek vs. Bibliothek), making a single translation impossible without disambiguation.
## Changes
wp-admin/menu.php: Changed__( 'Library' )to_x( 'Library', 'Media Library menu item' )for the Media submenu entry.wp-includes/build/routes/font-list/content.jsandcontent.min.js: Changed__("Library")to_x("Library", "Font library")for the installed-fonts tab title, aligning it with the already-correct_x()usage in the Font Library modal.
## Testing
No functional change in English. Translators can now provide distinct translations for each context via _x().
---
Trac ticket: https://core.trac.wordpress.org/ticket/64982
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