Changeset 7023
- Timestamp:
- 04/04/2018 01:02:29 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
r7021 r7023 32 32 33 33 if ( strtolower( substr( $url, -10 ) ) != 'readme.txt' ) { 34 /* Translators: File name;*/34 /* translators: %s: readme.txt */ 35 35 $error = sprintf( __( 'URL must end in %s!', 'wporg-plugins' ), '<code>readme.txt</code>' ); 36 36 return array( … … 64 64 // Fatal errors. 65 65 if ( empty( $readme->name ) ) { 66 /* Translators: Plugin header tag;*/66 /* translators: %s: 'Plugin Name' section title */ 67 67 $errors[] = sprintf( __( 'No plugin name detected. Plugin names look like: %s', 'wporg-plugins' ), '<code>=== Plugin Name ===</code>' ); 68 68 } … … 70 70 // Warnings. 71 71 if ( empty( $readme->requires ) ) { 72 /* Translators: Plugin header tag;*/73 $warnings[] = sprintf( __( '%s is missing.', 'wporg-plugins' ), '<code>Requires at least</code>' );72 /* translators: %s: plugin header tag */ 73 $warnings[] = sprintf( __( '%s field is missing.', 'wporg-plugins' ), '<code>Requires at least</code>' ); 74 74 } 75 75 if ( empty( $readme->tested ) ) { 76 /* Translators: Plugin header tag;*/77 $warnings[] = sprintf( __( '%s is missing.', 'wporg-plugins' ), '<code>Tested up to</code>' );76 /* translators: %s: plugin header tag */ 77 $warnings[] = sprintf( __( '%s field is missing.', 'wporg-plugins' ), '<code>Tested up to</code>' ); 78 78 } 79 79 if ( empty( $readme->requires_php ) ) { 80 /* Translators: Plugin header tag;*/81 $warnings[] = sprintf( __( '%s is missing.', 'wporg-plugins' ), '<code>Requires PHP</code>' );80 /* translators: %s: plugin header tag */ 81 $warnings[] = sprintf( __( '%s field is missing.', 'wporg-plugins' ), '<code>Requires PHP</code>' ); 82 82 } 83 83 if ( empty( $readme->stable_tag ) ) { 84 /* Translators: 1: Plugin header tag; 2: SVN directory; 3: Plugin header tag;*/85 $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>' );84 /* translators: 1: 'Stable tag', 2: /trunk/ SVN directory, 3: 'Stable tag: trunk' */ 85 $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>' ); 86 86 } 87 87 if ( ! count( $readme->contributors ) ) { 88 /* Translators: Plugin header tag;*/89 $warnings[] = sprintf( __( ' No %s listed.', 'wporg-plugins' ), '<code>Contributors</code>' );88 /* translators: %s: plugin header tag */ 89 $warnings[] = sprintf( __( '%s field is missing.', 'wporg-plugins' ), '<code>Contributors</code>' ); 90 90 } 91 91 if ( $readme->contributor_ignored ) { 92 /* Translators: 1: Plugin header tag;*/93 $warnings[] = sprintf( __( 'One or more %1$s listed were ignored. %1$sshould only contain WordPress.org usernames.', 'wporg-plugins' ), '<code>Contributors</code>' );92 /* translators: %s: plugin header tag */ 93 $warnings[] = sprintf( __( 'One or more contributors listed were ignored. %s field should only contain WordPress.org usernames.', 'wporg-plugins' ), '<code>Contributors</code>' ); 94 94 } 95 95 96 96 // Notes. 97 97 if ( empty( $readme->sections['faq'] ) ) { 98 /* Translators: Plugin header tag;*/98 /* translators: %s: section title */ 99 99 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Frequently Asked Questions ==</code>' ); 100 100 } 101 101 if ( empty( $readme->sections['changelog'] ) ) { 102 /* Translators: Plugin header tag;*/102 /* translators: %s: section title */ 103 103 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Changelog ==</code>' ); 104 104 } 105 105 if ( empty( $readme->upgrade_notice ) ) { 106 /* Translators: Plugin header tag;*/106 /* translators: %s: section title */ 107 107 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Upgrade Notice ==</code>' ); 108 108 } 109 109 if ( empty( $readme->screenshots ) ) { 110 /* Translators: Plugin header tag;*/110 /* translators: %s: section title */ 111 111 $notes[] = sprintf( __( 'No %s section was found', 'wporg-plugins' ), '<code>== Screenshots ==</code>' ); 112 112 }
Note: See TracChangeset
for help on using the changeset viewer.