Changeset 1564706
- Timestamp:
- 12/29/2016 11:41:01 PM (9 years ago)
- Location:
- wp-post-category-notifications/trunk
- Files:
-
- 6 added
- 4 edited
-
languages (added)
-
languages/wp-post-category-notifications.pot (added)
-
languages/wpcn-plugin-de_DE.mo (added)
-
languages/wpcn-plugin-de_DE.po (added)
-
languages/wpcn-plugin-en_EN.mo (added)
-
languages/wpcn-plugin-en_EN.po (added)
-
readme.txt (modified) (3 diffs)
-
wp-post-category-notifications.php (modified) (2 diffs)
-
wp-post-category-notifications_class.php (modified) (7 diffs)
-
wp-post-category-notifications_options.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-post-category-notifications/trunk/readme.txt
r1556888 r1564706 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 Text Domain: wpcn-plugin 10 Domain Path: /languages/ 9 11 10 12 WP Post Category Notifications is a plugin which sends category specific email notifications whenever a post is published. … … 12 14 == Description == 13 15 WP 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.15 16 For detailed informationa please visit: http://jf-weser-ems.de/wp-post-category-notifications/ 16 17 … … 29 30 == Changelog == 30 31 32 = 1.0 = 33 * Added internationalization 34 31 35 = 0.9.1 = 32 36 * Configuration: Administration and configuration site using ajax admin requests. 33 * Improved wordpress compatibly.37 * Improved wordpress 4.7 compatibly. 34 38 * Fixed some issues throwing php exceptions or warnings. 35 39 * Fixed an issue during the deactivation of the logging. -
wp-post-category-notifications/trunk/wp-post-category-notifications.php
r1556379 r1564706 4 4 Plugin URI: http://jf-weser-ems.de/wp-post-category-notifications 5 5 Description: Sends category specific email notifications whenever a post is published. 6 Version: 0.96 Version: 1.0 7 7 Author: Markus Alexander Lehmann 8 8 Author URI: http://jf-weser-ems.de/ueber-uns/fachbereiche/oeffentlichkeitsarbeit … … 20 20 add_action('wp_ajax_WPPCNotifications_clearLog', 'WPPostCategoryNotifications_clearLog'); 21 21 add_action('wp_ajax_WPPCNotifications_reloadLog', 'WPPostCategoryNotifications_reloadLog'); 22 23 function wpcn_init() { 24 $plugin_dir = basename(dirname(__FILE__)); 25 load_plugin_textdomain( 'wpcn-plugin', false, $plugin_dir . "/languages/"); 26 } 27 28 add_action('plugins_loaded', 'wpcn_init'); 22 29 23 30 function WPPostCategoryNotifications_adminMenuCall() { -
wp-post-category-notifications/trunk/wp-post-category-notifications_class.php
r1556379 r1564706 38 38 )); 39 39 }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"); 41 41 } 42 42 } … … 50 50 'note' => $note 51 51 )); 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"); 53 53 update_option('wp-post-category-notifications', serialize($this->notifications_receiver)); 54 54 return $newArrayLength; … … 60 60 61 61 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"); 63 63 64 64 $this->logOn = $status; 65 65 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"); 67 67 update_option('wp-post-category-notifications-logOn', $status); 68 68 } … … 122 122 $this->setLastPostID($post->ID); 123 123 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 ); 125 125 126 126 //built e-mail … … 138 138 </head> 139 139 <body>'. 140 "Titel: ". utf8_decode( $post->post_title ) ."<br>".141 "Veröffentlicht durch: ". get_userdata($post->post_author)->user_login ."<br>". //get author username142 "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>"; 143 143 144 144 //get the categories and link them categories … … 152 152 } 153 153 } 154 $body .= "Kategorien: ". trim($output, ' ') ."<br>";154 $body .= __( "Kategorien", 'wpcn-plugin' ). ": ". trim($output, ' ') ."<br>"; 155 155 156 156 $content = utf8_decode( apply_filters("the_content", $post->post_content) ); //get the content 157 157 $body .= "__________________<br>". 158 "Inhalt: ". $content;158 __( "Inhalt", 'wpcn-plugin' ). ": ". $content; 159 159 160 160 $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(). 162 162 "' 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' ) .": ". 164 164 "<a href=\"mailto:".get_option('admin_email')."\">".get_option('admin_email')."</a><br>". 165 165 '</body> … … 187 187 } 188 188 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"); 190 190 } 191 191 } -
wp-post-category-notifications/trunk/wp-post-category-notifications_options.php
r1556379 r1564706 67 67 68 68 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>'; 70 70 71 71 for(var i=0; i < deserialisedResponse.length ; i++){ … … 104 104 document.getElementById("wp-pcn-logLoading").style.visibility="hidden"; 105 105 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' ); ?>"; 107 107 }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' ); ?>"; 109 109 } 110 110 wpcn_reloadLog(); … … 126 126 var deserialisedResponse = JSON.parse(response); 127 127 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>'; 129 129 html += deserialisedResponse.log; 130 130 html += '</tbody>'; … … 222 222 }else{ 223 223 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>'; 225 225 } 226 226 } … … 237 237 <?php 238 238 if($pCNotifications->getLastPostID() > 0){ 239 ?><p> Letzte Benachrichtigung versendet für "<?php echo get_the_title($pCNotifications->getLastPostID()); ?>".</p><?php239 ?><p><?php echo __( 'Letzte Benachrichtigung versandt fuer', 'wpcn-plugin' ) ." '". get_the_title($pCNotifications->getLastPostID()); ?>'.</p><?php 240 240 } 241 241 ?> … … 255 255 ?>/> 256 256 <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' ); 258 258 ?></label> 259 259 </div>
Note: See TracChangeset
for help on using the changeset viewer.