Plugin Directory

Changeset 766815


Ignore:
Timestamp:
09/04/2013 10:13:24 AM (13 years ago)
Author:
mendezki
Message:

Adds missing translation for December

Location:
deutschdate/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • deutschdate/trunk/mp_deutschdate.php

    r752280 r766815  
    22/*
    33Plugin Name: DeutschDate
    4 Plugin URI: http://multipop.org/deutschdate
     4Plugin URI: http://wordpress.org/plugins/deutschdate/
    55Description: Automagically converts english months and days (except for the initials) to their German equivalent.
    6 Version: 1.1
     6Version: 1.2
     7Tested up to: 3.6
    78Author: Barry Ceelen
    89Author URI: http://multipop.org
     
    2526*/
    2627
    27 function multipop_de_date_replace($text) {
    28     $days_english = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ,'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Mar', 'May', 'Oct', 'January', 'February', 'March', 'May', 'June', 'July', 'August', 'October', '1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '0th');
    29     $days_dutch = array('Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So', 'Mrz', 'Mai', 'Okt', 'Januar', 'Februar', 'März', 'Mai', 'Juni', 'Juli', 'August', 'Oktober', '1.', '2.', '3.', '4.', '5.', '6.', '7.', '8.', '9.', '0.');
    30     $text = str_replace($days_english, $days_dutch, $text);
     28function deutschdate_str_replace( $text ) {
     29    $days_english = array(
     30        'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday',
     31        'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun',
     32        'Mar', 'May', 'Oct', 'Dec',
     33        'January', 'February', 'March', 'May', 'June', 'July', 'August', 'October', 'December',
     34        '1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '0th'
     35    );
     36    $days_german = array(
     37        'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag',
     38        'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So',
     39        'Mrz', 'Mai', 'Okt', 'Dez',
     40        'Januar', 'Februar', 'März', 'Mai', 'Juni', 'Juli', 'August', 'Oktober', 'Dezember',
     41        '1.', '2.', '3.', '4.', '5.', '6.', '7.', '8.', '9.', '0.'
     42    );
     43    $text = str_replace( $days_english, $days_german, $text );
    3144    return $text;
    3245}
    3346
    34 add_filter('the_time', 'multipop_de_date_replace');
    35 add_filter('the_date', 'multipop_de_date_replace');
    36 add_filter('get_the_time', 'multipop_de_date_replace');
    37 add_filter('get_the_date', 'multipop_de_date_replace');
    38 add_filter('the_modified_time', 'multipop_de_date_replace');
    39 add_filter('the_modified_date', 'multipop_de_date_replace');
    40 add_filter('get_the_modified_time', 'multipop_de_date_replace');
    41 add_filter('get_the_modified_date', 'multipop_de_date_replace');
     47add_filter( 'the_time', 'deutschdate_str_replace' );
     48add_filter( 'the_date', 'deutschdate_str_replace' );
     49add_filter( 'get_the_time', 'deutschdate_str_replace' );
     50add_filter( 'get_the_date', 'deutschdate_str_replace' );
     51add_filter( 'the_modified_time', 'deutschdate_str_replace' );
     52add_filter( 'the_modified_date', 'deutschdate_str_replace' );
     53add_filter( 'get_the_modified_time', 'deutschdate_str_replace' );
     54add_filter( 'get_the_modified_date', 'deutschdate_str_replace' );
  • deutschdate/trunk/readme.txt

    r752292 r766815  
    33Tags: german, deutsch, english, date, translate
    44Requires at least: 1.5
    5 Tested up to: 2.5
     5Tested up to: 3.6
    66Stable tag: trunk
    77
     
    3737== Changelog ==
    3838
     39* 1.2 Added missing translation for december, thanks [netigate](http://wordpress.org/support/topic/december-missing-translation)
    3940* 1.1 Added more filters as [suggested](http://wordpress.org/support/topic/plugin-broken-due-to-non-use-of-relevant-filters) by [Marco Steinbrecher](http://wordpress.org/support/profile/macsteini)
Note: See TracChangeset for help on using the changeset viewer.