Changeset 5471
- Timestamp:
- 05/03/2017 10:38:30 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
r5416 r5471 88 88 // Make sure it doesn't use a slug deemed not to be used by the public. 89 89 if ( $this->has_reserved_slug() ) { 90 $error = __( 'The plugin has a reserved name.', 'wporg-plugins' ); 91 90 92 /* translators: 1: plugin slug, 2: 'Plugin Name:' */ 91 return sprintf( __( 'Sorry, the plugin name %1$s isreserved for use by WordPress. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ),93 return $error . ' ' . sprintf( __( 'Your chosen plugin name - %1$s - has been reserved for use by WordPress. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ), 92 94 '<code>' . $this->plugin_slug . '</code>', 93 95 '<code>Plugin Name:</code>' … … 99 101 // Is there already a plugin with the same slug by a different author? 100 102 if ( $plugin_post && $plugin_post->post_author != get_current_user_id() ) { 103 $error = __( 'The plugin already exists.', 'wporg-plugins' ); 104 101 105 /* translators: 1: plugin slug, 2: 'Plugin Name:' */ 102 return sprintf( __( 'There is already a plugin called %1$s by a different author. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ),106 return $error . ' ' . sprintf( __( 'There is already a plugin called %1$s by a different author. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ), 103 107 '<code>' . $this->plugin_slug . '</code>', 104 108 '<code>Plugin Name:</code>' … … 108 112 // Is there already a plugin with the same slug by the same author? 109 113 if ( $plugin_post ) { 110 /* translators: 1: plugin slug, 2: 'Plugin Name:' */ 111 return sprintf( __( 'There is already a plugin called %1$s. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ), 112 '<code>' . $this->plugin_slug . '</code>', 113 '<code>Plugin Name:</code>' 114 $error = __( 'The plugin has already been submitted.', 'wporg-plugins' ); 115 116 /* translators: %s: plugin slug */ 117 return $error . ' ' . sprintf( __( 'You have already submitted a plugin called %s. Please be patient and wait for a review. If you have made a mistake, please email plugins@wordpress.org and let us know.', 'wporg-plugins' ), 118 '<code>' . $this->plugin_slug . '</code>' 114 119 ); 115 120 } … … 136 141 137 142 if ( preg_match( '|[^\d\.]|', $this->plugin['Version'] ) ) { 143 $error = __( 'The plugin has an invalid version.', 'wporg-plugins' ); 144 138 145 /* translators: %s: 'Version:' */ 139 return sprintf( __( 'Version strings can only contain numeric and period characters (like 1.2). Please fix your %s line in your main plugin file and upload the plugin again.', 'wporg-plugins' ),146 return $error . ' ' . sprintf( __( 'Version strings can only contain numeric and period characters (like 1.2). Please fix your %s line in your main plugin file and upload the plugin again.', 'wporg-plugins' ), 140 147 '<code>Version:</code>' 141 148 ); … … 144 151 // Prevent duplicate URLs. 145 152 if ( ! empty( $this->plugin['PluginURI'] ) && ! empty( $this->plugin['AuthorURI'] ) && $this->plugin['PluginURI'] == $this->plugin['AuthorURI'] ) { 146 return __( 'Duplicate plugin and author URLs. A plugin URL is a page/site that provides details about this specific plugin. An author URL is a page/site that provides information about the author of the plugin. You aren’t required to provide both, so pick the one that best applies to your URL.', 'wporg-plugins' ); 153 $error = __( 'The plugin has duplicate plugin and author URLs.', 'wporg-plugins' ); 154 155 return $error . ' ' . __( 'A plugin URL is a page/site that provides details about this specific plugin. An author URL is a page/site that provides information about the author of the plugin. You are not required to provide both, so pick the one that best applies to your URL.', 'wporg-plugins' ); 147 156 } 148 157 149 158 $readme = $this->find_readme_file(); 150 159 if ( empty( $readme ) ) { 160 $error = __( 'The plugin is missing a readme.', 'wporg-plugins' ); 161 151 162 /* translators: 1: readme.txt, 2: readme.md */ 152 return sprintf( __( 'The zip file must include a file named %1$s or %2$s.', 'wporg-plugins' ),163 return $error . ' ' . sprintf( __( 'The zip file must include a file named %1$s or %2$s.', 'wporg-plugins' ), 153 164 '<code>readme.txt</code>', 154 165 '<code>readme.md</code>' … … 158 169 159 170 // Pass it through Plugin Check and see how great this plugin really is. 171 // We're not actually using this right now 160 172 $result = $this->check_plugin(); 161 173 162 174 if ( ! $result ) { 175 $error = __( 'The plugin has failed the automated checks.', 'wporg-plugins' ); 176 163 177 /* translators: 1: Plugin Check Plugin URL, 2: make.wordpress.org/plugins */ 164 return sprintf( __( 'Your plugin has failed the plugin check.Please correct the problems with it and upload it again. You can also use the <a href="%1$s">Plugin Check Plugin</a> to test your plugin before uploading. If you have any questions about this please post them to %2$s.', 'wporg-plugins' ),178 return $error . ' ' . sprintf( __( 'Please correct the problems with it and upload it again. You can also use the <a href="%1$s">Plugin Check Plugin</a> to test your plugin before uploading. If you have any questions about this please post them to %2$s.', 'wporg-plugins' ), 165 179 '//wordpress.org/plugins/plugin-check/', 166 180 '<a href="https://make.wordpress.org/plugins">https://make.wordpress.org/plugins</a>' … … 237 251 // Success! 238 252 /* translators: 1: plugin name */ 239 return sprintf( __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. We’ve sent you an email verifying th at we’ve received it.', 'wporg-plugins' ),253 return sprintf( __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. We’ve sent you an email verifying this submission. Please make sure to whitelist our email address - plugins@wordpress.org - to ensure you receive all our communications.', 'wporg-plugins' ), 240 254 esc_html( $this->plugin['Name'] ) 241 255 ); … … 347 361 348 362 /* translators: 1: plugin name, 2: Trac ticket URL */ 349 $email_content = sprintf( __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. If your plugin is selected to be part of the directory we\'ll send a follow up email. 363 $email_content = sprintf( __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. If your plugin is selected to be part of the directory we\'ll send a follow up email. If there is a problem with your plugin submission, such as an incorrect display name or slug, please reply to this email and let us know. 350 364 351 365 --
Note: See TracChangeset
for help on using the changeset viewer.