WordPress.org

Plugin Directory

Changeset 395112


Ignore:
Timestamp:
06/09/11 16:17:08 (3 years ago)
Author:
GaryJ
Message:

Fixed untranslatable strings.
Fixed permissions issue for non-MS sites.
Added German language.

Location:
diagnosis/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • diagnosis/trunk/diagnosis.php

    r394525 r395112  
    9090    function menu() { 
    9191 
    92         $this->pagehook = current_theme_supports( 'diagnosis-menu' ) ? add_dashboard_page( 'Diagnosis', 'Diagnosis', 'diagnosis_read', 'diagnosis', array( &$this, 'diagnosis_page' ) ) : null; 
    93         $this->phpinfo_pagehook = current_theme_supports( 'diagnosis-phpinfo-menu' ) ? add_dashboard_page( 'PHP Info', 'PHP Info', 'diagnosis_read', 'diagnosis_phpinfo', array( &$this, 'phpinfo_page' ) ) : null; 
    94  
    95         if ( $this->pagehook || $this->phpinfo_pagehook ) 
    96             add_action( 'admin_init', array( &$this, 'init' ) ); 
    97  
    98     } 
    99  
    100     /** 
    101      * Initialise the plugin. 
    102      * 
    103      * @since 2.0.1 
    104      */ 
    105     function init() { 
    106  
    10792        // Add capability to administrator role 
    10893        $role = get_role( 'administrator' ); 
    10994        $role->add_cap( 'diagnosis_read' ); 
     95 
     96        $this->pagehook = current_theme_supports( 'diagnosis-menu' ) ? add_dashboard_page( 'Diagnosis', 'Diagnosis', 'diagnosis_read', 'diagnosis', array( &$this, 'diagnosis_page' ) ) : null; 
     97        $this->phpinfo_pagehook = current_theme_supports( 'diagnosis-phpinfo-menu' ) ? add_dashboard_page( 'PHP Info', 'PHP Info', 'diagnosis_read', 'diagnosis_phpinfo', array( &$this, 'phpinfo_page' ) ) : null; 
     98 
     99        if ( $this->pagehook || $this->phpinfo_pagehook ) 
     100            add_action( 'admin_init', array( &$this, 'init' ) ); 
     101 
     102    } 
     103 
     104    /** 
     105     * Initialise the plugin. 
     106     * 
     107     * @since 2.0.1 
     108     */ 
     109    function init() { 
    110110 
    111111        add_action( 'admin_print_styles-' . $this->pagehook, array( &$this, 'styles' ) ); 
     
    392392 
    393393    /** 
     394     * Add MySQL Character Encodings section. 
     395     * 
     396     * @since 2.0 
     397     * 
     398     * @global object $wpdb 
     399     */ 
     400    function section_mysql_encodings() { 
     401 
     402        global $wpdb; 
     403 
     404        $encodings = $wpdb->get_results( "SHOW VARIABLES LIKE 'character_set_%'" ); 
     405 
     406        foreach ( $encodings as $encoding ) { 
     407 
     408            if ( 'character_sets_dir' == $encoding->Variable_name || 'character_set_filesystem' == $encoding->Variable_name ) 
     409                continue; 
     410 
     411            switch( str_replace( 'character_set_', '', $encoding->Variable_name ) ) { 
     412                case 'client': 
     413                    $explanation = __( 'The character set in which statements are sent by the client.', $this->domain ); 
     414                    break; 
     415                case 'connection': 
     416                    $explanation = __( 'What character set the server translates a statement to after receiving it.', $this->domain ); 
     417                    break; 
     418                case 'database': 
     419                    $explanation = __( 'The character set used for databases.', $this->domain ); 
     420                    break; 
     421                case 'results': 
     422                    $explanation = __( 'What character set the server translates to before shipping result sets or error messages back to the client.', $this->domain ); 
     423                    break; 
     424                case 'server': 
     425                    $explanation = __( 'The character set used by the MySQL server itself.', $this->domain ); 
     426                    break; 
     427                case 'system': 
     428                    $explanation = __( 'The character set used by the system.', $this->domain ); 
     429                    break; 
     430                default: 
     431                    $explanation = ''; 
     432            } 
     433 
     434            $rows[] = array( 
     435                str_replace( '_', ' ', ucfirst( $encoding->Variable_name ) ), 
     436                $encoding->Value, 
     437                $explanation, 
     438                __( 'http://mirrors.dotsrc.org/mysql/doc/refman/5.0/en/charset-syntax.html', $this->domain ) 
     439            ); 
     440        } 
     441 
     442        $this->add_heading( __( 'MySQL Character Encodings', $this->domain ) ); 
     443        $this->add_table( array( __( 'Variable', $this->domain ), __( 'Encoding', $this->domain ) ), $rows ); 
     444 
     445    } 
     446 
     447    /** 
    394448     * Add MySQL Storage Engines section. 
    395449     * 
     
    414468        $this->add_heading( __( 'MySQL Storage Engines', $this->domain ) ); 
    415469        $this->add_table( array( __( 'Storage Engine', $this->domain ), __( 'Available?', $this->domain ) ), $rows ); 
    416  
    417     } 
    418  
    419     /** 
    420      * Add MySQL Character Encodings section. 
    421      * 
    422      * @since 2.0 
    423      * 
    424      * @global object $wpdb 
    425      */ 
    426     function section_mysql_encodings() { 
    427  
    428         global $wpdb; 
    429  
    430         $encodings = $wpdb->get_results( "SHOW VARIABLES LIKE 'character_set_%'" ); 
    431  
    432         foreach ( $encodings as $encoding ) { 
    433  
    434             if ( 'character_sets_dir' == $encoding->Variable_name || 'character_set_filesystem' == $encoding->Variable_name ) 
    435                 continue; 
    436  
    437             switch( str_replace( 'character_set_', '', $encoding->Variable_name ) ) { 
    438                 case 'client': 
    439                     $explanation = 'The character set in which statements are sent by the client.'; 
    440                     break; 
    441                 case 'connection': 
    442                     $explanation = 'What character set the server translates a statement to after receiving it.'; 
    443                     break; 
    444                 case 'database': 
    445                     $explanation = 'The character set used for databases.'; 
    446                     break; 
    447                 case 'results': 
    448                     $explanation = 'What character set the server translates to before shipping result sets or error messages back to the client.'; 
    449                     break; 
    450                 case 'server': 
    451                     $explanation = 'The character set used by the MySQL server itself.'; 
    452                     break; 
    453                 case 'system': 
    454                     $explanation = 'The character set used by the system.'; 
    455                     break; 
    456                 default: 
    457                     $explanation = ''; 
    458             } 
    459  
    460             $rows[] = array( 
    461                 str_replace( '_', ' ', ucfirst( $encoding->Variable_name ) ), 
    462                 $encoding->Value, 
    463                 $explanation, 
    464                 __( 'http://mirrors.dotsrc.org/mysql/doc/refman/5.0/en/charset-syntax.html', $this->domain ) 
    465             ); 
    466         } 
    467  
    468         $this->add_heading( __( 'MySQL Character Encodings', $this->domain ) ); 
    469         $this->add_table( array( __( 'Variable', $this->domain ), __( 'Encoding', $this->domain ) ), $rows ); 
    470470 
    471471    } 
     
    536536 
    537537        if ( count( $headers ) ) { 
    538             array_push( $headers, 'Explanation' ); 
     538            array_push( $headers, __( 'Explanation', $this->domain ) ); 
    539539            echo "\t" . '<thead>' . "\n\t\t" . '<tr>' . "\n"; 
    540540            foreach ( $headers as $header ) { 
     
    579579 
    580580        if ( $boolean ) 
    581             return 'Yes'; 
     581            return __( 'Yes', $this->domain ); 
    582582        elseif ( ! $boolean ) 
    583             return 'No'; 
     583            return __( 'No', $this->domain ); 
    584584        else 
    585             return 'Not set'; 
     585            return __( 'Not set', $this->domain ); 
    586586 
    587587    } 
  • diagnosis/trunk/languages/diagnosis.pot

    r392801 r395112  
    11msgid "" 
    22msgstr "" 
    3 "Project-Id-Version: Diagnosis 2.1\n" 
     3"Project-Id-Version: Diagnosis 2.1.2\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2011-06-03 17:42-0000\n" 
    6 "PO-Revision-Date: 2011-06-03 17:42-0000\n" 
     5"POT-Creation-Date: 2011-06-09 09:02-0000\n" 
     6"PO-Revision-Date: 2011-06-09 09:05-0000\n" 
    77"Last-Translator: Gary Jones <gamajo@gamajo.com>\n" 
    88"Language-Team: Gary Jones <gamajo@gamajo.com>\n" 
     
    1010"Content-Type: text/plain; charset=UTF-8\n" 
    1111"Content-Transfer-Encoding: 8bit\n" 
    12 "X-Poedit-KeywordsList: _;gettext;gettext_noop;_e;__\n" 
     12"X-Poedit-KeywordsList: _e;__;_n;_x\n" 
    1313"X-Poedit-Basepath: .\n" 
    1414"X-Poedit-Language: English\n" 
     
    367367msgstr "" 
    368368 
     369#: ../diagnosis.php:439 
     370msgid "The character set in which statements are sent by the client." 
     371msgstr "" 
     372 
     373#: ../diagnosis.php:442 
     374msgid "What character set the server translates a statement to after receiving it." 
     375msgstr "" 
     376 
     377#: ../diagnosis.php:445 
     378msgid "The character set used for databases." 
     379msgstr "" 
     380 
     381#: ../diagnosis.php:448 
     382msgid "What character set the server translates to before shipping result sets or error messages back to the client." 
     383msgstr "" 
     384 
     385#: ../diagnosis.php:451 
     386msgid "The character set used by the MySQL server itself." 
     387msgstr "" 
     388 
     389#: ../diagnosis.php:454 
     390msgid "The character set used by the system." 
     391msgstr "" 
     392 
    369393#: ../diagnosis.php:464 
    370394msgid "http://mirrors.dotsrc.org/mysql/doc/refman/5.0/en/charset-syntax.html" 
     
    387411msgstr "" 
    388412 
     413#: ../diagnosis.php:538 
     414msgid "Explanation" 
     415msgstr "" 
     416 
     417#: ../diagnosis.php:581 
     418msgid "Yes" 
     419msgstr "" 
     420 
     421#: ../diagnosis.php:583 
     422msgid "No" 
     423msgstr "" 
     424 
     425#: ../diagnosis.php:585 
     426msgid "Not set" 
     427msgstr "" 
     428 
  • diagnosis/trunk/readme.txt

    r394525 r395112  
    3434 
    3535== Changelog == 
     36 
     37= 2.1.2 = 
     38* Fixed more strings that weren't translatable. 
     39* Fixed permissions issue for non-MS sites added in 2.1 
    3640 
    3741= 2.1.1 = 
     
    7882= 2.0 = 
    7983Initial release based on original plugin: http://nlindblad.org/wordpress/diagnosis/ 
     84 
     85== Translations == 
     86* Deutsch: by [Dave @ deckerweb.de](http://deckerweb.de/material/sprachdateien/wordpress-plugins/#diagnosis) 
Note: See TracChangeset for help on using the changeset viewer.