Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#2568 closed defect (bug) (fixed)

Translate meridiem in time

Reported by: sewar's profile Sewar Owned by: ryan's profile ryan
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)

locale.php.diff (529 bytes) - added by Sewar 18 years ago.
functions.php.diff (2.9 KB) - added by Sewar 18 years ago.
wp_locale.diff (16.9 KB) - added by Sewar 18 years ago.
patch for WP_Locale class
wp_locale.3655.diff (18.2 KB) - added by Sewar 18 years ago.
match changes in [3654] and fix some errors in admin files.
admin-functions.php.diff (933 bytes) - added by Sewar 18 years ago.
Oops, I forget add admin-functions.php to patch, it contain patch for edit timestamp in post/page editing.
wp_locale.3659.diff (19.4 KB) - added by Sewar 18 years ago.
wp_locale.3664.diff (21.0 KB) - added by Sewar 18 years ago.

Download all attachments as: .zip

Change History (22)

@Sewar
18 years ago

@Sewar
18 years ago

#1 @Sewar
18 years ago

  • Keywords bg|has-patch added

#2 @abhay
18 years ago

looks good to me.
+1

#3 @davidhouse
18 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

@Sewar
18 years ago

patch for WP_Locale class

#4 @Sewar
18 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 @davidhouse
18 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 :)

#6 @ryan
18 years ago

  • Owner changed from anonymous to ryan

@Sewar
18 years ago

match changes in [3654] and fix some errors in admin files.

#7 @Sewar
18 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 @abhay
18 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.

@Sewar
18 years ago

Oops, I forget add admin-functions.php to patch, it contain patch for edit timestamp in post/page editing.

#9 @Sewar
18 years ago

  • Keywords bg|commit added

Isn't it is ready for commit?

#10 @abhay
18 years ago

  • Keywords bg|commit removed

Provide support for legacy and it is ready.

#11 @Sewar
18 years ago

  • Keywords bg|commit added; bg|needs-testing removed

abhay: Sorry, i wasn't understand your first comment, i put them back.

#12 @abhay
18 years ago

Looks great

+1 to commit.

#13 @ryan
18 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.

#14 @Sewar
18 years ago

  • Keywords bg|needs-testing added; bg|commit removed

ryan: Good idea, test the new patch and if it's ready commit it.

#15 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3676]) WP_Locale. Props Sewar. fixes #2568

Note: See TracTickets for help on using tickets.