Ticket #2757: 2757.patch
File 2757.patch, 4.5 KB (added by , 8 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
75 75 if ( empty( $this->plugin['Name'] ) ) { 76 76 $error = __( 'The plugin has no name.', 'wporg-plugins' ); 77 77 78 /* translators: 1: commentheader line, 2: Codex URL */78 /* translators: 1: plugin header line, 2: Codex URL */ 79 79 return $error . ' ' . sprintf( __( 'Add a %1$s line to your main plugin file and upload the plugin again. <a href="%2$s">Plugin Headers</a>', 'wporg-plugins' ), 80 80 '<code>Plugin Name:</code>', 81 81 __( 'https://codex.wordpress.org/File_Header', 'wporg-plugins' ) … … 87 87 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 /* translators: %s: plugin slug */ 91 return sprintf( __( 'Sorry, the plugin name %s is reserved for use by WordPress. Please change the name of your plugin and upload it again.', 'wporg-plugins' ), 92 '<code>' . $this->plugin_slug . '</code>' 90 /* translators: 1: plugin slug, 2: 'Plugin Name:' */ 91 return sprintf( __( 'Sorry, the plugin name %1%s is reserved for use by WordPress. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ), 92 '<code>' . $this->plugin_slug . '</code>', 93 '<code>Plugin Name:</code>' 93 94 ); 94 95 } 95 96 … … 97 98 98 99 // Is there already a plugin by a different author? 99 100 if ( $plugin_post && $plugin_post->post_author != get_current_user_id() ) { 100 /* translators: %s: plugin slug */ 101 return sprintf( __( 'There is already a plugin called %s by a different author. Please change the name of your plugin in the plugin header file and upload it again.', 'wporg-plugins' ), 102 '<code>' . $this->plugin_slug . '</code>' 101 /* 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' ), 103 '<code>' . $this->plugin_slug . '</code>', 104 '<code>Plugin Name:</code>' 103 105 ); 104 106 } 105 107 106 108 // Check the plugin can accept uploads (New submissions, or pending further review). 107 109 if ( $plugin_post && ! in_array( $plugin_post->post_status, array( 'new', 'pending' ) ) ) { 108 /* translators: %s: plugin slug */ 109 return sprintf( __( 'There is already a plugin called %s. Please change the name of your plugin in the plugin header file and upload it again.', 'wporg-plugins' ), 110 '<code>' . $this->plugin_slug . '</code>' 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>' 111 114 ); 112 115 } 113 116 … … 114 117 if ( ! $this->plugin['Description'] ) { 115 118 $error = __( 'The plugin has no description.', 'wporg-plugins' ); 116 119 117 /* translators: 1: commentheader line, 2: Codex URL */120 /* translators: 1: plugin header line, 2: Codex URL */ 118 121 return $error . ' ' . sprintf( __( 'Add a %1$s line to your main plugin file and upload the plugin again. <a href="%2$s">Plugin Headers</a>', 'wporg-plugins' ), 119 122 '<code>Description:</code>', 120 123 __( 'https://codex.wordpress.org/File_Header', 'wporg-plugins' ) … … 124 127 if ( ! $this->plugin['Version'] ) { 125 128 $error = __( 'The plugin has no version.', 'wporg-plugins' ); 126 129 127 /* translators: 1: commentheader line, 2: Codex URL */130 /* translators: 1: plugin header line, 2: Codex URL */ 128 131 return $error . ' ' . sprintf( __( 'Add a %1$s line to your main plugin file and upload the plugin again. <a href="%2$s">Plugin Headers</a>', 'wporg-plugins' ), 129 132 '<code>Version:</code>', 130 133 __( 'https://codex.wordpress.org/File_Header', 'wporg-plugins' ) … … 132 135 } 133 136 134 137 if ( preg_match( '|[^\d\.]|', $this->plugin['Version'] ) ) { 135 /* translators: %s: Version header*/138 /* translators: %s: 'Version:' */ 136 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' ), 137 140 '<code>Version:</code>' 138 141 );