Ticket #19601 (reopened task (blessed))
Support localized defaults for options, dashboard widgets, etc.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | I18N | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
A number of locales provide defaults for various aspects of core:
- Options such as rss_language, gmt_offset or default timezone, start_of_week.
- Some provide a local pinging site; others, a local oEmbed site.
- Some change the dashboard widgets to pull from a local WordPress planet or the localized news blog.
- Some modify the default Links (wp_links) to point to localized resources.
Core should maintain support for these, across all locales, acting on the advice of the translation teams. Essentially, it should work out of the box.
This may result in us pulling in locales/locales.php from GlotPress. See #19600.
Attachments
Change History
I think with [19780], we should break from ISO 8601 (not to mention Europe) and set the default start of week to Sunday, for us U.S. types. After all, we are en_US by default.
19601.diff attempts to localize gmt_offset and timezone_string.
Unfortunately, our changes back in 2.9 to always set UTC means that date('Z') / 3600 will always return 0. (Some commentary in #10940 and elsewhere.) In fairness, server time is not particularly effective for determining timezones, so I don't think it is worth a hack to store the initial timezone string before loading the bootstrap, as I first considered. (This isn't the only dead code in upgrade.php that tries in vain to get the server's offset, only to do math with a bunch of zeroes.)
We should go forward with this patch, and try to work in client detection of timezones to benefit all users, such as #10660.
- Owner set to nacin
- Status changed from new to closed
- Resolution set to fixed
In [19785]:
- Status changed from closed to reopened
- Resolution fixed deleted
Not fixed yet. Still need to look into local ping and oEmbed sites.
comment:10
nacin — 3 weeks ago
In [19786]:
comment:11
follow-up:
↓ 14
SergeyBiryukov — 3 weeks ago
Only two locales seem to have additional pinging/oEmbed sites.
bg_BG adds Vbox7.com and TopBlogLog.com:
http://i18n.trac.wordpress.org/browser/bg_BG/tags/3.2/dist/wp-content/languages/bg_BG.php
zh_CN adds Youku.com, 56.com and Tudou.com, with an option to disable:
http://i18n.trac.wordpress.org/browser/zh_CN/tags/3.3.1/dist/wp-content/languages/zh_CN.php#L292
comment:12
in reply to:
↑ 8
Mamaduka — 3 weeks ago
comment:13
nacin — 3 weeks ago
In [19788]:
comment:14
in reply to:
↑ 11
SergeyBiryukov — 3 weeks ago
Replying to SergeyBiryukov:
Only two locales seem to have additional pinging/oEmbed sites.
Now that I think of it, I'd probably add a couple of services for ru_RU as well.
comment:15
nacin — 2 weeks ago
Broke out oEmbed into #19980.
comment:16
nacin — 2 weeks ago
19601.2.diff breaks out ping_sites into a translated string.
The other option is to actually send the blog's locale to Ping-O-Matic, and maintain the local list there. I like the idea, but it's also a decent amount of work. Will see what Matt thinks.
comment:17
follow-up:
↓ 18
kenan3008 — 2 weeks ago
@nacin Strings for start_of_week and timezone_string/gmt_offset (schema.php line 359 and 373) are not in POT files for translate.wordpress.org and it is not possible to translate them at the moment. Strangely enough, they are listed in the POT file for wp.com.
comment:18
in reply to:
↑ 17
nacin — 13 days ago
Replying to kenan3008:
@nacin Strings for start_of_week and timezone_string/gmt_offset (schema.php line 359 and 373) are not in POT files for translate.wordpress.org and it is not possible to translate them at the moment. Strangely enough, they are listed in the POT file for wp.com.
Our pot generator needed a kickstart. Fixed.


In [19780]: