WordPress.org

Plugin Directory

Changeset 191619


Ignore:
Timestamp:
01/08/10 20:17:46 (4 years ago)
Author:
ruhanirabin
Message:

multi language .. and farsi translation

Location:
wp-optimize/trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-optimize/trunk/readme.txt

    r174258 r191619  
    44Tags: comments, spam, optimize, database, revisions, users, security, posts 
    55Requires at least: 2.7 
    6 Tested up to: 2.8.6 
    7 Stable tag: 0.7.1 
     6Tested up to: 2.9.1 
     7Stable tag: 0.8.0 
    88 
    99This plugin allows you to clean up your wordpress database and optimize it without phpMyAdmin. Also renames any username.  
     
    1515 
    1616Additionally you can rename any username to another username too. 
     17 
     18Now Multi-Lingual.  
     19 
     20**Translators are welcome to send their Translated Files to be included.** 
     21Contact me at http://wwww.ruhanirabin.com/contact/ 
    1722 
    1823 
     
    5964== Changelog == 
    6065 
     66= 0.8.0 
     67* Added Multilanguage capability 
     68* Added translation WP-OPTIMIZE.POT file  
     69* Farsi Translation included now (Thanks to Ali irani) 
     70 
    6171= 0.7.1 = 
    6272* POST META Table cleanup code removed cause it is making problems with many hosts 
  • wp-optimize/trunk/wp-optimize-admin.php

    r174254 r191619  
    2525 
    2626$text = ''; 
    27 $textdomain = 'wp-optimize'; 
     27//$textdomain = 'wp-optimize'; 
    2828 
    2929if (isset($_POST["clean-revisions"])) { 
     
    4545if (isset($_POST["optimize-db"])) { 
    4646    //$text .= cleanUpSystem('optimize-db'); 
    47     $text .= DB_NAME.__(" Database Optimized!<br>", $textdomain); 
     47    $text .= DB_NAME.__(" Database Optimized!<br>", 'wp-optimize'); 
    4848    } 
    4949 
     
    7777                        } */ 
    7878                         
    79             $message .= $revisions.__(' post revisions deleted<br>', $textdomain); 
     79            $message .= $revisions.__(' post revisions deleted<br>', 'wp-optimize'); 
    8080            break; 
    8181 
     
    8888            $clean = "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam';"; 
    8989            $comments = $wpdb->query( $clean ); 
    90             $message .= $comments.__(' spam comments deleted<br>', $textdomain); 
     90            $message .= $comments.__(' spam comments deleted<br>', 'wp-optimize'); 
    9191            break; 
    9292 
     
    9494            $clean = "DELETE FROM $wpdb->comments WHERE comment_approved = '0';"; 
    9595            $comments = $wpdb->query( $clean ); 
    96             $message .= $comments.__(' unapproved comments deleted<br>', $textdomain); 
     96            $message .= $comments.__(' unapproved comments deleted<br>', 'wp-optimize'); 
    9797            break; 
    9898 
     
    110110                $setlogin = $wpdb->query( $clean ); 
    111111                    if ($setlogin !== 0){ 
    112                         $message .= __('Admin username updated<br>', $textdomain); 
     112                        $message .= __('Admin username updated<br>', 'wp-optimize'); 
    113113                    } 
    114114                    else{ 
     
    117117            } 
    118118            else{ 
    119                 $message .= __('ADMIN USERNAME NOT UPDATED<br>', $textdomain); 
     119                $message .= __('ADMIN USERNAME NOT UPDATED<br>', 'wp-optimize'); 
    120120            } 
    121121            break; 
    122122 
    123123        default: 
    124             $message .= __('NO Actions Taken<br>', $textdomain); 
     124            $message .= __('NO Actions Taken<br>', 'wp-optimize'); 
    125125            break; 
    126126    } // end of switch 
     
    142142            //var_dump(!$revisions ==); 
    143143            if(!$revisions == 0 || !$revisions == NULL){ 
    144               $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$revisions.__(' post revisions in your database', $textdomain); 
     144              $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$revisions.__(' post revisions in your database', 'wp-optimize'); 
    145145            } 
    146             else $message .='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('No post revisions found', $textdomain); 
     146            else $message .='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('No post revisions found', 'wp-optimize'); 
    147147            break; 
    148148 
     
    151151            $comments = $wpdb->get_var( $sql ); 
    152152            if(!$comments == NULL || !$comments == 0){ 
    153               $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$comments.__(' spam comments found', $textdomain).' | <a href="edit-comments.php?comment_status=spam">'.__(' Review Spams</a>', $textdomain); 
     153              $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$comments.__(' spam comments found', 'wp-optimize').' | <a href="edit-comments.php?comment_status=spam">'.__(' Review Spams</a>', 'wp-optimize'); 
    154154            } else 
    155               $message .='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('No spam comments found', $textdomain); 
     155              $message .='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('No spam comments found', 'wp-optimize'); 
    156156            break; 
    157157 
     
    160160            $comments = $wpdb->get_var( $sql ); 
    161161            if(!$comments == NULL || !$comments == 0){ 
    162               $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$comments.__(' unapproved comments found', $textdomain).' | <a href="edit-comments.php?comment_status=moderated">'.__(' Review Unapproved Comments</a>', $textdomain);; 
     162              $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$comments.__(' unapproved comments found', 'wp-optimize').' | <a href="edit-comments.php?comment_status=moderated">'.__(' Review Unapproved Comments</a>', 'wp-optimize');; 
    163163            } else 
    164               $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('No unapproved comments found', $textdomain); 
     164              $message .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.__('No unapproved comments found', 'wp-optimize'); 
    165165 
    166166            break; 
    167167 
    168168        default: 
    169             $message .= __('nothing', $textdomain); 
     169            $message .= __('nothing', 'wp-optimize'); 
    170170            break; 
    171171    } // end of switch 
     
    191191  </tr> 
    192192  <tr> 
    193     <td colspan="2"><img src="<?php _e(WP_PLUGIN_URL) ?>/wp-optimize/wp-optimize.gif" border="0" alt="WP-Optimize Admin" title="WP-Optimize Admin" /></td> 
    194   </tr> 
    195   <tr> 
    196     <td><a href="#report"><?php _e('Tables Report', $textdomain); ?></a></td> 
    197     <td>&nbsp;</td> 
    198   </tr> 
    199  
    200  
    201   <tr> 
    202     <td>&nbsp;</td> 
    203     <td>&nbsp;</td> 
    204   </tr> 
    205   <tr> 
    206     <td><h3><?php _e('Database Optimization Options',$textdomain); ?></h3></td> 
     193    <td colspan="2"><img src="<?php _e(WP_PLUGIN_URL, 'wp-optimize') ?>/wp-optimize/wp-optimize.gif" border="0" alt="WP-Optimize Admin" title="WP-Optimize Admin" /></td> 
     194  </tr> 
     195  <tr> 
     196    <td><a href="#report"><?php _e('Tables Report', 'wp-optimize'); ?></a></td> 
     197    <td>&nbsp;</td> 
     198  </tr> 
     199 
     200 
     201  <tr> 
     202    <td>&nbsp;</td> 
     203    <td>&nbsp;</td> 
     204  </tr> 
     205  <tr> 
     206    <td><h3><?php _e('Database Optimization Options','wp-optimize'); ?></h3></td> 
    207207  </tr> 
    208208 
     
    210210    <td width="25%">&nbsp;</td> 
    211211    <td width="75%"><input name="clean-revisions" id="clean-revisions" type="checkbox" value="" /> 
    212      <?php _e('Remove all Post revisions', $textdomain); ?><br /> 
    213    <small><?php _e(getInfo('revisions')); ?></small></td> 
     212     <?php _e('Remove all Post revisions', 'wp-optimize'); ?><br /> 
     213   <small><?php _e(getInfo('revisions'), 'wp-optimize'); ?></small></td> 
    214214  </tr> 
    215215  <tr> 
     
    220220    <td>&nbsp;</td> 
    221221    <td><input name="clean-comments" type="checkbox" value="" /> 
    222      <?php _e('Clean marked Spam comments', $textdomain); ?><br /> 
    223    <small><?php _e(getInfo('spam')); ?></small></td> 
     222     <?php _e('Clean marked Spam comments', 'wp-optimize'); ?><br /> 
     223   <small><?php _e(getInfo('spam'), 'wp-optimize'); ?></small></td> 
    224224  </tr> 
    225225  <tr> 
     
    230230    <td>&nbsp;</td> 
    231231    <td><input name="unapproved-comments" type="checkbox" value="" /> 
    232      <?php _e('Clean Unapproved comments', $textdomain); ?><br /> 
    233    <small><?php _e(getInfo('unapproved')); ?></small></td> 
     232     <?php _e('Clean Unapproved comments', 'wp-optimize'); ?><br /> 
     233   <small><?php _e(getInfo('unapproved'), 'wp-optimize'); ?></small></td> 
    234234  </tr> 
    235235  <tr> 
     
    240240    <td>&nbsp;</td> 
    241241    <td><input name="optimize-db" type="checkbox" value="" /> 
    242      <?php _e('Optimize database tables', $textdomain); ?></td> 
     242     <?php _e('Optimize database tables', 'wp-optimize'); ?></td> 
    243243  </tr> 
    244244  <tr> 
     
    248248   
    249249  <tr> 
    250     <td><h3><?php _e('Security Tools',$textdomain); ?></h3></td> 
    251   </tr> 
    252  
    253   <tr> 
    254     <td><p align="right"><?php _e('Old username:', $textdomain); ?>&nbsp;</p></td> 
     250    <td><h3><?php _e('Security Tools', 'wp-optimize'); ?></h3></td> 
     251  </tr> 
     252 
     253  <tr> 
     254    <td><p align="right"><?php _e('Old username:', 'wp-optimize'); ?>&nbsp;</p></td> 
    255255    <td><input type="text" name="old_admin" id="old_admin" class="old_admin" size="40" value=""></td> 
    256256  </tr> 
     
    260260  </tr> 
    261261  <tr> 
    262     <td><p align="right"><?php _e('New username:', $textdomain); ?>&nbsp;</p></td> 
     262    <td><p align="right"><?php _e('New username:', 'wp-optimize'); ?>&nbsp;</p></td> 
    263263    <td><input type="text" name="new_admin" id="new_admin" class="new_admin" size="40" value=""></td> 
    264264  </tr> 
     
    269269  <tr> 
    270270    <td>&nbsp;</td> 
    271     <td><input class="button-primary" type="submit" name="wp-optimize" value="<?php _e('Process', $textdomain); ?>" /></td> 
    272   </tr> 
    273   <tr> 
    274     <td>&nbsp;</td> 
    275     <td>&nbsp;</td> 
    276   </tr> 
    277   <tr> 
    278     <td><p align="right"><?php _e('Plugin Homepage', $textdomain); ?> :&nbsp;</p></td> 
     271    <td><input class="button-primary" type="submit" name="wp-optimize" value="<?php _e('Process', 'wp-optimize'); ?>" /></td> 
     272  </tr> 
     273  <tr> 
     274    <td>&nbsp;</td> 
     275    <td>&nbsp;</td> 
     276  </tr> 
     277  <tr> 
     278    <td><p align="right"><?php _e('Plugin Homepage', 'wp-optimize'); ?> :&nbsp;</p></td> 
    279279    <td><a href="http://www.ruhanirabin.com/wp-optimize/" target="_blank">WP-Optimize</a></td> 
    280280  </tr> 
    281281  <tr> 
    282     <td><p align="right"><?php _e('RSS Feed', $textdomain); ?> :&nbsp;</p></td> 
    283     <td><a href="http://feeds2.feedburner.com/RuhaniRabin" target="_blank"><?php _e('Stay updated with RSS feed', $textdomain); ?></a> 
     282    <td><p align="right"><?php _e('RSS Feed', 'wp-optimize'); ?> :&nbsp;</p></td> 
     283    <td><a href="http://feeds2.feedburner.com/RuhaniRabin" target="_blank"><?php _e('Stay updated with RSS feed', 'wp-optimize'); ?></a> 
    284284    </td> 
    285285  </tr> 
    286286  <tr> 
    287     <td><p align="right"><?php _e('Did this helped you out', $textdomain); ?>? :&nbsp;</p></td> 
    288     <td><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2732133" target="_blank"><?php _e('Do you like to donate an amount?', $textdomain); ?></a></td> 
     287    <td><p align="right"><?php _e('Did this helped you out', 'wp-optimize'); ?>? :&nbsp;</p></td> 
     288    <td><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2732133" target="_blank"><?php _e('Do you like to donate an amount?', 'wp-optimize'); ?></a></td> 
    289289  </tr> 
    290290 
     
    305305?> 
    306306 
    307 <h3><?php _e('Database Tables Report',$textdomain); ?></h3> 
    308 <h3><?php _e('Database Name:',$textdomain); ?> '<?php _e(DB_NAME);?>'</h3> 
     307<h3><?php _e('Database Tables Report', 'wp-optimize'); ?></h3> 
     308<h3><?php _e('Database Name:', 'wp-optimize'); ?> '<?php _e(DB_NAME, 'wp-optimize');?>'</h3> 
    309309<?php if($Optimize){ 
    310310    ?> 
    311311 
    312 <p><?php _e('Optimized all the tables found in the database.',$textdomain)?></p> 
     312<p><?php _e('Optimized all the tables found in the database.', 'wp-optimize')?></p> 
    313313<?php } ?> 
    314314 
     
    318318<thead> 
    319319    <tr> 
    320     <th scope="col"><?php _e('Table',$textdomain); ?></th> 
    321     <th scope="col"><?php _e('Size',$textdomain)?></th> 
    322     <th scope="col"><?php _e('Status',$textdomain); ?></th> 
    323     <th scope="col"><?php _e('Space Save',$textdomain); ?></th> 
     320    <th scope="col"><?php _e('Table', 'wp-optimize'); ?></th> 
     321    <th scope="col"><?php _e('Size', 'wp-optimize')?></th> 
     322    <th scope="col"><?php _e('Status', 'wp-optimize'); ?></th> 
     323    <th scope="col"><?php _e('Space Save', 'wp-optimize'); ?></th> 
    324324    </tr> 
    325325</thead> 
    326326<tfoot> 
    327327    <tr> 
    328     <th scope="col"><?php _e('Table',$textdomain); ?></th> 
    329     <th scope="col"><?php _e('Size',$textdomain)?></th> 
    330     <th scope="col"><?php _e('Status',$textdomain); ?></th> 
    331     <th scope="col"><?php _e('Space Save',$textdomain); ?></th> 
     328    <th scope="col"><?php _e('Table', 'wp-optimize'); ?></th> 
     329    <th scope="col"><?php _e('Size', 'wp-optimize')?></th> 
     330    <th scope="col"><?php _e('Status', 'wp-optimize'); ?></th> 
     331    <th scope="col"><?php _e('Space Save', 'wp-optimize'); ?></th> 
    332332    </tr> 
    333333</tfoot> 
     
    363363                    <td class='column-name'>". $row[0] ."</td> 
    364364                    <td class='column-name'>". $total ." Kb"."</td> 
    365                     <td class='column-name'>" .  __('Already Optimized',$textdomain) . "</td> 
     365                    <td class='column-name'>" .  __('Already Optimized', 'wp-optimize') . "</td> 
    366366                    <td class='column-name'>0 Kb</td> 
    367367                    </tr>\n"; 
     
    372372                    <td class='column-name'>". $row[0] ."</td> 
    373373                    <td class='column-name'>". $total ." Kb"."</td> 
    374           <td class='column-name' style=\"color: #0000FF;\">" .  __('Optimized',$textdomain) . "</td> 
     374          <td class='column-name' style=\"color: #0000FF;\">" .  __('Optimized', 'wp-optimize') . "</td> 
    375375                    <td class='column-name'>". $gain ." Kb</td> 
    376376                    </tr>\n"; 
     
    380380                    <td class='column-name'>". $row[0] ."</td> 
    381381                    <td class='column-name'>". $total ." Kb"."</td> 
    382           <td class='column-name' style=\"color: #FF0000;\">" .  __('Need to Optimize',$textdomain) . "</td> 
     382          <td class='column-name' style=\"color: #FF0000;\">" .  __('Need to Optimize', 'wp-optimize') . "</td> 
    383383                    <td class='column-name'>". $gain ." Kb</td> 
    384384                    </tr>\n"; 
     
    397397<?php $total_gain = round ($total_gain,3);?> 
    398398 
    399 <h3><?php _e('Optimization Results:',$textdomain); ?></h3> 
    400 <p style="color: #0000FF;"><?php _e('Total Space Saved:',$textdomain); ?> <?php echo $total_gain?> Kb</p> 
     399<h3><?php _e('Optimization Results:', 'wp-optimize'); ?></h3> 
     400<p style="color: #0000FF;"><?php _e('Total Space Saved:', 'wp-optimize'); ?> <?php echo $total_gain?> Kb</p> 
    401401  <?php } else { ?> 
    402402<?php $total_gain = round ($total_gain,3); ?> 
    403403  <?php if(!$total_gain==0){ ?> 
    404404 
    405 <h3><?php _e('Optimization Possibility:',$textdomain); ?></h3> 
    406 <p style="color: #FF0000;"><?php _e('Total space can be saved:',$textdomain); ?> <?php echo $total_gain?> Kb</p> 
     405<h3><?php _e('Optimization Possibility:', 'wp-optimize'); ?></h3> 
     406<p style="color: #FF0000;"><?php _e('Total space can be saved:', 'wp-optimize'); ?> <?php echo $total_gain?> Kb</p> 
    407407  <?php } ?> 
    408408<?php 
  • wp-optimize/trunk/wp-optimize.php

    r174254 r191619  
    44Plugin URI: http://www.ruhanirabin.com/wp-optimize/ 
    55Description: This plugin helps you to keep your database clean by removing post revisions and spams in a blaze. allows you to rename your admin name also. Additionally it allows you to run optimize command on your wordpress core tables (use with caution). 
    6 Version: 0.7.1 
     6Version: 0.8.0 
    77Author: Ruhani Rabin 
    88Author URI: http://www.ruhanirabin.com 
    99 
    10     Copyright 2008-2009  Ruhani Rabin  (email : get@ruhanirabin.com) 
     10    Copyright 2008-2010  Ruhani Rabin  (email : get@ruhanirabin.com) 
    1111 
    1212    This program is free software; you can redistribute it and/or modify 
     
    3333register_activation_hook(__FILE__,'optimize_admin_actions'); 
    3434 
     35add_action('init', 'wpoptimize_textdomain'); 
     36function wpoptimize_textdomain() { 
     37   if (function_exists('load_plugin_textdomain')) { 
     38    #load_plugin_textdomain('si-captcha', 'wp-content/plugins/si-captcha-for-wordpress'); 
     39    load_plugin_textdomain('wp-optimize', false, 'wp-optimize'); 
     40   }         
     41} 
     42 
    3543function optimize_menu(){ 
    3644    include 'wp-optimize-admin.php'; 
    3745} 
     46 
     47 
    3848 
    3949function optimize_admin_actions() 
Note: See TracChangeset for help on using the changeset viewer.