Ticket #4291: 4291-2.diff
| File 4291-2.diff, 5.3 KB (added by , 7 years ago) |
|---|
-
trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
64 64 // Fatal errors. 65 65 if ( empty( $readme->name ) ) { 66 66 /* translators: 1: 'Plugin Name' section title, 2: 'Plugin Name' */ 67 $errors[] = sprintf( __( ' No plugin name detected. Plugin names look like: %1$s. Please change %2$s to reflect the actual name of your plugin.', 'wporg-plugins' ), '<code>=== Plugin Name ===</code>', '<code>Plugin Name</code>' );67 $errors[] = sprintf( __( 'We cannot find a plugin name in your readme. Plugin names look like: %1$s. Please change %2$s to reflect the actual name of your plugin.', 'wporg-plugins' ), '<code>=== Plugin Name ===</code>', '<code>Plugin Name</code>' ); 68 68 } 69 69 70 70 // Warnings. … … 73 73 74 74 /* translators: 1: plugin header tag; 2: Example version 5.0. 3: Example version 4.9. */ 75 75 $warnings[] = sprintf( 76 __( 'The Requires at least field was ignored. %1$s field should only contain a valid WordPress version such as %2$s or %3$s.', 'wporg-plugins' ),76 __( 'The %1$s field was ignored. This field should only contain a valid WordPress version such as %2$s or %3$s.', 'wporg-plugins' ), 77 77 '<code>Requires at least</code>', 78 78 '<code>' . number_format( $latest_wordpress_version, 1 ) . '</code>', 79 79 '<code>' . number_format( $latest_wordpress_version - 0.1, 1 ) . '</code>' … … 80 80 ); 81 81 } elseif ( empty( $readme->requires ) ) { 82 82 /* translators: %s: plugin header tag */ 83 $warnings[] = sprintf( __( ' %s field is missing.', 'wporg-plugins' ), '<code>Requires at least</code>' );83 $warnings[] = sprintf( __( 'The %s field is missing.', 'wporg-plugins' ), '<code>Requires at least</code>' ); 84 84 } 85 85 86 86 if ( isset( $readme->warnings['tested_header_ignored'] ) ) { … … 88 88 89 89 /* translators: 1: plugin header tag; 2: Example version 5.0. 3: Example version 5.1. */ 90 90 $warnings[] = sprintf( 91 __( 'The Tested up to field was ignored. %1$s field should only contain a valid WordPress version such as %2$s or %3$s.', 'wporg-plugins' ),91 __( 'The %1$s field was ignored. This field should only contain a valid WordPress version such as %2$s or %3$s.', 'wporg-plugins' ), 92 92 '<code>Tested up to</code>', 93 93 '<code>' . number_format( $latest_wordpress_version, 1 ) . '</code>', 94 94 '<code>' . number_format( $latest_wordpress_version + 0.1, 1 ) . '</code>' … … 95 95 ); 96 96 } elseif ( empty( $readme->tested ) ) { 97 97 /* translators: %s: plugin header tag */ 98 $warnings[] = sprintf( __( ' %s field is missing.', 'wporg-plugins' ), '<code>Tested up to</code>' );98 $warnings[] = sprintf( __( 'The %s field is missing.', 'wporg-plugins' ), '<code>Tested up to</code>' ); 99 99 } 100 100 101 101 if ( isset( $readme->warnings['requires_php_header_ignored'] ) ) { 102 102 /* translators: 1: plugin header tag; 2: Example version 5.2.4. 3: Example version 7.0. */ 103 $warnings[] = sprintf( __( 'The Requires PHP field was ignored. %1$s field should only contain a PHP version such as %2$s or %3$s.', 'wporg-plugins' ), '<code>Requires PHP</code>', '<code>5.2.4</code>', '<code>7.0</code>' );103 $warnings[] = sprintf( __( 'The %1$s field was ignored. This field should only contain a PHP version such as %2$s or %3$s.', 'wporg-plugins' ), '<code>Requires PHP</code>', '<code>5.2.4</code>', '<code>7.0</code>' ); 104 104 } elseif ( empty( $readme->requires_php ) ) { 105 105 /* translators: %s: plugin header tag */ 106 $warnings[] = sprintf( __( ' %s field is missing.', 'wporg-plugins' ), '<code>Requires PHP</code>' );106 $warnings[] = sprintf( __( 'The %s field is missing.', 'wporg-plugins' ), '<code>Requires PHP</code>' ); 107 107 } 108 108 if ( empty( $readme->stable_tag ) ) { 109 109 /* translators: 1: 'Stable tag', 2: /trunk/ SVN directory, 3: 'Stable tag: trunk' */ 110 $warnings[] = sprintf( __( ' %1$s field is missing. Hint: If you treat %2$s as stable, put %3$s.', 'wporg-plugins' ), '<code>Stable tag</code>', '<code>/trunk/</code>', '<code>Stable tag: trunk</code>' );110 $warnings[] = sprintf( __( 'The %1$s field is missing. Hint: If you treat %2$s as stable, put %3$s.', 'wporg-plugins' ), '<code>Stable tag</code>', '<code>/trunk/</code>', '<code>Stable tag: trunk</code>' ); 111 111 } 112 112 113 113 if ( isset( $readme->warnings['contributor_ignored'] ) ) { 114 114 /* translators: %s: plugin header tag */ 115 $warnings[] = sprintf( __( 'One or more contributors listed were ignored. %s field should only contain WordPress.org usernames.', 'wporg-plugins' ), '<code>Contributors</code>' );115 $warnings[] = sprintf( __( 'One or more contributors listed were ignored. The %s field should only contain WordPress.org usernames. Remember that usernames are case sensitive.', 'wporg-plugins' ), '<code>Contributors</code>' ); 116 116 } elseif ( ! count( $readme->contributors ) ) { 117 117 /* translators: %s: plugin header tag */ 118 $warnings[] = sprintf( __( ' %s field is missing.', 'wporg-plugins' ), '<code>Contributors</code>' );118 $warnings[] = sprintf( __( 'The %s field is missing.', 'wporg-plugins' ), '<code>Contributors</code>' ); 119 119 } 120 120 121 121 // Notes.