Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#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)

62459.patch​ (468 bytes ) - added by ruturajraval2305 2 years ago.
Patch is here

Download all attachments as: .zip

Change History (14)

#1 @swissspidy
2 years ago

  • Component Administration → Toolbar
  • Keywords needs-patch good-first-bug added
  • Milestone Awaiting Review → 6.8

#2 @im3dabasia1
2 years ago

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.

Last edited 2 years ago by im3dabasia1 (previous) (diff)

#4 @ruturajraval2305
2 years ago

  • Keywords has-patch added; needs-patch removed

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 @yogeshbhutkar
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: @swissspidy
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

#10 in reply to: ↑ 8 @mukesh27
2 years ago

  • Keywords needs-refresh added

Replying to swissspidy:

I think it would be better to just wrap the URL in ()

+1

#11 @sabernhardt
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.

#12 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 59425:

Toolbar: Allow the Learn WordPress link to be localized.

The Learn WordPress website is supposed to automatically redirect to the correct locale according to the browser's language settings, however that may not work as expected in some cases.

This commit brings consistency with the other WordPress.org links, which can be localized as appropriate.

Follow-up to [56720].

Props timse201, ruturajraval2305, yogeshbhutkar, ajayghaghretiya-multidots, swissspidy, sabernhardt, im3dabasia1, mukesh27.
Fixes #62459.

​@SergeyBiryukov commented on ​PR #7827:


2 years ago
#13

Thanks for the PR! Merged a slightly different approach in r59425.

Note: See TracTickets for help on using tickets.