Ticket #3438 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Internationalization by mistake

Reported by: nbachiyski Assigned to: anonymous
Priority: low Milestone: 2.0.6
Component: Template Version: 2.0.5
Severity: minor Keywords: has-patch
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

mistaken-i18n.diff (1.5 kB) - added by nbachiyski on 12/05/06 13:30:31.

Change History

12/05/06 13:30:31 changed by nbachiyski

  • attachment mistaken-i18n.diff added.

12/05/06 13:52:50 changed by Viper007Bond

  • keywords changed from bg|has-patch bg|commit to has-patch.
  • version set to 2.0.5.
  • component changed from General to Template.
  • milestone changed from 2.1 to 2.0.6.

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

12/06/06 10:43:25 changed by markjaquith

  • status changed from new to closed.
  • resolution set to invalid.
  • milestone deleted.

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.

(in reply to: ↑ description ) 12/09/06 03:42:46 changed by yskins

  • status changed from closed to reopened.
  • resolution deleted.

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';

12/09/06 07:27:40 changed by markjaquith

  • milestone set to 2.0.6.

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

12/09/06 08:56:09 changed by ryan

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

12/10/06 00:23:12 changed by markjaquith

  • status changed from reopened to closed.
  • resolution set to fixed.

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