Opened 9 years ago
Closed 7 years ago
#1269 closed defect (bug) (fixed)
Theme Directory - localize update date
Reported by: | ramiy | Owned by: | coffee2code |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Theme Directory | Keywords: | has-patch |
Cc: |
Description
The "Last updated" string in theme pages needs to be localized.
See here: https://he.wordpress.org/themes/twentyfifteen/
And in the attached screenshot.
Attachments (3)
Change History (21)
#3
@
9 years ago
FWIW the patch here only applies to the Server-generated text.
On load, and when viewing a new theme, it's replaced with the localised date according to your browser through JS.
#7
in reply to:
↑ 5
;
follow-up:
↓ 9
@
9 years ago
Replying to ramiy:
@ocean90,
Crome + JS enabled
https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js#L478 should take care of the dates. meta-1269.2.patch wouldn't help you…
#8
@
9 years ago
Ok, so on chrome it loads in hebrew and after a second or two the date changes to english.
#9
in reply to:
↑ 7
@
9 years ago
Replying to ocean90:
Replying to ramiy:
@ocean90,
Crome + JS enabled
https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js#L478 should take care of the dates. meta-1269.2.patch wouldn't help you…
Dominic, The patch will help me to control the date format, I need to add a coma to the date.
#10
follow-up:
↓ 11
@
9 years ago
Again, this is a JavaScript template. That's why we let JavaScript handle the date format. Not sure why it doesn't work in your Chrome.
#11
in reply to:
↑ 10
;
follow-up:
↓ 12
@
9 years ago
Replying to ocean90:
Again, this is a JavaScript template. That's why we let JavaScript handle the date format. Not sure why it doesn't work in your Chrome.
It doesn't work for me either. It loads in Russian, but then changes to English, probably because my browser UI is set to English.
It does work if I switch the browser UI to Russian. I guess it's OK, but seems inconsistent with the plugin directory.
Also, when JavaScript is disabled, it's hardcoded to use the F j, Y
format, which is not suitable for languages with declensions (#WP11226). "Декабрь 6, 2015" is not correct Russian, "6 декабря 2015" is. That's why we generally use d.m.Y
instead of F j, Y
.
Ideally, I'd like to switch to human_time_diff()
, like we did for plugin directory in #1270. But I guess that would be tricky, because it involves either adding a field in that format to the API or performing an additional request. Recreating the function in JavaScript doesn't seem feasible either, because we need _n()
to work.
Could we at least commit meta-1269.2.patch to benefit from [WP35517] when JS is disabled? :)
#12
in reply to:
↑ 11
@
9 years ago
Replying to SergeyBiryukov:
Ideally, I'd like to switch to
human_time_diff()
, as we did for plugin directory in #1270.
I agree, we should use human time diff everywhere!
#13
@
9 years ago
I think it's more likely that we'll eliminate human time diffs in the plugin directory, since it will eventually be an API driven page just like the theme directory is.
Unless you have a localizable JS version of human time diff handy.
#14
@
9 years ago
@Otto42, the human_time_diff()
function doesn't seems like a very complicate functions.
https://core.trac.wordpress.org/browser/tags/4.4/src/wp-includes/formatting.php#L2825
If needed, we can create a JS version to return the same output.
#15
@
7 years ago
- Owner set to coffee2code
- Resolution set to fixed
- Status changed from new to closed
In 5704:
#16
@
7 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
It didn't helped... :-(
Reopening the ticket.
#17
@
7 years ago
@ramiy: What do you recommend at this point? It sounds like, as Sergey noted, that your browser UI is set to English or some other language different than the site being loaded. With JS enabled, JS will reformat the date according to the browser settings, which looks to be what is intended.
Related: #1270