Plugin Directory

Changeset 1564706


Ignore:
Timestamp:
12/29/2016 11:41:01 PM (9 years ago)
Author:
MAL73049
Message:

added i2n

Location:
wp-post-category-notifications/trunk
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • wp-post-category-notifications/trunk/readme.txt

    r1556888 r1564706  
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     9Text Domain: wpcn-plugin
     10Domain Path: /languages/
    911
    1012WP Post Category Notifications is a plugin which sends category specific email notifications whenever a post is published.
     
    1214== Description ==
    1315WP Post Category Notifications is a plugin which sends category specific email notifications whenever a post is published.
    14 This plugin actually provides  no localisation or internationalisation. The displayed language will be German. The 1.0 version of the plugin will provide internationalisation.
    1516For detailed informationa please visit: http://jf-weser-ems.de/wp-post-category-notifications/
    1617
     
    2930== Changelog ==
    3031
     32= 1.0 =
     33* Added internationalization
     34
    3135= 0.9.1 =
    3236* Configuration: Administration and configuration site using ajax admin requests.
    33 * Improved wordpress compatibly.
     37* Improved wordpress 4.7 compatibly.
    3438* Fixed some issues throwing php exceptions or warnings.
    3539* Fixed an issue during the deactivation of the logging.
  • wp-post-category-notifications/trunk/wp-post-category-notifications.php

    r1556379 r1564706  
    44Plugin URI: http://jf-weser-ems.de/wp-post-category-notifications
    55Description: Sends category specific email notifications whenever a post is published.
    6 Version: 0.9
     6Version: 1.0
    77Author: Markus Alexander Lehmann
    88Author URI: http://jf-weser-ems.de/ueber-uns/fachbereiche/oeffentlichkeitsarbeit
     
    2020add_action('wp_ajax_WPPCNotifications_clearLog', 'WPPostCategoryNotifications_clearLog');
    2121add_action('wp_ajax_WPPCNotifications_reloadLog', 'WPPostCategoryNotifications_reloadLog');
     22
     23function wpcn_init() {
     24 $plugin_dir = basename(dirname(__FILE__));
     25 load_plugin_textdomain( 'wpcn-plugin', false, $plugin_dir . "/languages/");
     26}
     27
     28add_action('plugins_loaded', 'wpcn_init');
    2229
    2330function WPPostCategoryNotifications_adminMenuCall() {
  • wp-post-category-notifications/trunk/wp-post-category-notifications_class.php

    r1556379 r1564706  
    3838                            ));
    3939            }else{         
    40                 $this->log_write("Notification deleted for ". $elements['email'] ." : ". get_cat_name($elements['category']) .".", "blue");
     40                $this->log_write( __( 'Benachrichtigung geloescht fuer', 'wpcn-plugin' ) ." ". $elements['email'] ." : ". get_cat_name($elements['category']) .".", "blue");
    4141            }
    4242        }
     
    5050                            'note' => $note
    5151                            ));
    52         $this->log_write("Notification added for ". $email ." : ". get_cat_name($category) .".", "blue");
     52        $this->log_write(__( 'Benachrichtigung hinzugefuegt fuer', 'wpcn-plugin' ) ." ". $email ." : ". get_cat_name($category) .".", "blue");
    5353        update_option('wp-post-category-notifications', serialize($this->notifications_receiver));
    5454        return $newArrayLength;
     
    6060   
    6161    function setLogOn($status){
    62         $this->log_write(strcmp($status, "true") == 0 ? "Log is on.": "Log is off.", "red");
     62        $this->log_write(strcmp($status, "true") == 0 ? __( "Logging eingeschaltet.", 'wpcn-plugin' ) : __( "Logging ausgeschaltet.", 'wpcn-plugin' ), "red");
    6363       
    6464        $this->logOn = $status;
    6565       
    66         $this->log_write(strcmp($status, "true") == 0 ? "Log is on.": "Log is off.", "red");
     66        $this->log_write(strcmp($status, "true") == 0 ? __( "Logging eingeschaltet.", 'wpcn-plugin' ) : __( "Logging ausgeschaltet.", 'wpcn-plugin' ), "red");
    6767        update_option('wp-post-category-notifications-logOn', $status);
    6868    }
     
    122122                $this->setLastPostID($post->ID);
    123123               
    124                 $subject = utf8_decode( "Neuer Beitrag auf ".get_site_url().": ".$post->post_title );
     124                $subject = utf8_decode( __( "Neuer Beitrag auf", 'wpcn-plugin' ) ." ".get_site_url().": ".$post->post_title );
    125125               
    126126                //built e-mail
     
    138138                        </head>
    139139                        <body>'.
    140                         "Titel: ". utf8_decode( $post->post_title ) ."<br>".
    141                         "Veröffentlicht durch: ". get_userdata($post->post_author)->user_login ."<br>". //get author username
    142                         "Veröffentlicht am: ". $post->post_date ."<br>";
     140                        __( "Titel", 'wpcn-plugin' ). ": ". utf8_decode( $post->post_title ) ."<br>".
     141                        __( "Veroeffentlicht durch", 'wpcn-plugin' ) .": ". get_userdata($post->post_author)->user_login ."<br>". //get author username
     142                        __( "Veroeffentlicht am", 'wpcn-plugin' ) .": ". $post->post_date ."<br>";
    143143                       
    144144                //get the categories and link them categories
     
    152152                    }
    153153                }
    154                 $body .= "Kategorien: ". trim($output, ' ') ."<br>";
     154                $body .= __( "Kategorien", 'wpcn-plugin' ). ": ". trim($output, ' ') ."<br>";
    155155                       
    156156                $content = utf8_decode( apply_filters("the_content", $post->post_content) );  //get the content
    157157                $body .= "__________________<br>".
    158                         "Inhalt: ". $content;
     158                        __( "Inhalt", 'wpcn-plugin' ). ": ". $content;
    159159                       
    160160                $body .= "<br>__________________<br>".
    161                         "Dies ist eine automatisierte Benachrichtigung von <a href='".get_site_url().
     161                        __( "Dies ist eine automatisierte Benachrichtigung von", 'wpcn-plugin' ). " <a href='".get_site_url().
    162162                        "' title='".get_option('blogname'). "'>".get_option('blogname'). "</a>.<br>".
    163                         "Falls Sie keine weiteren Benachritigungen erhalten möchten, wenden Sie sich bitte an einen Administrator: ".
     163                        __( "Falls Sie keine weiteren Benachrichtigung erhalten möchten, wenden Sie sich bitte an einen Administrator", 'wpcn-plugin' ) .": ".
    164164                        "<a href=\"mailto:".get_option('admin_email')."\">".get_option('admin_email')."</a><br>".
    165165                        '</body>
     
    187187                }
    188188                if(sizeof($mailto) > 0 && $this->logOn){
    189                     $this->log_write("E-Mail ".$subject." ID: ". $post_ID ." send to: ". implode("','",$mailto), "green");
     189                    $this->log_write(__( "E-Mail", 'wpcn-plugin' )." ".$subject." ID: ". $post_ID ." ".__( "gesendet an", 'wpcn-plugin' ).": ". implode("','",$mailto), "green");
    190190                }
    191191            }
  • wp-post-category-notifications/trunk/wp-post-category-notifications_options.php

    r1556379 r1564706  
    6767           
    6868           
    69             var html = '<tbody><tr><th>Kategorie</th><th>E-Mail</th><th>Notizen</th><th></th></tr>';
     69            var html = '<tbody><tr><th><?php echo __( 'Kategorie', 'wpcn-plugin' ); ?></th><th><?php echo __( 'E-Mail', 'wpcn-plugin' ); ?></th><th><?php echo __( 'Notizen', 'wpcn-plugin' ); ?></th><th></th></tr>';
    7070           
    7171            for(var i=0; i < deserialisedResponse.length ; i++){
     
    104104            document.getElementById("wp-pcn-logLoading").style.visibility="hidden";
    105105            if(deserialisedResponse.log_on == "true"){
    106                 document.getElementById("wp-pcn-LogOnOff-label").innerHTML = "Log On";
     106                document.getElementById("wp-pcn-LogOnOff-label").innerHTML = "<?php echo __( 'Log On', 'wpcn-plugin' ); ?>";
    107107            }else{
    108                 document.getElementById("wp-pcn-LogOnOff-label").innerHTML = "Log Off";
     108                document.getElementById("wp-pcn-LogOnOff-label").innerHTML = "<?php echo __( 'Log Off', 'wpcn-plugin' ); ?>";
    109109            }
    110110            wpcn_reloadLog();
     
    126126            var deserialisedResponse = JSON.parse(response);
    127127               
    128             var html = '<tbody><tr><th>Datum, Uhrzeit</th><th>Bemerkung</th></tr>';
     128            var html = '<tbody><tr><th><?php echo __( 'Datum Uhrzeit', 'wpcn-plugin' ); ?></th><th><?php echo __( 'Bemerkung', 'wpcn-plugin' ); ?></th></tr>';
    129129            html += deserialisedResponse.log;
    130130            html += '</tbody>';
     
    222222    }else{
    223223        if( empty($_POST["email"])){
    224             echo '<p align="center" style="color:red;">Bitte geben Sie eine gültige E-Mail Adresse an.</p>';
     224            echo '<p align="center" style="color:red;">'. __( 'Bitte geben Sie eine gueltige E-Mail Adresse an.', 'wpcn-plugin' ) .'</p>';
    225225        }
    226226    }
     
    237237<?php
    238238if($pCNotifications->getLastPostID() > 0){
    239     ?><p>Letzte Benachrichtigung versendet für "<?php echo get_the_title($pCNotifications->getLastPostID()); ?>".</p><?php
     239    ?><p><?php echo __( 'Letzte Benachrichtigung versandt fuer', 'wpcn-plugin' ) ." '". get_the_title($pCNotifications->getLastPostID()); ?>'.</p><?php
    240240}
    241241?>
     
    255255    ?>/>
    256256    <label id="wp-pcn-LogOnOff-label" for="wp-pcn-LogOnOff"><?php
    257     echo strcmp($pCNotifications->getLogOn(), "true") == 0 ? "Log On": "Log Off";
     257    echo strcmp($pCNotifications->getLogOn(), "true") == 0 ? __( 'Log On', 'wpcn-plugin' ) : __( 'Log Off', 'wpcn-plugin' );
    258258    ?></label>
    259259</div>
Note: See TracChangeset for help on using the changeset viewer.