Making WordPress.org

Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#7675 closed defect (bug) (fixed)

Lang guess: Support learn.wordpress.org

Reported by: renyot's profile renyot Owned by: renyot's profile renyot
Milestone: Priority: normal
Component: WordPress.org Site Keywords: has-patch
Cc:

Description

Currently lang guess doesn't handle the request from learn.wordpress.org, making it not able to render a language guess banner on learn sites.

Attachments (1)

2428.patch (3.4 KB) - added by renyot 3 weeks ago.

Download all attachments as: .zip

Change History (8)

@renyot
3 weeks ago

#1 @renyot
3 weeks ago

  • Keywords has-patch added
  • Owner set to renyot

This ticket was mentioned in PR #626 on WordPress/wporg-mu-plugins by @renyot.


3 weeks ago
#2

Closes https://github.com/WordPress/Learn/issues/2428

The locale information for Learn comes from the query parameter locale rather than the subdomain, so this PR retrieves the locale and sends it to lang-guess for processing.

lang-guess corresponding tweaks: meta.trac.wordpress.org/ticket/7675

#4 @Otto42
3 weeks ago

Nice patch. Does the banner show up properly?

#5 @renyot
3 weeks ago

Thanks. Yes, there are some screenshots in this PR

#6 @renyot
3 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

r22222-dotorg:

Lang guess: Support learn.wordpress.org.

See ​https://meta.trac.wordpress.org/ticket/7675

@ryelle commented on PR #626:


3 weeks ago
#7

It looks like this triggers a notice now, I'm seeing this on my local env:

Notice: Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the language-suggest-front handle. Please see Debugging in WordPress for more information.

Note: See TracTickets for help on using tickets.