Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#62459 closed enhancement (fixed)

Learn WordPress link is not localized

Reported by: timse201's profile timse201 Owned by: sergeybiryukov's profile 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)

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

Download all attachments as: .zip

Change History (14)

#1 @swissspidy
2 months ago

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

#2 @im3dabasia1
2 months 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.

It might be possible that the specific phrase has not been translated yet for the locale in question.

Version 0, edited 2 months ago by im3dabasia1 (next)

@ruturajraval2305
2 months ago

Patch is here

#4 @ruturajraval2305
2 months ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in PR #7827 on WordPress/wordpress-develop by @yogeshbhutkar.


2 months 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 months 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 months ago
#7

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

Fixed "Learn WordPress" link with locale parameter.

#8 follow-up: @swissspidy
2 months 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 months ago
#9

Duplicate of #7827

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

  • Keywords needs-refresh added

Replying to swissspidy:

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

+1

#11 @sabernhardt
2 months 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 @SergeyBiryukov
2 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to 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 months ago
#13

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

Note: See TracTickets for help on using tickets.