#62459 closed enhancement (fixed)
Learn WordPress link is not localized
Reported by: | timse201 | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 6.4 |
Component: | Toolbar | Keywords: | good-first-bug has-patch |
Focuses: | Cc: |
Description
The Learn WordPress link in the admin bar dropdown menu is not localized. It appears when you hover over the WordPress icon.
https://learn.wordpress.org/
should be for example
https://learn.wordpress.org/?locale=de_DE
Attachments (1)
Change History (14)
#1
@
13 days ago
- Component changed from Administration to Toolbar
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 6.8
#3
@
13 days ago
@im3dabasia1
Thanks for reply.
I refer to this hardcoded link: https://github.com/WordPress/wordpress-develop/blob/91eb2517bed7d2e9668eda228a83f4db511f19d0/src/wp-includes/admin-bar.php#L208
WordPress sites add the locale tag automatically:
https://github.com/WordPress/wporg-mu-plugins/blob/adbb5626ff3840852663f8406baba68703a61b6a/mu-plugins/blocks/global-header-footer/blocks.php#L913
This ticket was mentioned in PR #7827 on WordPress/wordpress-develop by @yogeshbhutkar.
13 days ago
#5
This PR introduces adding locale parameter to the Learn WordPress link.
Trac ticket: [](https://core.trac.wordpress.org/ticket/62459)
Screencast of the changes:
#6
@
13 days ago
Hi @timse201,
Thank you for raising this ticket and pointing out the issue.
Great observation! The link was indeed missing the locale parameter. I’ve submitted a PR to address this issue.
This ticket was mentioned in PR #7828 on WordPress/wordpress-develop by ajayghaghretiya-multidots.
13 days ago
#7
Trac ticket: https://core.trac.wordpress.org/ticket/62459
Fixed "Learn WordPress" link with locale parameter.
#8
follow-up:
↓ 10
@
12 days ago
I think it would be better to just wrap the URL in ()
This way, every locale can correctly translate the URL so it works best for them. For example de_DE_formal may want to use ?locale=de_DE instead
@mukesh27 commented on PR #7828:
12 days ago
#9
Duplicate of #7827
#11
@
12 days ago
- Keywords needs-refresh removed
- Type changed from defect (bug) to enhancement
- Version set to 6.4
62459.patch already wraps the URL in the __()
function, so that would not require a refreshed patch.
@audrasjb noted in ticket:58820#comment:9 that Learn WP automatically redirects according to the browser's language (at least with French). A localized URL might help if that ever changes.
#12
@
12 days ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 59425:
@SergeyBiryukov commented on PR #7827:
11 days ago
#13
Thanks for the PR! Merged a slightly different approach in r59425.
Hello @timse201 ,
Thank you for raising this issue. Upon reviewing, it seems there is no problem with the translation in this case.
Based on the code reference provided , the 'Learn WordPress' is already using translation ready function. I also checked other locales such as hi_IN, fr_FR, and the translations appear to be working well.