WordPress.org

Make WordPress Core

#24072 closed defect (bug) (fixed)

Schedule post not have an localized version after click on ok

Reported by: rodrigo@… Owned by: 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 23 months ago.
Was uploaded to duplicate and now-deleted later ticket
24072.patch (1.3 KB) - added by SergeyBiryukov 23 months ago.
24072.2.patch (1.2 KB) - added by SergeyBiryukov 23 months ago.
24072.3.patch (1.9 KB) - added by SergeyBiryukov 23 months ago.
24072.3.before.png (4.6 KB) - added by SergeyBiryukov 23 months ago.
24072.3.after.png (4.7 KB) - added by SergeyBiryukov 23 months ago.

Download all attachments as: .zip

Change History (13)

@helen23 months ago

Was uploaded to duplicate and now-deleted later ticket

comment:1 @johnbillion23 months 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.

comment:2 @SergeyBiryukov23 months ago

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

@SergeyBiryukov23 months ago

comment:3 @rodrigo@…23 months ago

Thanks

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

Regards

comment:4 @SergeyBiryukov23 months 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

@SergeyBiryukov23 months ago

@SergeyBiryukov23 months ago

comment:5 @SergeyBiryukov23 months 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.

comment:6 @nacin23 months ago

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

comment:7 @nacin23 months 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.