Opened 19 years ago
Closed 19 years ago
#2568 closed defect (bug) (fixed)
Translate meridiem in time
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.0.2 |
Component: | General | Keywords: | bg|has-patch bg|needs-testing |
Focuses: | Cc: |
Description
This patches Translate meridiem in time.
I don't know if meridiem is good word for this thing, I just copied it from PHP's manual: date() function.
Attachments (7)
Change History (22)
#3
@
19 years ago
We could really do with wrapping all these localisation globals up into one associative array or class global. So e.g. instead of doing
global $meridiem, $weekday; ... $meridiem ... $weekday
we'd do
$global $wp_i10n; ... $wp_i10n->meridiem ... $wp_i10n->weekday
#4
@
19 years ago
- Keywords bg|needs testing added
davidhouse: Good idea, i've create new patch.
Please test the new patch especially functions in "wp-includes/template-functions-general.php" because i haven't test most of them.
#5
@
19 years ago
- Keywords bg|needs-testing added; bg|needs testing removed
Wow, great job. I'll check it out. People should test this because I'm an english speaker and so am not too great at checking that localisation functions work :)
#7
@
19 years ago
davidhouse: I hope someone post it to wp-hackers and/or wp-polyglots mail lists.
wp_locale.3654.diff is updated version to match changes in [3654] and fix some errors in admin files.
#8
@
19 years ago
Your patch looks great except for the fact that you removed the legacy variables. Put them back in and I think we're good to go.
Great job.
@
19 years ago
Oops, I forget add admin-functions.php to patch, it contain patch for edit timestamp in post/page editing.
#11
@
19 years ago
- Keywords bg|commit added; bg|needs-testing removed
abhay: Sorry, i wasn't understand your first comment, i put them back.
#13
@
19 years ago
We could take it a step further and replace this:
$wp_locale->month[zeroise($arc_month, 2)]
with this:
$wp_locale->get_month($arc_month);
get_month() should handle doing the zeroise and fetching from the month array. Similarly for the rest of the locale data.
looks good to me.
+1