Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24072 closed defect (bug) (fixed)

Schedule post not have an localized version after click on ok

Reported by: rodrigowebjumpcombr's profile rodrigo@… Owned by: nacin's profile nacin
Milestone: 3.6 Priority: normal
Severity: normal Version: 2.7
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

When you select to schedule a post, after select the date/time and click on OK, the date is displayed on fixed english format, like Publicado em: 04-abr 12, 2013 @ 21:40.

The problem is on post.js line 424. It have an translated version of publishOn text, but does not use the localized version of date. The input form have the format set on wp-admin/includes/template.php:625.

Best regards
Rodrigo Mourao
www.webjump.com.br

Attachments (6)

Captura de tela 2013-04-12 às 21.41.07.png (24.6 KB) - added by helen 11 years ago.
Was uploaded to duplicate and now-deleted later ticket
24072.patch (1.3 KB) - added by SergeyBiryukov 11 years ago.
24072.2.patch (1.2 KB) - added by SergeyBiryukov 11 years ago.
24072.3.patch (1.9 KB) - added by SergeyBiryukov 11 years ago.
24072.3.before.png (4.6 KB) - added by SergeyBiryukov 11 years ago.
24072.3.after.png (4.7 KB) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (13)

@helen
11 years ago

Was uploaded to duplicate and now-deleted later ticket

#1 @johnbillion
11 years ago

The problem here is that JavaScript's date functionality is like something out of the Stone Age. In order to be able to specify a localised format for the date output we'll need to introduce a date formatting library such as Moment.js or a complete localisation library such as jQuery's Globalize.

#2 @SergeyBiryukov
11 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.6
  • Version changed from 3.5.1 to 2.7

#3 @rodrigo@…
11 years ago

Thanks

The patch work perfect.
I only have to minify the post.js.

Regards

#4 @SergeyBiryukov
11 years ago

  • Keywords commit added

Cool, thanks for testing.

There's a constant you can add to your wp-config.php file to use unminified files for easier testing:
http://codex.wordpress.org/Debugging_in_WordPress#SCRIPT_DEBUG

#5 @SergeyBiryukov
11 years ago

Noticed a small inconsistency: the string in wp-admin/includes/template.php doesn't have a space between %1$s and %2$s.

We should move the space into the translatable string instead of forcing its placement after the month, like in 24072.patch.

24072.2.patch introduces a new (similar) string with the space.

24072.3.patch adds the space to the existing string too. 24072.3.after.png looks a bit better to me than 24072.3.before.png.

#6 @nacin
11 years ago

This is good but let's have the translator's comments match that way these strings are the same.

#7 @nacin
11 years ago

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

In 24046:

Ensure that the resulting post time is localized after the date is changed. props SergeyBiryukov. fixes #24072.

Note: See TracTickets for help on using tickets.