WordPress.org

Making WordPress.org

Opened 3 years ago

Last modified 19 months ago

#2517 assigned defect

WordPress.org locale banner shows an empty link

Reported by: SergeyBiryukov Owned by: ocean90
Milestone: Priority: normal
Component: General Keywords:
Cc:

Description

Using Opera 43 with language preference set to English:

Accept-Language: en-US,en;q=0.8

The new Plugin Directory doesn't show the locale banner, as expected.

The WordPress.org home page shows a weird locale banner:

WordPress доступен и на вашем языке: Русский (также Tatarça, , azərbaycan dili).

<div id="lang-guess">WordPress доступен и на вашем языке: <a href="http://ru.wordpress.org/">Русский</a> (также <a href="http://tt.wordpress.org/">Tatarça</a>, <a href="http://sah.wordpress.org/"></a>, <a href="http://az.wordpress.org/">azərbaycan dili</a>).</div>

Two issues here:

  • sah.wordpress.org does not have a language name and results in an empty link.
  • Not sure why the banner is displayed for that Accept-Language header in the first place.

Attachments (1)

meta-2517.PNG (58.0 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
2 years ago

Using Opera 43 with language preference set to English

Also reproduced using the latest Chrome and Firefox versions. I thought the locale banner doesn't do any IP-based guessing, but apparently it does.

#2 follow-up: @ocean90
2 years ago

  • Owner set to ocean90
  • Status changed from new to assigned

I'm currently moving the translations of locales to translate.w.org, using the CLDR data as a base.

I thought the locale banner doesn't do any IP-based guessing, but apparently it does.

It does and has always worked like that.

#3 in reply to: ↑ 2 ; follow-up: @SergeyBiryukov
2 years ago

Replying to ocean90:

It does and has always worked like that.

Gotcha, thanks. The one in the plugin directory, however, does not, right? I'm working on moving it to a separate plugin so it could be reused for theme directory and support forums, see #1864 and #1952.

Would it also make sense to merge these two scripts (the one from the plugin directory and lang-guess-ajax.php, currently not open-sourced) into one, to avoid discrepancy in the results?

#4 in reply to: ↑ 3 @samuelsidler
2 years ago

Replying to SergeyBiryukov:

Would it also make sense to merge these two scripts (the one from the plugin directory and lang-guess-ajax.php, currently not open-sourced) into one, to avoid discrepancy in the results?

We should standardize on the open source one, over time, and incorporate any features from the closed-source one into it. Let's invest in the open source one for now, currently in use by only the new plugin directory.

This ticket was mentioned in Slack in #meta by sergey. View the logs.


2 years ago

This ticket was mentioned in Slack in #meta by sergey. View the logs.


2 years ago

#8 @obenland
19 months ago

#3435 was marked as a duplicate.

Note: See TracTickets for help on using tickets.