#62459 closed enhancement (fixed)
Learn WordPress link is not localized
| Reported by: | timse201 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.8 |
| Component: | Toolbar | Version: | 6.4 |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: |
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
@
2 years ago
- Component Administration → Toolbar
- Keywords needs-patch good-first-bug added
- Milestone Awaiting Review → 6.8
#3
@
2 years 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.
2 years 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
@
2 years 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.
2 years ago
#7
Trac ticket: https://core.trac.wordpress.org/ticket/62459
Fixed "Learn WordPress" link with locale parameter.
#8
follow-up:
↓ 10
@
2 years 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:
2 years ago
#9
Duplicate of #7827
#11
@
2 years ago
- Keywords needs-refresh removed
- Type defect (bug) → enhancement
- Version → 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.
@SergeyBiryukov commented on PR #7827:
2 years ago
#13
Thanks for the PR! Merged a slightly different approach in r59425.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.