Changeset 3413
- Timestamp:
- 06/17/2016 12:52:47 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-readme-validator.php
r3383 r3413 77 77 78 78 if ( strtolower( substr( $url, - 10, 10 ) ) != 'readme.txt' ) { 79 add_settings_error( 'wporg-plugins', 'readme-validator', __( 'URL must end in <code>readme.txt</code>!', 'wporg-plugins' ) ); 79 /* Translators: File name; */ 80 add_settings_error( 'wporg-plugins', 'readme-validator', sprintf( __( 'URL must end in %s!', 'wporg-plugins' ), '<code>readme.txt</code>' ) ); 80 81 return; 81 82 } … … 99 100 // Fatal errors. 100 101 if ( empty( $readme->name ) ) { 101 add_settings_error( 'wporg-plugins', 'readme-validator', __( "Fatal Error:\nNo plugin name detected. Plugin names look like: <code>=== Plugin Name ===</code>", 'wporg-plugins' ) ); 102 /* Translators: Plugin header tag; */ 103 add_settings_error( 'wporg-plugins', 'readme-validator', sprintf( __( "Fatal Error:\nNo plugin name detected. Plugin names look like: %s", 'wporg-plugins' ), '<code>=== Plugin Name ===</code>' ) ); 102 104 return; 103 105 } … … 105 107 // Warnings. 106 108 if ( empty( $readme->requires_at_least ) ) { 107 $warnings[] = __( '<code>Requires at least</code> is missing.', 'wporg-plugins' ); 109 /* Translators: Plugin header tag; */ 110 $warnings[] = sprintf( __( '%s is missing.', 'wporg-plugins' ), '<code>Requires at least</code>' ); 108 111 } 109 112 if ( empty( $readme->tested_up_to ) ) { 110 $warnings[] = __( '<code>Tested up to</code> is missing.', 'wporg-plugins' ); 113 /* Translators: Plugin header tag; */ 114 $warnings[] = sprintf( __( '%s is missing.', 'wporg-plugins' ), '<code>Tested up to</code>' ); 111 115 } 112 116 if ( empty( $readme->stable_tag ) ) { 113 $warnings[] = __( '<code>Stable tag</code> is missing. Hint: If you treat <code>/trunk/</code> as stable, put <code>Stable tag: trunk</code>.', 'wporg-plugins' ); 117 /* Translators: 1: Plugin header tag; 2: SVN directory; 3: Plugin header tag; */ 118 $warnings[] = sprintf( __( '%1$s 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>' ); 114 119 } 115 120 if ( ! count( $readme->contributors ) ) { 116 $warnings[] = __( 'No <code>Contributors</code> listed.', 'wporg-plugins' ); 121 /* Translators: Plugin header tag; */ 122 $warnings[] = sprintf( __( 'No %s listed.', 'wporg-plugins' ), '<code>Contributors</code>' ); 117 123 } 118 124 if ( ! count( $readme->tags ) ) { 119 $warnings[] = __( 'No <code>Tags</code> specified', 'wporg-plugins' ); 125 /* Translators: Plugin header tag; */ 126 $warnings[] = sprintf( __( 'No %s specified', 'wporg-plugins' ), '<code>Tags</code>' ); 120 127 } 121 128 if ( ! empty( $readme->is_excerpt ) ) { 122 $warnings[] = __( 'No <code>== Description ==</code> section was found... your short description section will be used instead.', 'wporg-plugins' ); 129 /* Translators: Plugin header tag; */ 130 $warnings[] = sprintf( __( 'No %s section was found... your short description section will be used instead.', 'wporg-plugins' ), '<code>== Description ==</code>' ); 123 131 } 124 132 if ( ! empty( $readme->is_truncated ) ) { … … 139 147 // Notes. 140 148 if ( empty( $readme->license ) ) { 141 $notes[] = __( 'No <code>License</code> is specified. WordPress is licensed under “GPLv2 or later”', 'wporg-plugins' ); 149 /* Translators: Plugin header tag; */ 150 $notes[] = sprintf( __( 'No %s is specified. WordPress is licensed under “GPLv2 or later”', 'wporg-plugins' ), '<code>License</code>' ); 142 151 } 143 152 if ( empty( $readme->sections['installation'] ) ) { 144 $notes[] = __( 'No <code>== Installation ==</code> section was found', 'wporg-plugins' ); 153 /* Translators: Plugin header tag; */ 154 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Installation ==</code>' ); 145 155 } 146 156 if ( empty( $readme->sections['frequently_asked_questions'] ) ) { 147 $notes[] = __( 'No <code>== Frequently Asked Questions ==</code> section was found', 'wporg-plugins' ); 157 /* Translators: Plugin header tag; */ 158 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Frequently Asked Questions ==</code>' ); 148 159 } 149 160 if ( empty( $readme->sections['changelog'] ) ) { 150 $notes[] = __( 'No <code>== Changelog ==</code> section was found', 'wporg-plugins' ); 161 /* Translators: Plugin header tag; */ 162 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Changelog ==</code>' ); 151 163 } 152 164 if ( empty( $readme->upgrade_notice ) ) { 153 $notes[] = __( 'No <code>== Upgrade Notice ==</code> section was found', 'wporg-plugins' ); 165 /* Translators: Plugin header tag; */ 166 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Upgrade Notice ==</code>' ); 154 167 } 155 168 if ( empty( $readme->sections['screenshots'] ) ) { 156 $notes[] = __( 'No <code>== Screenshots ==</code> section was found', 'wporg-plugins' ); 169 /* Translators: Plugin header tag; */ 170 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Screenshots ==</code>' ); 157 171 } 158 172 if ( empty( $readme->donate_link ) ) { … … 171 185 } 172 186 173 add_settings_error( 'wporg-plugins', 'readme-validator', __( 'Your <code>readme.txt</code> rocks. Seriously. Flying colors.', 'wporg-plugins' ), 'updated' ); 187 /* Translators: File name; */ 188 add_settings_error( 'wporg-plugins', 'readme-validator', sprintf( __( 'Your %s rocks. Seriously. Flying colors.', 'wporg-plugins' ), '<code>readme.txt</code>' ), 'updated' ); 174 189 } 175 190 … … 178 193 */ 179 194 public function section_description() { 180 echo '<p>' . __( 'Enter the URL to your <code>readme.txt</code> file or paste its content below.' ) . '</p>'; 195 /* Translators: File name; */ 196 echo '<p>' . sprintf( __( 'Enter the URL to your %s file or paste its content below.' ), '<code>readme.txt</code>' ) . '</p>'; 181 197 } 182 198
Note: See TracChangeset
for help on using the changeset viewer.