Opened 8 years ago
Last modified 7 years ago
#2517 assigned defect (bug)
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)
Change History (9)
#2
follow-up:
↓ 3
@
8 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:
↓ 4
@
8 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
@
8 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.
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.