Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#3438 closed defect (bug) (fixed)

Internationalization by mistake

Reported by: nbachiyski's profile nbachiyski Owned by:
Milestone: 2.0.6 Priority: low
Severity: minor Version: 2.0.5
Component: Template Keywords: has-patch
Focuses: Cc:

Description

In [4545] there are some strings that shouldn't have been i18ned:

$url  = sprintf(__('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d'), get_settings('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week); 

and

date = sprintf(__('%1$d-%2$02d-%3$02d 00:00:00'), $arcresult->year, $arcresult->month, $arcresult->dayofmonth); 
$text = mysql2date($archive_day_date_format, $date); 

Attachments (1)

mistaken-i18n.diff (1.5 KB) - added by nbachiyski 17 years ago.

Download all attachments as: .zip

Change History (7)

#1 @Viper007Bond
17 years ago

  • Component changed from General to Template
  • Keywords has-patch added; bg|has-patch bg|commit removed
  • Milestone changed from 2.1 to 2.0.6
  • Version set to 2.0.5

Uh, why shouldn't they be? You don't want to be able to change the arrangement of the output for different languages?

#2 @markjaquith
17 years ago

  • Milestone 2.0.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Think European style dates vs. American style dates vs. International style dates. For that, you need to be able to control the order of the elements.

#3 in reply to: ↑ description @yskins
17 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

I think nbachiyski is right.

$url  = sprintf(__('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d'), get_settings('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week); 

The url will like "http://example.com/?m=2006&w=52".

$date = sprintf(__('%1$d-%2$02d-%3$02d 00:00:00'), $arcresult->year, $arcresult->month, $arcresult->dayofmonth); 
$text = mysql2date($archive_day_date_format, $date); 

$date will like "2006-12-01 00:00:00". $date must use mysql style date formatting because it will be used in mysql2date function.

These two strings shouldn't be i18ned.

Uh, the strings which should be i18ned are:

// options for daily archive (only if you over-ride the general date format)
$archive_day_date_format = 'Y/m/d';

// options for weekly archive (only if you over-ride the general date format)
$archive_week_start_date_format = 'Y/m/d';
$archive_week_end_date_format	= 'Y/m/d';

#4 @markjaquith
17 years ago

  • Milestone set to 2.0.6

Ooh, I see what you mean. Ryan, you put in [4545], so your call on the revert.

#5 @ryan
17 years ago

Sure, revert those bits. I was a bit too thorough. :-)

#6 @markjaquith
17 years ago

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

(In [4636]) Revert overzealous i18n from [4545]. Props nbachiyski. fixes #3438

Note: See TracTickets for help on using tickets.