Make WordPress Core

Changeset 4545


Ignore:
Timestamp:
11/29/2006 09:34:51 PM (20 years ago)
Author:
ryan
Message:

gettext date format strings in wp_get_archives. fixes #1540

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-includes/template-functions-general.php

    r4351 r4545  
    337337                                $url    = get_month_link($arcresult->year,      $arcresult->month);
    338338                                if ( $show_post_count ) {
    339                                         $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year);
     339                                        $text = sprintf(_('%1$s %2$d'), $month[zeroise($arcresult->month,2)], $arcresult->year);
    340340                                        $after = ' ('.$arcresult->posts.')' . $afterafter;
    341341                                } else {
    342                                         $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year);
     342                                        $text = sprintf(_('%1$s %2$d'), $month[zeroise($arcresult->month,2)], $arcresult->year);
    343343                                }
    344344                                echo get_archives_link($url, $text, $format, $before, $after);
    … …  
    350350                        foreach ( $arcresults as $arcresult ) {
    351351                                $url    = get_day_link($arcresult->year, $arcresult->month, $arcresult->dayofmonth);
    352                                 $date = sprintf("%d-%02d-%02d 00:00:00", $arcresult->year, $arcresult->month, $arcresult->dayofmonth);
     352                                $date = sprintf(__('%1$d-%2$02d-%3$02d 00:00:00'), $arcresult->year, $arcresult->month, $arcresult->dayofmonth);
    353353                                $text = mysql2date($archive_day_date_format, $date);
    354354                                echo get_archives_link($url, $text, $format, $before, $after);
    … …  
    367367                                                $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
    368368                                                $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
    369                                                 $url  = sprintf('%s/%s%sm%s%s%sw%s%d', get_settings('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week);
     369                                                $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);
    370370                                                $text = $arc_week_start . $archive_week_separator . $arc_week_end;
    371371                                                echo get_archives_link($url, $text, $format, $before, $after);
  • trunk/wp-includes/general-template.php

    r4529 r4545  
    341341                        foreach ( $arcresults as $arcresult ) {
    342342                                $url    = get_month_link($arcresult->year,      $arcresult->month);
    343                                 $text = sprintf('%s %d', $wp_locale->get_month($arcresult->month), $arcresult->year);
     343                                $text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year);
    344344                                if ( $show_post_count )
    345345                                        $after = ' ('.$arcresult->posts.')' . $afterafter;
    … …  
    365365                        foreach ( $arcresults as $arcresult ) {
    366366                                $url    = get_day_link($arcresult->year, $arcresult->month, $arcresult->dayofmonth);
    367                                 $date = sprintf("%d-%02d-%02d 00:00:00", $arcresult->year, $arcresult->month, $arcresult->dayofmonth);
     367                                $date = sprintf(__('%1$d-%2$02d-%3$02d 00:00:00'), $arcresult->year, $arcresult->month, $arcresult->dayofmonth);
    368368                                $text = mysql2date($archive_day_date_format, $date);
    369369                                if ($show_post_count)
    … …  
    385385                                                $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
    386386                                                $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
    387                                                 $url  = sprintf('%s/%s%sm%s%s%sw%s%d', get_option('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week);
     387                                                $url  = sprintf(__('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d'), get_option('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week);
    388388                                                $text = $arc_week_start . $archive_week_separator . $arc_week_end;
    389389                                                if ($show_post_count)
Note: See TracChangeset for help on using the changeset viewer.