Making WordPress.org

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#7675 closed defect (bug) (fixed)

Lang guess: Support learn.wordpress.org

Reported by: renyot Owned by: renyot
Priority: normal Milestone:
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 2 years ago.

Download all attachments as: .zip

Change History (8)

@renyot
2 years ago

#1 @renyot
2 years ago

  • Keywords has-patch added
  • Owner set to renyot

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


2 years 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
2 years ago

Nice patch. Does the banner show up properly?

#5 @renyot
2 years ago

Thanks. Yes, there are some screenshots in this ​PR

#6 @renyot
2 years ago

  • Resolution → fixed
  • Status assigned → closed

r22222-dotorg:

Lang guess: Support learn.wordpress.org.

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

​@ryelle commented on ​PR #626:


2 years 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.