Plugin Directory

Changeset 142863


Ignore:
Timestamp:
08/04/2009 10:37:11 PM (17 years ago)
Author:
frodenas
Message:

Fix i18n dates

Location:
wp-dopplr/tags/1.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-dopplr/tags/1.6/readme.txt

    r142580 r142863  
    8888* Bug: Determine the correct wp-content directory.
    8989
    90 = Version 1.6 - 2009/08/04 =
     90= Version 1.6 - 2009/08/05 =
    9191* Bug: Determine the correct date & time.
    9292* Enhance settings and widget menu.
  • wp-dopplr/tags/1.6/wp-dopplr.php

    r142583 r142863  
    4747 * June 10 2009 - v1.5
    4848   - Bug: Determine the correct wp-content directory
    49  * August 4 2009 - v1.6
     49 * August 5 2009 - v1.6
    5050   - Bug: Determine the correct date & time
    5151   - Enhance settings and widget menu
     
    146146        $default_timezone = date_default_timezone_get();
    147147        date_default_timezone_set($traveller_info->traveller->current_city->timezone);
    148         $local_date_text = date($date_format);
     148        $local_date_text = date_i18n($date_format);
    149149        $local_time_text = date($time_format);
    150150        date_default_timezone_set($default_timezone);
    151         return $traveller_info->traveller->name . __('\'s local time at current location is ', 'wp-dopplr') . $local_time_text . __(' on ', 'wp-dopplr') . $local_date_text;               
     151        return sprintf(__('%s\'s local time is ', 'wp-dopplr'), $traveller_info->traveller->name) . $local_time_text . __(' on ', 'wp-dopplr') . $local_date_text;             
    152152    } else {
    153153        return '';
     
    205205                } else {
    206206                    $add_city = false;
    207                 }
    208             } else {
     207                }           } else {
    209208                $add_city = true;
    210209            }
     
    222221                    $default_timezone = date_default_timezone_get();
    223222                    date_default_timezone_set($trip->city->timezone);
    224                     $local_date_text = date($date_format);
     223                    $local_date_text = date_i18n($date_format);
    225224                    $local_time_text = date($time_format);
    226225                    date_default_timezone_set($default_timezone);
    227                     $city_title = ' title="' . $city_name . __(' (Local time is ', 'wp-dopplr') . $local_time_text . __(' on ', 'wp-dopplr') . $local_date_text . ')"';
     226                    $city_title = ' title="' . __('It\'s ', 'wp-dopplr') . $local_time_text . __(' on ', 'wp-dopplr') . $local_date_text . __(' in ', 'wp-dopplr') . $city_name . '"';
    228227                } else {
    229228                    $city_title = "";           
     
    231230                if ($display_start_date) {
    232231                    if ($display_finish_date) {
    233                         $trip_dates = __(' from ', 'wp-dopplr') . date($date_format, $start_date) . __(' to ', 'wp-dopplr') . date($date_format, $finish_date);
     232                        $trip_dates = __(' from ', 'wp-dopplr') . date_i18n($date_format, $start_date) . __(' to ', 'wp-dopplr') . date_i18n($date_format, $finish_date);
    234233                    } else {
    235                         $trip_dates = __(' in ', 'wp-dopplr') . date($date_format, $start_date);
     234                        $trip_dates = __(' in ', 'wp-dopplr') . date_i18n($date_format, $start_date);
    236235                    }
    237236                } elseif ($display_finish_date) {
    238                     $trip_dates = __(' until ', 'wp-dopplr') . date($date_format, $finish_date);
     237                    $trip_dates = __(' in ', 'wp-dopplr') . date_i18n($date_format, $finish_date);
    239238                } else {
    240239                    $trip_dates = '';
Note: See TracChangeset for help on using the changeset viewer.