diff --git a/assets/css/admin.css b/assets/css/admin.css index addb69e..9b31653 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -207,4 +207,9 @@ .retry-btn:hover { background: #005a87; +} + +.upload.button { + margin-left: 10px; + vertical-align: top; } \ No newline at end of file diff --git a/assets/js/admin.js b/assets/js/admin.js index 7d91f30..d52ae5d 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -1,6 +1,16 @@ jQuery(document).ready(function($) { const $results = $('#installation-results'); + // Handle URL parameter for tab selection + const urlParams = new URLSearchParams(window.location.search); + const tab = urlParams.get('tab'); + if (tab) { + $('.bpi-tab').removeClass('active'); + $('.bpi-tab[data-tab="' + tab + '"]').addClass('active'); + $('.bpi-tab-content').removeClass('active').hide(); + $('#' + tab).addClass('active').show(); + } + $('.bpi-tab').on('click', function() { $('.bpi-tab').removeClass('active'); $(this).addClass('active'); @@ -92,7 +102,7 @@ jQuery(document).ready(function($) { const $fileInput = $form.find('input[type="file"]'); const files = $fileInput[0].files; if (!files || files.length === 0) { - errorMessage = 'Please select at least one ZIP file.'; + errorMessage = bpiAjax.i18n.no_files; } else { items = Array.from(files).map(file => file.name); } @@ -103,8 +113,8 @@ jQuery(document).ready(function($) { .filter(item => item.length > 0); if (items.length === 0) { errorMessage = (type === 'repository' || type === 'wenpai') ? - 'Please enter at least one slug.' : - 'Please enter at least one URL.'; + bpiAjax.i18n.no_slugs : + bpiAjax.i18n.no_urls; } } @@ -114,7 +124,7 @@ jQuery(document).ready(function($) { } $submitButton.prop('disabled', true).text('Installing...'); - $results.html(`

Installation in progress... (Large ZIP files may take some time)

0/${items.length} completed (0% done, ${items.length} remaining)
`); + $results.html(`

${bpiAjax.i18n.installation_in_progress}

0/${items.length} ${bpiAjax.i18n.completed} (0% done, ${items.length} ${bpiAjax.i18n.remaining})
`); const $list = $results.find('.installation-list'); const $progress = $results.find('.progress-count'); @@ -133,19 +143,19 @@ jQuery(document).ready(function($) { processData: false, contentType: false, success: function(response) { - console.log('Upload response:', response); // 调试输出 + console.log('Upload response:', response); if (response.success) { Object.keys(response.data).forEach((item, index) => { handleResponse(response, item, index); }); } else { - $list.append(`
  • Upload Error✗ ${escapeHtml(response.data || 'Unknown upload error')}
  • `); + $list.append(`
  • ${escapeHtml('Upload Error')}✗ ${escapeHtml(response.data || 'Unknown upload error')}
  • `); } installationComplete(); }, error: function(xhr, status, error) { - console.log('Upload error:', xhr, status, error); // 调试输出 - $list.append(`
  • Upload Error✗ ${escapeHtml(xhr.responseText || error)}
  • `); + console.log('Upload error:', xhr, status, error); + $list.append(`
  • ${escapeHtml('Upload Error')}✗ ${escapeHtml(xhr.responseText || error)}
  • `); installationComplete(); } }); @@ -172,12 +182,12 @@ jQuery(document).ready(function($) { install_type: type }, success: function(response) { - console.log('Item response:', response); // 调试输出 + console.log('Item response:', response); handleResponse(response, item, index); processNextItem(index + 1); }, error: function(xhr, status, error) { - console.log('Item error:', xhr, status, error); // 调试输出 + console.log('Item error:', xhr, status, error); handleError(xhr, status, error, item, index); processNextItem(index + 1); } @@ -197,20 +207,20 @@ jQuery(document).ready(function($) { } else { statusHtml = '✗ ' + escapeHtml(result.message); if (result.retry) { - statusHtml += ' '; + statusHtml += ' '; } } $item.find('.status').html(statusHtml); } else { $item.addClass('error') .find('.status') - .html('✗ ' + escapeHtml(response.data || 'Unknown error') + ' '); + .html('✗ ' + escapeHtml(response.data || 'Unknown error') + ' '); } completed++; const percentage = Math.round((completed / items.length) * 100); const remaining = items.length - completed; - $progress.text(`${completed}/${items.length} completed (${percentage}% done, ${remaining} remaining)`); + $progress.text(`${completed}/${items.length} ${bpiAjax.i18n.completed} (${percentage}% done, ${remaining} ${bpiAjax.i18n.remaining})`); } function handleError(xhr, status, error, item, index) { @@ -218,17 +228,17 @@ jQuery(document).ready(function($) { $item.find('.spinner').removeClass('is-active') .addClass('error') .find('.status') - .html(`✗ ${escapeHtml(xhr.responseText || 'Installation failed: ' + error)} `); + .html(`✗ ${escapeHtml(xhr.responseText || 'Installation failed: ' + error)} `); completed++; const percentage = Math.round((completed / items.length) * 100); const remaining = items.length - completed; - $progress.text(`${completed}/${items.length} completed (${percentage}% done, ${remaining} remaining)`); + $progress.text(`${completed}/${items.length} ${bpiAjax.i18n.completed} (${percentage}% done, ${remaining} ${bpiAjax.i18n.remaining})`); } function installationComplete() { $submitButton.prop('disabled', false).text(`Install ${action === 'bpi_install_plugins' ? 'Plugins' : 'Themes'}`); const $notice = $results.find('.notice').removeClass('notice-info').addClass('notice-success'); - $notice.find('p').html('Installation completed! Check the results below. Failed items can be retried using the "Retry" buttons if applicable.'); + $notice.find('p').html(bpiAjax.i18n.installation_complete); } }); @@ -251,7 +261,7 @@ jQuery(document).ready(function($) { install_type: type }, success: function(response) { - console.log('Retry response:', response); // 调试输出 + console.log('Retry response:', response); $li.find('.spinner').removeClass('is-active'); if (response.success && response.data[item]) { const result = response.data[item]; @@ -262,22 +272,22 @@ jQuery(document).ready(function($) { } else { statusHtml = '✗ ' + escapeHtml(result.message); if (result.retry) { - statusHtml += ' '; + statusHtml += ' '; } } $li.find('.status').html(statusHtml); } else { $li.addClass('error') .find('.status') - .html('✗ ' + escapeHtml(response.data || 'Unknown error') + ' '); + .html('✗ ' + escapeHtml(response.data || 'Unknown error') + ' '); } }, error: function(xhr, status, error) { - console.log('Retry error:', xhr, status, error); // 调试输出 + console.log('Retry error:', xhr, status, error); $li.find('.spinner').removeClass('is-active') .addClass('error') .find('.status') - .html(`✗ ${escapeHtml(xhr.responseText || 'Retry failed: ' + error)} `); + .html(`✗ ${escapeHtml(xhr.responseText || 'Retry failed: ' + error)} `); } }); }); diff --git a/bulk-plugin-installer.php b/bulk-plugin-installer.php index 48a5cc9..5f6cdfa 100644 --- a/bulk-plugin-installer.php +++ b/bulk-plugin-installer.php @@ -3,7 +3,7 @@ * Plugin Name: Bulk Plugin Installer * Plugin URI: https://wpmultisite.com/plugins/bulk-plugin-installer/ * Description: Bulk install WordPress plugins and themes from repository, URL, or ZIP uploads. - * Version: 1.1.7 + * Version: 1.1.8 * Author: WPMultisite.com * Author URI: https://wpmultisite.com * Network: true @@ -18,7 +18,7 @@ if (!defined('WPINC')) { die; } -define('BPI_VERSION', '1.1.7'); +define('BPI_VERSION', '1.1.8'); define('BPI_PATH', plugin_dir_path(__FILE__)); define('BPI_URL', plugin_dir_url(__FILE__)); @@ -67,16 +67,14 @@ function bpi_add_network_submenu_page() { define('BPI_ALLOWED_ROLES', ['administrator', 'super_admin']); define('BPI_TRUSTED_DOMAINS', [ 'wordpress.org', - 'downloads.wordpress.org', - 'github.com', - 'raw.githubusercontent.com', 'wenpai.cn', 'wenpai.net', 'wenpai.org', - 'downloads.wenpai.net', 'weixiaoduo.com', 'feibisi.com', - 'feicode.com' + 'feicode.com', + 'github.com', + 'raw.githubusercontent.com' ]); function bpi_register_settings() { @@ -357,4 +355,38 @@ function bpi_activate() { 'last_install_time' => '' ]); } -} \ No newline at end of file +} + +// Add "Upload from URL" button to plugin install page +function bpi_add_plugin_url_upload_button() { + if (bpi_user_can_install()) { + ?> + + + + __('Go to Settings to add domain', 'bulk-plugin-installer'), 'switch_to_themes' => __('Switch to Themes tab', 'bulk-plugin-installer'), @@ -20,7 +20,7 @@ function bpi_render_admin_page() { 'no_slugs' => __('Please enter at least one slug.', 'bulk-plugin-installer'), 'no_urls' => __('Please enter at least one URL.', 'bulk-plugin-installer') ]; - + wp_localize_script('bpi-admin', 'bpiAjax', [ 'nonce' => wp_create_nonce('bpi_installer'), 'ajaxurl' => admin_url('admin-ajax.php'), @@ -238,4 +238,4 @@ function bpi_render_admin_page() { 'Invalid plugin slug format. Please use only lowercase letters, numbers and hyphens.', - 1004 => 'Invalid URL format. Please provide a complete URL including http:// or https://', - 1005 => 'The domain is not in the trusted list. Please add it in settings or use another source.', - 1007 => 'Only ZIP files are allowed for plugin uploads.', - 1009 => 'This appears to be a theme ZIP file. Please use the Themes tab for installation.', - 1010 => 'The uploaded file is not a valid WordPress plugin ZIP.', - - // Theme error codes - 2001 => 'Invalid theme slug format. Please use only lowercase letters, numbers and hyphens.', - 2003 => 'Only ZIP files are allowed for theme uploads.', - 2005 => 'This appears to be a plugin ZIP file. Please use the Plugins tab for installation.', - 2006 => 'The uploaded file is not a valid WordPress theme ZIP.', - 2009 => 'Invalid URL format for theme. Please provide a complete URL including http:// or https://', - 2010 => 'The domain is not in the trusted list for themes. Please add it in settings or use another source.' - ]; + private $error_messages = []; // Initialize as empty array public function __construct() { global $wp_filesystem; if (empty($wp_filesystem)) { require_once ABSPATH . '/wp-admin/includes/file.php'; if (!WP_Filesystem()) { - throw new Exception('Unable to initialize filesystem. Please check server permissions.'); + throw new Exception(__('Unable to initialize filesystem. Please check server permissions.', 'bulk-plugin-installer')); } } $this->wp_filesystem = $wp_filesystem; + + // Initialize error messages with translations in the constructor + $this->error_messages = [ + // Plugin error codes + 1001 => __('Invalid plugin slug format. Please use only lowercase letters, numbers and hyphens.', 'bulk-plugin-installer'), + 1004 => __('Invalid URL format. Please provide a complete URL including http:// or https://', 'bulk-plugin-installer'), + 1005 => __('The domain is not in the trusted list. Please add it in settings or use another source.', 'bulk-plugin-installer'), + 1007 => __('Only ZIP files are allowed for plugin uploads.', 'bulk-plugin-installer'), + 1009 => __('This appears to be a theme ZIP file. Please use the Themes tab for installation.', 'bulk-plugin-installer'), + 1010 => __('The uploaded file is not a valid WordPress plugin ZIP.', 'bulk-plugin-installer'), + // Theme error codes + 2001 => __('Invalid theme slug format. Please use only lowercase letters, numbers and hyphens.', 'bulk-plugin-installer'), + 2003 => __('Only ZIP files are allowed for theme uploads.', 'bulk-plugin-installer'), + 2005 => __('This appears to be a plugin ZIP file. Please use the Plugins tab for installation.', 'bulk-plugin-installer'), + 2006 => __('The uploaded file is not a valid WordPress theme ZIP.', 'bulk-plugin-installer'), + 2009 => __('Invalid URL format for theme. Please provide a complete URL including http:// or https://', 'bulk-plugin-installer'), + 2010 => __('The domain is not in the trusted list for themes. Please add it in settings or use another source.', 'bulk-plugin-installer') + ]; } + public function get_error_message($code, $default_message) { return __($this->error_messages[$code] ?? $default_message, 'bulk-plugin-installer'); } @@ -70,11 +72,11 @@ class BPI_Installer { public function bpi_install_plugins($items, $type) { $valid_types = ['repository', 'wenpai', 'url', 'upload']; if (!in_array($type, $valid_types)) { - return ['error' => 'Invalid installation type']; + return ['error' => __('Invalid installation type', 'bulk-plugin-installer')]; } if (empty($items) || !is_array($items)) { - return ['error' => 'No items provided']; + return ['error' => __('No items provided', 'bulk-plugin-installer')]; } require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; @@ -92,7 +94,7 @@ class BPI_Installer { $item = sanitize_text_field($item); if (!preg_match('/^[a-z0-9-]+$/', $item)) { throw new Exception( - $this->get_error_message(1001, 'Invalid plugin slug'), + $this->get_error_message(1001, 'Invalid plugin slug'), 1001 ); } @@ -105,7 +107,7 @@ class BPI_Installer { if ($plugin_key && array_key_exists($plugin_key, $installed_plugins)) { $results[$item] = [ 'success' => true, - 'message' => 'Plugin already installed, skipped', + 'message' => __('Plugin already installed, skipped', 'bulk-plugin-installer'), 'skipped' => true ]; continue; @@ -120,7 +122,7 @@ class BPI_Installer { ]); if (is_wp_error($api)) { throw new Exception( - $this->get_error_message(1002, 'Failed to fetch plugin info: ' . $api->get_error_message()), + $this->get_error_message(1002, 'Failed to fetch plugin info: ' . $api->get_error_message()), 1002 ); } @@ -132,13 +134,13 @@ class BPI_Installer { if (is_wp_error($response)) { $code = wp_remote_retrieve_response_code($response); throw new Exception( - $this->get_error_message(1003, "Download failed with status code $code: " . $response->get_error_message()), + $this->get_error_message(1003, "Download failed with status code $code: " . $response->get_error_message()), 1003 ); } $plugin_data = json_decode(wp_remote_retrieve_body($response), true); - $download_link = $plugin_data && !empty($plugin_data['download_link']) - ? $plugin_data['download_link'] + $download_link = $plugin_data && !empty($plugin_data['download_link']) + ? $plugin_data['download_link'] : "https://downloads.wenpai.net/plugin/{$item}.latest-stable.zip"; break; @@ -146,13 +148,13 @@ class BPI_Installer { $item = sanitize_text_field($item); if (!filter_var($item, FILTER_VALIDATE_URL)) { throw new Exception( - $this->get_error_message(1004, 'Invalid URL format'), + $this->get_error_message(1004, 'Invalid URL format'), 1004 ); } if (!bpi_is_domain_allowed($item)) { throw new Exception( - $this->get_error_message(1005, 'Untrusted domain'), + $this->get_error_message(1005, 'Untrusted domain'), 1005 ); } @@ -163,14 +165,14 @@ class BPI_Installer { $file = $item; if ($file['error'] !== UPLOAD_ERR_OK) { throw new Exception( - $this->get_error_message(1006, 'File upload error: ' . $file['error']), + $this->get_error_message(1006, 'File upload error: ' . $file['error']), 1006 ); } $file_name = sanitize_file_name($file['name']); if (pathinfo($file_name, PATHINFO_EXTENSION) !== 'zip') { throw new Exception( - $this->get_error_message(1007, 'Only ZIP files are allowed'), + $this->get_error_message(1007, 'Only ZIP files are allowed'), 1007 ); } @@ -180,7 +182,7 @@ class BPI_Installer { if (!move_uploaded_file($temp_file, $dest_path)) { throw new Exception( - $this->get_error_message(1008, 'Failed to move uploaded file. Check server permissions.'), + $this->get_error_message(1008, 'Failed to move uploaded file. Check server permissions.'), 1008 ); } @@ -189,13 +191,13 @@ class BPI_Installer { if ($this->is_theme_zip($dest_path)) { unlink($dest_path); throw new Exception( - $this->get_error_message(1009, 'Theme ZIP detected'), + $this->get_error_message(1009, 'Theme ZIP detected'), 1009 ); } unlink($dest_path); throw new Exception( - $this->get_error_message(1010, 'Invalid plugin ZIP'), + $this->get_error_message(1010, 'Invalid plugin ZIP'), 1010 ); } @@ -213,12 +215,12 @@ class BPI_Installer { if (is_wp_error($result)) { $error_message = $result->get_error_message(); throw new Exception( - $this->get_error_message(1011, $error_message ?: 'Unknown installation error'), + $this->get_error_message(1011, $error_message ?: 'Unknown installation error'), 1011 ); } elseif ($result !== true) { throw new Exception( - $this->get_error_message(1012, 'Installation failed unexpectedly'), + $this->get_error_message(1012, 'Installation failed unexpectedly'), 1012 ); } @@ -244,11 +246,11 @@ class BPI_Installer { public function bpi_install_themes($items, $type) { $valid_types = ['repository', 'wenpai', 'url', 'upload']; if (!in_array($type, $valid_types)) { - return ['error' => 'Invalid installation type']; + return ['error' => __('Invalid installation type', 'bulk-plugin-installer')]; } if (empty($items) || !is_array($items)) { - return ['error' => 'No items provided']; + return ['error' => __('No items provided', 'bulk-plugin-installer')]; } require_once ABSPATH . 'wp-admin/includes/theme-install.php'; @@ -266,7 +268,7 @@ class BPI_Installer { $item = sanitize_text_field($item); if (!preg_match('/^[a-z0-9-]+$/', $item)) { throw new Exception( - $this->get_error_message(2001, 'Invalid theme slug'), + $this->get_error_message(2001, 'Invalid theme slug'), 2001 ); } @@ -275,14 +277,14 @@ class BPI_Installer { $file = $item; if ($file['error'] !== UPLOAD_ERR_OK) { throw new Exception( - $this->get_error_message(2002, 'File upload error: ' . $file['error']), + $this->get_error_message(2002, 'File upload error: ' . $file['error']), 2002 ); } $file_name = sanitize_file_name($file['name']); if (pathinfo($file_name, PATHINFO_EXTENSION) !== 'zip') { throw new Exception( - $this->get_error_message(2003, 'Only ZIP files are allowed'), + $this->get_error_message(2003, 'Only ZIP files are allowed'), 2003 ); } @@ -292,7 +294,7 @@ class BPI_Installer { if (!move_uploaded_file($temp_file, $dest_path)) { throw new Exception( - $this->get_error_message(2004, 'Failed to move uploaded file. Check server permissions.'), + $this->get_error_message(2004, 'Failed to move uploaded file. Check server permissions.'), 2004 ); } @@ -329,13 +331,13 @@ class BPI_Installer { if ($this->is_plugin_zip($dest_path)) { unlink($dest_path); throw new Exception( - $this->get_error_message(2005, 'Plugin ZIP detected'), + $this->get_error_message(2005, 'Plugin ZIP detected'), 2005 ); } unlink($dest_path); throw new Exception( - $this->get_error_message(2006, 'Invalid theme ZIP'), + $this->get_error_message(2006, 'Invalid theme ZIP'), 2006 ); } @@ -362,7 +364,7 @@ class BPI_Installer { ]); if (is_wp_error($api)) { throw new Exception( - $this->get_error_message(2007, 'Failed to fetch theme info: ' . $api->get_error_message()), + $this->get_error_message(2007, 'Failed to fetch theme info: ' . $api->get_error_message()), 2007 ); } @@ -374,13 +376,13 @@ class BPI_Installer { if (is_wp_error($response)) { $code = wp_remote_retrieve_response_code($response); throw new Exception( - $this->get_error_message(2008, "Download failed with status code $code: " . $response->get_error_message()), + $this->get_error_message(2008, "Download failed with status code $code: " . $response->get_error_message()), 2008 ); } $theme_data = json_decode(wp_remote_retrieve_body($response), true); - $download_link = $theme_data && !empty($theme_data['download_link']) - ? $theme_data['download_link'] + $download_link = $theme_data && !empty($theme_data['download_link']) + ? $theme_data['download_link'] : "https://downloads.wenpai.net/theme/{$item}.latest-stable.zip"; break; @@ -388,13 +390,13 @@ class BPI_Installer { $item = sanitize_text_field($item); if (!filter_var($item, FILTER_VALIDATE_URL)) { throw new Exception( - $this->get_error_message(2009, 'Invalid URL format'), + $this->get_error_message(2009, 'Invalid URL format'), 2009 ); } if (!bpi_is_domain_allowed($item)) { throw new Exception( - $this->get_error_message(2010, 'Untrusted domain'), + $this->get_error_message(2010, 'Untrusted domain'), 2010 ); } @@ -414,12 +416,12 @@ class BPI_Installer { if (is_wp_error($result)) { $error_message = $result->get_error_message(); throw new Exception( - $this->get_error_message(2011, $error_message ?: 'Unknown installation error'), + $this->get_error_message(2011, $error_message ?: 'Unknown installation error'), 2011 ); } elseif ($result !== true) { throw new Exception( - $this->get_error_message(2012, 'Installation failed unexpectedly'), + $this->get_error_message(2012, 'Installation failed unexpectedly'), 2012 ); } diff --git a/languages/bulk-plugin-installer-zh_CN-backup-202503260656430.po~ b/languages/bulk-plugin-installer-zh_CN-backup-202503260656430.po~ new file mode 100644 index 0000000..73e40f3 --- /dev/null +++ b/languages/bulk-plugin-installer-zh_CN-backup-202503260656430.po~ @@ -0,0 +1,382 @@ +msgid "" +msgstr "" +"Project-Id-Version: Bulk Plugin Installer\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-26 03:53+0000\n" +"PO-Revision-Date: 2025-03-26 06:37+0000\n" +"Last-Translator: \n" +"Language-Team: 简体中文\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Loco https://localise.biz/\n" +"X-Loco-Version: 2.6.11; wp-6.7.2\n" +"X-Domain: bulk-plugin-installer\n" + +#: includes/admin-page.php:181 +msgid "Additional Trusted Domains" +msgstr "其他受信任域" + +#: includes/admin-page.php:166 +msgid "Allowed Roles" +msgstr "允许角色" + +#. Description of the plugin +msgid "" +"Bulk install WordPress plugins and themes from repository, URL, or ZIP " +"uploads." +msgstr "从存储库、URL 或 ZIP 上传批量安装 WordPress 插件和主题。" + +#: includes/admin-page.php:31 +msgid "Bulk Plugin & Theme Installer" +msgstr "批量插件和主题安装器" + +#. Name of the plugin +msgid "Bulk Plugin Installer" +msgstr "批量插件安装器" + +#: includes/admin-page.php:16 +msgid "completed" +msgstr "已完成" + +#: includes/admin-page.php:158 +msgid "Configure plugin installation settings." +msgstr "配置插件安装设置。" + +#: includes/admin-page.php:33 +msgid "Document" +msgstr "文档" + +#: includes/admin-page.php:75 includes/admin-page.php:130 +msgid "Download URLs:" +msgstr "下载网址:" + +#: includes/admin-page.php:86 +msgid "Drag and drop plugin ZIP files here or click to select files" +msgstr "将插件 ZIP 文件拖放到此处或单击选择文件" + +#: includes/admin-page.php:141 +msgid "Drag and drop theme ZIP files here or click to select files" +msgstr "将主题 ZIP 文件拖放到此处或单击以选择文件" + +#: includes/admin-page.php:77 includes/admin-page.php:132 +msgid "Enter download URLs, one per line" +msgstr "输入下载网址,每行一个" + +#: includes/admin-page.php:183 +msgid "Enter one root domain per line (e.g., example.com)" +msgstr "每行输入一个根域名(例如 example.com)" + +#: includes/admin-page.php:63 includes/admin-page.php:70 +msgid "Enter plugin slugs, one per line (e.g., akismet)" +msgstr "输入插件 slug,每行一个(例如 akismet)" + +#: includes/admin-page.php:186 +msgid "" +"Enter root domains (one per line) for remote installation. Subdomains are " +"automatically included." +msgstr "输入用于远程安装的根域(每行一个)。子域将自动包含在内。" + +#: includes/admin-page.php:118 includes/admin-page.php:125 +msgid "Enter theme slugs, one per line (e.g., twentytwenty)" +msgstr "输入主题 slug,每行一个(例如,twentytwenty)" + +#: includes/admin-page.php:228 +msgid "Failed Installs" +msgstr "安装失败" + +#: includes/admin-page.php:11 +msgid "Go to Settings to add domain" +msgstr "前往“设置”添加域" + +#. Author URI of the plugin +msgid "https://wpmultisite.com" +msgstr "https://wpmultisite.com" + +#. URI of the plugin +msgid "https://wpmultisite.com/plugins/bulk-plugin-installer/" +msgstr "https://wpmultisite.com/plugins/bulk-plugin-installer/" + +#: includes/admin-page.php:48 +msgid "Install multiple plugins from various sources." +msgstr "从不同来源安装多个插件。" + +#: includes/admin-page.php:103 +msgid "Install multiple themes from various sources." +msgstr "从不同来源安装多个主题。" + +#: includes/admin-page.php:47 includes/admin-page.php:95 +msgid "Install Plugins" +msgstr "安装插件" + +#: includes/admin-page.php:102 includes/admin-page.php:150 +msgid "Install Themes" +msgstr "安装主题" + +#: includes/admin-page.php:18 +msgid "" +"Installation completed! Check the results below. Failed items can be retried " +"using the \"Retry\" buttons if applicable." +msgstr "安装已完成!检查以下结果。如果适用,可以使用“重试”按钮重试失败的项目。" + +#: includes/admin-page.php:15 +msgid "Installation in progress... (Large ZIP files may take some time)" +msgstr "正在安装...(较大的 ZIP 文件可能需要一些时间)" + +#: includes/admin-page.php:51 includes/admin-page.php:106 +msgid "Installation Source:" +msgstr "安装来源:" + +#: bulk-plugin-installer.php:147 bulk-plugin-installer.php:222 +#: bulk-plugin-installer.php:297 +msgid "Insufficient permissions" +msgstr "权限不足" + +#: includes/class-installer.php:75 includes/class-installer.php:249 +msgid "Invalid installation type" +msgstr "安装类型无效" + +#: includes/class-installer.php:19 +msgid "" +"Invalid plugin slug format. Please use only lowercase letters, numbers and " +"hyphens." +msgstr "插件 slug 格式无效。请仅使用小写字母、数字和连字符。" + +#: includes/class-installer.php:26 +msgid "" +"Invalid theme slug format. Please use only lowercase letters, numbers and " +"hyphens." +msgstr "主题 slug 格式无效。请仅使用小写字母、数字和连字符。" + +#: includes/class-installer.php:30 +msgid "" +"Invalid URL format for theme. Please provide a complete URL including http:" +"// or https://" +msgstr "主题的 URL 格式无效。请提供完整的 URL,包括 http:// 或 https://" + +#: includes/class-installer.php:20 +msgid "" +"Invalid URL format. Please provide a complete URL including http:// or https:" +"//" +msgstr "URL 格式无效。请提供完整的 URL,包括 http:// 或 https://" + +#: includes/admin-page.php:232 +msgid "Last Install Time" +msgstr "上次安装时间" + +#: includes/admin-page.php:214 +msgid "Metric" +msgstr "参数" + +#: includes/admin-page.php:233 +msgid "Never Installed" +msgstr "从未安装" + +#: bulk-plugin-installer.php:160 bulk-plugin-installer.php:235 +msgid "No files uploaded" +msgstr "沒有上传文件" + +#: bulk-plugin-installer.php:200 bulk-plugin-installer.php:275 +#: includes/class-installer.php:79 includes/class-installer.php:253 +msgid "No items provided" +msgstr "沒有提供任何項目" + +#: bulk-plugin-installer.php:191 bulk-plugin-installer.php:266 +msgid "No valid files uploaded" +msgstr "未上传有效文件" + +#: includes/class-installer.php:22 +msgid "Only ZIP files are allowed for plugin uploads." +msgstr "仅允许上传 ZIP 文件插件。" + +#: includes/class-installer.php:27 +msgid "Only ZIP files are allowed for theme uploads." +msgstr "仅允许上传 ZIP 文件主题。" + +#: includes/admin-page.php:20 +msgid "Please enter at least one slug." +msgstr "请输入至少一个 slug。" + +#: includes/admin-page.php:21 +msgid "Please enter at least one URL." +msgstr "请输入至少一个网址。" + +#: includes/admin-page.php:19 +msgid "Please select at least one ZIP file." +msgstr "请至少选择一个 ZIP 文件。" + +#: includes/class-installer.php:110 +msgid "Plugin already installed, skipped" +msgstr "插件已安装,已跳过" + +#: bulk-plugin-installer.php:47 bulk-plugin-installer.php:48 +#: bulk-plugin-installer.php:59 bulk-plugin-installer.php:60 +msgid "Plugin Installer" +msgstr "插件安装器" + +#: includes/admin-page.php:68 +msgid "Plugin Slugs (WenPai.org):" +msgstr "插件 Slugs (WenPai.org):" + +#: includes/admin-page.php:61 +msgid "Plugin Slugs:" +msgstr "插件 Slugs :" + +#: includes/admin-page.php:41 +msgid "Plugins" +msgstr "插件" + +#: includes/admin-page.php:17 +msgid "remaining" +msgstr "其余的" + +#: includes/admin-page.php:55 includes/admin-page.php:110 +msgid "Remote URL" +msgstr "远程 URL" + +#: includes/admin-page.php:14 +msgid "Retry" +msgstr "重试" + +#: includes/admin-page.php:190 +msgid "Save Settings" +msgstr "保存设置" + +#: includes/admin-page.php:43 includes/admin-page.php:157 +msgid "Settings" +msgstr "设置" + +#: bulk-plugin-installer.php:308 +msgid "Settings saved successfully!" +msgstr "设置保存成功!" + +#: includes/admin-page.php:201 +msgid "Statistics" +msgstr "统计数据" + +#: includes/admin-page.php:224 +msgid "Successful Installs" +msgstr "成功安装" + +#: includes/class-installer.php:230 includes/class-installer.php:431 +msgid "Successfully installed" +msgstr "安装成功" + +#: includes/admin-page.php:34 +msgid "Support" +msgstr "支持" + +#: includes/admin-page.php:13 +msgid "Switch to Plugins tab" +msgstr "切换到插件选项卡" + +#: includes/admin-page.php:12 +msgid "Switch to Themes tab" +msgstr "切换到主题选项卡" + +#: includes/class-installer.php:31 +msgid "" +"The domain is not in the trusted list for themes. Please add it in settings " +"or use another source." +msgstr "该域名不在主题的受信任列表中。请在设置中添加它或使用其他来源。" + +#: includes/class-installer.php:21 +msgid "" +"The domain is not in the trusted list. Please add it in settings or use " +"another source." +msgstr "该域名不在受信任列表中。请在设置中添加它或使用其他来源。" + +#: includes/class-installer.php:24 +msgid "The uploaded file is not a valid WordPress plugin ZIP." +msgstr "上传的文件不是有效的 WordPress 插件 ZIP。" + +#: includes/class-installer.php:29 +msgid "The uploaded file is not a valid WordPress theme ZIP." +msgstr "上传的文件不是有效的 WordPress 主题 ZIP。" + +#: includes/class-installer.php:324 includes/class-installer.php:352 +msgid "Theme already installed, skipped" +msgstr "主题已安装,已跳过" + +#: includes/admin-page.php:123 +msgid "Theme Slugs (WenPai.org):" +msgstr "主题 Slugs (WenPai.org):" + +#: includes/admin-page.php:116 +msgid "Theme Slugs:" +msgstr "主题 Slugs :" + +#: includes/admin-page.php:42 +msgid "Themes" +msgstr "主题" + +#: includes/class-installer.php:28 +msgid "" +"This appears to be a plugin ZIP file. Please use the Plugins tab for " +"installation." +msgstr "这似乎是一个插件 ZIP 文件。请使用“插件”选项卡进行安装。" + +#: includes/class-installer.php:23 +msgid "" +"This appears to be a theme ZIP file. Please use the Themes tab for " +"installation." +msgstr "这似乎是一个主题 ZIP 文件。请使用“主题”选项卡进行安装。" + +#: bulk-plugin-installer.php:336 +msgid "This plugin requires PHP 7.4 or higher." +msgstr "此插件需要 PHP 7.4 或更高版本。" + +#: includes/admin-page.php:220 +msgid "Total Installs" +msgstr "总安装量" + +#: includes/class-installer.php:11 +msgid "Unable to initialize filesystem. Please check server permissions." +msgstr "无法初始化文件系统。请检查服务器权限。" + +#: bulk-plugin-installer.php:364 bulk-plugin-installer.php:375 +msgid "Upload from URL" +msgstr "从 URL 上传" + +#: includes/admin-page.php:56 includes/admin-page.php:111 +msgid "Upload ZIP" +msgstr "上传 ZIP" + +#: includes/admin-page.php:215 +msgid "Value" +msgstr "数值" + +#: includes/admin-page.php:32 +#, php-format +msgid "Version: %s" +msgstr "版本: %s" + +#: includes/admin-page.php:202 +msgid "View statistics of plugin and theme installations." +msgstr "查看插件和主题安装的统计数据。" + +#: includes/admin-page.php:54 includes/admin-page.php:109 +msgid "WenPai.org Repository (China Mirror)" +msgstr "WenPai.org 存储库(中国镜像)" + +#: includes/admin-page.php:53 includes/admin-page.php:108 +msgid "WordPress.org Repository" +msgstr "WordPress.org 存储库" + +#. Author of the plugin +msgid "WPMultisite.com" +msgstr "文派多站点" + +#: includes/admin-page.php:4 +msgid "You do not have sufficient permissions to access this page." +msgstr "您没有足够的权限访问此页面。" + +#: includes/admin-page.php:161 +msgid "You need administrator privileges to modify these settings." +msgstr "您需要管理员权限才能修改这些设置。" + +#: includes/admin-page.php:82 includes/admin-page.php:137 +msgid "ZIP Files:" +msgstr "ZIP 文件:" diff --git a/languages/bulk-plugin-installer-zh_CN.l10n.php b/languages/bulk-plugin-installer-zh_CN.l10n.php new file mode 100644 index 0000000..abc16d0 --- /dev/null +++ b/languages/bulk-plugin-installer-zh_CN.l10n.php @@ -0,0 +1,3 @@ +'Bulk Plugin Installer','report-msgid-bugs-to'=>'','pot-creation-date'=>'2025-03-26 03:53+0000','po-revision-date'=>'2025-03-26 06:56+0000','last-translator'=>'','language-team'=>'简体中文','language'=>'zh_CN','mime-version'=>'1.0','content-type'=>'text/plain; charset=UTF-8','content-transfer-encoding'=>'8bit','plural-forms'=>'nplurals=1; plural=0;','x-generator'=>'Loco https://localise.biz/','x-loco-version'=>'2.6.11; wp-6.7.2','x-domain'=>'bulk-plugin-installer +','messages'=>['Additional Trusted Domains'=>'其他受信任域','Allowed Roles'=>'允许角色','Bulk install WordPress plugins and themes from repository, URL, or ZIP uploads.'=>'从存储库、URL 或 ZIP 上传批量安装 WordPress 插件和主题。','Bulk Plugin & Theme Installer'=>'批量插件和主题安装器','Bulk Plugin Installer'=>'批量插件安装器','completed'=>'已完成','Configure plugin installation settings.'=>'配置插件安装设置。','Document'=>'文档','Download URLs:'=>'下载网址:','Drag and drop plugin ZIP files here or click to select files'=>'将插件 ZIP 文件拖放到此处或单击选择文件','Drag and drop theme ZIP files here or click to select files'=>'将主题 ZIP 文件拖放到此处或单击以选择文件','Enter download URLs, one per line'=>'输入下载网址,每行一个','Enter one root domain per line (e.g., example.com)'=>'每行输入一个根域名(例如 example.com)','Enter plugin slugs, one per line (e.g., akismet)'=>'输入插件 slug,每行一个(例如 akismet)','Enter root domains (one per line) for remote installation. Subdomains are automatically included.'=>'输入用于远程安装的根域(每行一个)。子域将自动包含在内。','Enter theme slugs, one per line (e.g., twentytwenty)'=>'输入主题 slug,每行一个(例如,twentytwenty)','Failed Installs'=>'安装失败','Go to Settings to add domain'=>'前往“设置”添加域','https://wpmultisite.com'=>'https://wpmultisite.com','https://wpmultisite.com/plugins/bulk-plugin-installer/'=>'https://wpmultisite.com/plugins/bulk-plugin-installer/','Install multiple plugins from various sources.'=>'从不同来源安装多个插件。','Install multiple themes from various sources.'=>'从不同来源安装多个主题。','Install Plugins'=>'安装插件','Install Themes'=>'安装主题','Installation completed! Check the results below. Failed items can be retried using the "Retry" buttons if applicable.'=>'安装已完成!检查以下结果。如果适用,可以使用“重试”按钮重试失败的项目。','Installation in progress... (Large ZIP files may take some time)'=>'正在安装...(较大的 ZIP 文件可能需要一些时间)','Installation Source:'=>'安装来源:','Insufficient permissions'=>'权限不足','Invalid installation type'=>'安装类型无效','Invalid plugin slug format. Please use only lowercase letters, numbers and hyphens.'=>'插件 slug 格式无效。请仅使用小写字母、数字和连字符。','Invalid theme slug format. Please use only lowercase letters, numbers and hyphens.'=>'主题 slug 格式无效。请仅使用小写字母、数字和连字符。','Invalid URL format for theme. Please provide a complete URL including http:// or https://'=>'主题的 URL 格式无效。请提供完整的 URL,包括 http:// 或 https://','Invalid URL format. Please provide a complete URL including http:// or https://'=>'URL 格式无效。请提供完整的 URL,包括 http:// 或 https://','Last Install Time'=>'上次安装时间','Metric'=>'参数','Never Installed'=>'从未安装','No files uploaded'=>'沒有上传文件','No items provided'=>'沒有提供任何項目','No valid files uploaded'=>'未上传有效文件','Only ZIP files are allowed for plugin uploads.'=>'仅允许上传 ZIP 文件插件。','Only ZIP files are allowed for theme uploads.'=>'仅允许上传 ZIP 文件主题。','Please enter at least one slug.'=>'请输入至少一个 slug。','Please enter at least one URL.'=>'请输入至少一个网址。','Please select at least one ZIP file.'=>'请至少选择一个 ZIP 文件。','Plugin already installed, skipped'=>'插件已安装,已跳过','Plugin Installer'=>'插件安装器','Plugin Slugs (WenPai.org):'=>'插件 Slugs (WenPai.org):','Plugin Slugs:'=>'插件 Slugs :','Plugins'=>'插件','remaining'=>'剩余','Remote URL'=>'远程 URL','Retry'=>'重试','Save Settings'=>'保存设置','Settings'=>'设置','Settings saved successfully!'=>'设置保存成功!','Statistics'=>'统计数据','Successful Installs'=>'成功安装','Successfully installed'=>'安装成功','Support'=>'支持','Switch to Plugins tab'=>'切换到插件选项卡','Switch to Themes tab'=>'切换到主题选项卡','The domain is not in the trusted list for themes. Please add it in settings or use another source.'=>'该域名不在主题的受信任列表中。请在设置中添加它或使用其他来源。','The domain is not in the trusted list. Please add it in settings or use another source.'=>'该域名不在受信任列表中。请在设置中添加它或使用其他来源。','The uploaded file is not a valid WordPress plugin ZIP.'=>'上传的文件不是有效的 WordPress 插件 ZIP。','The uploaded file is not a valid WordPress theme ZIP.'=>'上传的文件不是有效的 WordPress 主题 ZIP。','Theme already installed, skipped'=>'主题已安装,已跳过','Theme Slugs (WenPai.org):'=>'主题 Slugs (WenPai.org):','Theme Slugs:'=>'主题 Slugs :','Themes'=>'主题','This appears to be a plugin ZIP file. Please use the Plugins tab for installation.'=>'这似乎是一个插件 ZIP 文件。请使用“插件”选项卡进行安装。','This appears to be a theme ZIP file. Please use the Themes tab for installation.'=>'这似乎是一个主题 ZIP 文件。请使用“主题”选项卡进行安装。','This plugin requires PHP 7.4 or higher.'=>'此插件需要 PHP 7.4 或更高版本。','Total Installs'=>'总安装量','Unable to initialize filesystem. Please check server permissions.'=>'无法初始化文件系统。请检查服务器权限。','Upload from URL'=>'从 URL 上传','Upload ZIP'=>'上传 ZIP','Value'=>'数值','Version: %s'=>'版本: %s','View statistics of plugin and theme installations.'=>'查看插件和主题安装的统计数据。','WenPai.org Repository (China Mirror)'=>'WenPai.org 存储库(中国镜像)','WordPress.org Repository'=>'WordPress.org 存储库','WPMultisite.com'=>'文派多站点','You do not have sufficient permissions to access this page.'=>'您没有足够的权限访问此页面。','You need administrator privileges to modify these settings.'=>'您需要管理员权限才能修改这些设置。','ZIP Files:'=>'ZIP 文件:']]; diff --git a/languages/bulk-plugin-installer-zh_CN.mo b/languages/bulk-plugin-installer-zh_CN.mo new file mode 100644 index 0000000..87b6649 Binary files /dev/null and b/languages/bulk-plugin-installer-zh_CN.mo differ diff --git a/languages/bulk-plugin-installer-zh_CN.po b/languages/bulk-plugin-installer-zh_CN.po new file mode 100644 index 0000000..cfdcf16 --- /dev/null +++ b/languages/bulk-plugin-installer-zh_CN.po @@ -0,0 +1,382 @@ +msgid "" +msgstr "" +"Project-Id-Version: Bulk Plugin Installer\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-26 03:53+0000\n" +"PO-Revision-Date: 2025-03-26 06:56+0000\n" +"Last-Translator: \n" +"Language-Team: 简体中文\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Loco https://localise.biz/\n" +"X-Loco-Version: 2.6.11; wp-6.7.2\n" +"X-Domain: bulk-plugin-installer\n" + +#: includes/admin-page.php:181 +msgid "Additional Trusted Domains" +msgstr "其他受信任域" + +#: includes/admin-page.php:166 +msgid "Allowed Roles" +msgstr "允许角色" + +#. Description of the plugin +msgid "" +"Bulk install WordPress plugins and themes from repository, URL, or ZIP " +"uploads." +msgstr "从存储库、URL 或 ZIP 上传批量安装 WordPress 插件和主题。" + +#: includes/admin-page.php:31 +msgid "Bulk Plugin & Theme Installer" +msgstr "批量插件和主题安装器" + +#. Name of the plugin +msgid "Bulk Plugin Installer" +msgstr "批量插件安装器" + +#: includes/admin-page.php:16 +msgid "completed" +msgstr "已完成" + +#: includes/admin-page.php:158 +msgid "Configure plugin installation settings." +msgstr "配置插件安装设置。" + +#: includes/admin-page.php:33 +msgid "Document" +msgstr "文档" + +#: includes/admin-page.php:75 includes/admin-page.php:130 +msgid "Download URLs:" +msgstr "下载网址:" + +#: includes/admin-page.php:86 +msgid "Drag and drop plugin ZIP files here or click to select files" +msgstr "将插件 ZIP 文件拖放到此处或单击选择文件" + +#: includes/admin-page.php:141 +msgid "Drag and drop theme ZIP files here or click to select files" +msgstr "将主题 ZIP 文件拖放到此处或单击以选择文件" + +#: includes/admin-page.php:77 includes/admin-page.php:132 +msgid "Enter download URLs, one per line" +msgstr "输入下载网址,每行一个" + +#: includes/admin-page.php:183 +msgid "Enter one root domain per line (e.g., example.com)" +msgstr "每行输入一个根域名(例如 example.com)" + +#: includes/admin-page.php:63 includes/admin-page.php:70 +msgid "Enter plugin slugs, one per line (e.g., akismet)" +msgstr "输入插件 slug,每行一个(例如 akismet)" + +#: includes/admin-page.php:186 +msgid "" +"Enter root domains (one per line) for remote installation. Subdomains are " +"automatically included." +msgstr "输入用于远程安装的根域(每行一个)。子域将自动包含在内。" + +#: includes/admin-page.php:118 includes/admin-page.php:125 +msgid "Enter theme slugs, one per line (e.g., twentytwenty)" +msgstr "输入主题 slug,每行一个(例如,twentytwenty)" + +#: includes/admin-page.php:228 +msgid "Failed Installs" +msgstr "安装失败" + +#: includes/admin-page.php:11 +msgid "Go to Settings to add domain" +msgstr "前往“设置”添加域" + +#. Author URI of the plugin +msgid "https://wpmultisite.com" +msgstr "https://wpmultisite.com" + +#. URI of the plugin +msgid "https://wpmultisite.com/plugins/bulk-plugin-installer/" +msgstr "https://wpmultisite.com/plugins/bulk-plugin-installer/" + +#: includes/admin-page.php:48 +msgid "Install multiple plugins from various sources." +msgstr "从不同来源安装多个插件。" + +#: includes/admin-page.php:103 +msgid "Install multiple themes from various sources." +msgstr "从不同来源安装多个主题。" + +#: includes/admin-page.php:47 includes/admin-page.php:95 +msgid "Install Plugins" +msgstr "安装插件" + +#: includes/admin-page.php:102 includes/admin-page.php:150 +msgid "Install Themes" +msgstr "安装主题" + +#: includes/admin-page.php:18 +msgid "" +"Installation completed! Check the results below. Failed items can be retried " +"using the \"Retry\" buttons if applicable." +msgstr "安装已完成!检查以下结果。如果适用,可以使用“重试”按钮重试失败的项目。" + +#: includes/admin-page.php:15 +msgid "Installation in progress... (Large ZIP files may take some time)" +msgstr "正在安装...(较大的 ZIP 文件可能需要一些时间)" + +#: includes/admin-page.php:51 includes/admin-page.php:106 +msgid "Installation Source:" +msgstr "安装来源:" + +#: bulk-plugin-installer.php:147 bulk-plugin-installer.php:222 +#: bulk-plugin-installer.php:297 +msgid "Insufficient permissions" +msgstr "权限不足" + +#: includes/class-installer.php:75 includes/class-installer.php:249 +msgid "Invalid installation type" +msgstr "安装类型无效" + +#: includes/class-installer.php:19 +msgid "" +"Invalid plugin slug format. Please use only lowercase letters, numbers and " +"hyphens." +msgstr "插件 slug 格式无效。请仅使用小写字母、数字和连字符。" + +#: includes/class-installer.php:26 +msgid "" +"Invalid theme slug format. Please use only lowercase letters, numbers and " +"hyphens." +msgstr "主题 slug 格式无效。请仅使用小写字母、数字和连字符。" + +#: includes/class-installer.php:30 +msgid "" +"Invalid URL format for theme. Please provide a complete URL including http:" +"// or https://" +msgstr "主题的 URL 格式无效。请提供完整的 URL,包括 http:// 或 https://" + +#: includes/class-installer.php:20 +msgid "" +"Invalid URL format. Please provide a complete URL including http:// or https:" +"//" +msgstr "URL 格式无效。请提供完整的 URL,包括 http:// 或 https://" + +#: includes/admin-page.php:232 +msgid "Last Install Time" +msgstr "上次安装时间" + +#: includes/admin-page.php:214 +msgid "Metric" +msgstr "参数" + +#: includes/admin-page.php:233 +msgid "Never Installed" +msgstr "从未安装" + +#: bulk-plugin-installer.php:160 bulk-plugin-installer.php:235 +msgid "No files uploaded" +msgstr "沒有上传文件" + +#: bulk-plugin-installer.php:200 bulk-plugin-installer.php:275 +#: includes/class-installer.php:79 includes/class-installer.php:253 +msgid "No items provided" +msgstr "沒有提供任何項目" + +#: bulk-plugin-installer.php:191 bulk-plugin-installer.php:266 +msgid "No valid files uploaded" +msgstr "未上传有效文件" + +#: includes/class-installer.php:22 +msgid "Only ZIP files are allowed for plugin uploads." +msgstr "仅允许上传 ZIP 文件插件。" + +#: includes/class-installer.php:27 +msgid "Only ZIP files are allowed for theme uploads." +msgstr "仅允许上传 ZIP 文件主题。" + +#: includes/admin-page.php:20 +msgid "Please enter at least one slug." +msgstr "请输入至少一个 slug。" + +#: includes/admin-page.php:21 +msgid "Please enter at least one URL." +msgstr "请输入至少一个网址。" + +#: includes/admin-page.php:19 +msgid "Please select at least one ZIP file." +msgstr "请至少选择一个 ZIP 文件。" + +#: includes/class-installer.php:110 +msgid "Plugin already installed, skipped" +msgstr "插件已安装,已跳过" + +#: bulk-plugin-installer.php:47 bulk-plugin-installer.php:48 +#: bulk-plugin-installer.php:59 bulk-plugin-installer.php:60 +msgid "Plugin Installer" +msgstr "插件安装器" + +#: includes/admin-page.php:68 +msgid "Plugin Slugs (WenPai.org):" +msgstr "插件 Slugs (WenPai.org):" + +#: includes/admin-page.php:61 +msgid "Plugin Slugs:" +msgstr "插件 Slugs :" + +#: includes/admin-page.php:41 +msgid "Plugins" +msgstr "插件" + +#: includes/admin-page.php:17 +msgid "remaining" +msgstr "剩余" + +#: includes/admin-page.php:55 includes/admin-page.php:110 +msgid "Remote URL" +msgstr "远程 URL" + +#: includes/admin-page.php:14 +msgid "Retry" +msgstr "重试" + +#: includes/admin-page.php:190 +msgid "Save Settings" +msgstr "保存设置" + +#: includes/admin-page.php:43 includes/admin-page.php:157 +msgid "Settings" +msgstr "设置" + +#: bulk-plugin-installer.php:308 +msgid "Settings saved successfully!" +msgstr "设置保存成功!" + +#: includes/admin-page.php:201 +msgid "Statistics" +msgstr "统计数据" + +#: includes/admin-page.php:224 +msgid "Successful Installs" +msgstr "成功安装" + +#: includes/class-installer.php:230 includes/class-installer.php:431 +msgid "Successfully installed" +msgstr "安装成功" + +#: includes/admin-page.php:34 +msgid "Support" +msgstr "支持" + +#: includes/admin-page.php:13 +msgid "Switch to Plugins tab" +msgstr "切换到插件选项卡" + +#: includes/admin-page.php:12 +msgid "Switch to Themes tab" +msgstr "切换到主题选项卡" + +#: includes/class-installer.php:31 +msgid "" +"The domain is not in the trusted list for themes. Please add it in settings " +"or use another source." +msgstr "该域名不在主题的受信任列表中。请在设置中添加它或使用其他来源。" + +#: includes/class-installer.php:21 +msgid "" +"The domain is not in the trusted list. Please add it in settings or use " +"another source." +msgstr "该域名不在受信任列表中。请在设置中添加它或使用其他来源。" + +#: includes/class-installer.php:24 +msgid "The uploaded file is not a valid WordPress plugin ZIP." +msgstr "上传的文件不是有效的 WordPress 插件 ZIP。" + +#: includes/class-installer.php:29 +msgid "The uploaded file is not a valid WordPress theme ZIP." +msgstr "上传的文件不是有效的 WordPress 主题 ZIP。" + +#: includes/class-installer.php:324 includes/class-installer.php:352 +msgid "Theme already installed, skipped" +msgstr "主题已安装,已跳过" + +#: includes/admin-page.php:123 +msgid "Theme Slugs (WenPai.org):" +msgstr "主题 Slugs (WenPai.org):" + +#: includes/admin-page.php:116 +msgid "Theme Slugs:" +msgstr "主题 Slugs :" + +#: includes/admin-page.php:42 +msgid "Themes" +msgstr "主题" + +#: includes/class-installer.php:28 +msgid "" +"This appears to be a plugin ZIP file. Please use the Plugins tab for " +"installation." +msgstr "这似乎是一个插件 ZIP 文件。请使用“插件”选项卡进行安装。" + +#: includes/class-installer.php:23 +msgid "" +"This appears to be a theme ZIP file. Please use the Themes tab for " +"installation." +msgstr "这似乎是一个主题 ZIP 文件。请使用“主题”选项卡进行安装。" + +#: bulk-plugin-installer.php:336 +msgid "This plugin requires PHP 7.4 or higher." +msgstr "此插件需要 PHP 7.4 或更高版本。" + +#: includes/admin-page.php:220 +msgid "Total Installs" +msgstr "总安装量" + +#: includes/class-installer.php:11 +msgid "Unable to initialize filesystem. Please check server permissions." +msgstr "无法初始化文件系统。请检查服务器权限。" + +#: bulk-plugin-installer.php:364 bulk-plugin-installer.php:375 +msgid "Upload from URL" +msgstr "从 URL 上传" + +#: includes/admin-page.php:56 includes/admin-page.php:111 +msgid "Upload ZIP" +msgstr "上传 ZIP" + +#: includes/admin-page.php:215 +msgid "Value" +msgstr "数值" + +#: includes/admin-page.php:32 +#, php-format +msgid "Version: %s" +msgstr "版本: %s" + +#: includes/admin-page.php:202 +msgid "View statistics of plugin and theme installations." +msgstr "查看插件和主题安装的统计数据。" + +#: includes/admin-page.php:54 includes/admin-page.php:109 +msgid "WenPai.org Repository (China Mirror)" +msgstr "WenPai.org 存储库(中国镜像)" + +#: includes/admin-page.php:53 includes/admin-page.php:108 +msgid "WordPress.org Repository" +msgstr "WordPress.org 存储库" + +#. Author of the plugin +msgid "WPMultisite.com" +msgstr "文派多站点" + +#: includes/admin-page.php:4 +msgid "You do not have sufficient permissions to access this page." +msgstr "您没有足够的权限访问此页面。" + +#: includes/admin-page.php:161 +msgid "You need administrator privileges to modify these settings." +msgstr "您需要管理员权限才能修改这些设置。" + +#: includes/admin-page.php:82 includes/admin-page.php:137 +msgid "ZIP Files:" +msgstr "ZIP 文件:" diff --git a/languages/bulk-plugin-installer.pot b/languages/bulk-plugin-installer.pot new file mode 100644 index 0000000..2595ecc --- /dev/null +++ b/languages/bulk-plugin-installer.pot @@ -0,0 +1,383 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Bulk Plugin Installer\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-03-26 06:35+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: \n" +"Language: \n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco https://localise.biz/\n" +"X-Loco-Version: 2.6.11; wp-6.7.2\n" +"X-Domain: bulk-plugin-installer" + +#: includes/admin-page.php:181 +msgid "Additional Trusted Domains" +msgstr "" + +#: includes/admin-page.php:166 +msgid "Allowed Roles" +msgstr "" + +#. Description of the plugin +msgid "" +"Bulk install WordPress plugins and themes from repository, URL, or ZIP " +"uploads." +msgstr "" + +#: includes/admin-page.php:31 +msgid "Bulk Plugin & Theme Installer" +msgstr "" + +#. Name of the plugin +msgid "Bulk Plugin Installer" +msgstr "" + +#: includes/admin-page.php:16 +msgid "completed" +msgstr "" + +#: includes/admin-page.php:158 +msgid "Configure plugin installation settings." +msgstr "" + +#: includes/admin-page.php:33 +msgid "Document" +msgstr "" + +#: includes/admin-page.php:75 includes/admin-page.php:130 +msgid "Download URLs:" +msgstr "" + +#: includes/admin-page.php:86 +msgid "Drag and drop plugin ZIP files here or click to select files" +msgstr "" + +#: includes/admin-page.php:141 +msgid "Drag and drop theme ZIP files here or click to select files" +msgstr "" + +#: includes/admin-page.php:77 includes/admin-page.php:132 +msgid "Enter download URLs, one per line" +msgstr "" + +#: includes/admin-page.php:183 +msgid "Enter one root domain per line (e.g., example.com)" +msgstr "" + +#: includes/admin-page.php:63 includes/admin-page.php:70 +msgid "Enter plugin slugs, one per line (e.g., akismet)" +msgstr "" + +#: includes/admin-page.php:186 +msgid "" +"Enter root domains (one per line) for remote installation. Subdomains are " +"automatically included." +msgstr "" + +#: includes/admin-page.php:118 includes/admin-page.php:125 +msgid "Enter theme slugs, one per line (e.g., twentytwenty)" +msgstr "" + +#: includes/admin-page.php:228 +msgid "Failed Installs" +msgstr "" + +#: includes/admin-page.php:11 +msgid "Go to Settings to add domain" +msgstr "" + +#. Author URI of the plugin +msgid "https://wpmultisite.com" +msgstr "" + +#. URI of the plugin +msgid "https://wpmultisite.com/plugins/bulk-plugin-installer/" +msgstr "" + +#: includes/admin-page.php:48 +msgid "Install multiple plugins from various sources." +msgstr "" + +#: includes/admin-page.php:103 +msgid "Install multiple themes from various sources." +msgstr "" + +#: includes/admin-page.php:47 includes/admin-page.php:95 +msgid "Install Plugins" +msgstr "" + +#: includes/admin-page.php:102 includes/admin-page.php:150 +msgid "Install Themes" +msgstr "" + +#: includes/admin-page.php:18 +msgid "" +"Installation completed! Check the results below. Failed items can be retried " +"using the \"Retry\" buttons if applicable." +msgstr "" + +#: includes/admin-page.php:15 +msgid "Installation in progress... (Large ZIP files may take some time)" +msgstr "" + +#: includes/admin-page.php:51 includes/admin-page.php:106 +msgid "Installation Source:" +msgstr "" + +#: bulk-plugin-installer.php:147 bulk-plugin-installer.php:222 +#: bulk-plugin-installer.php:297 +msgid "Insufficient permissions" +msgstr "" + +#: includes/class-installer.php:75 includes/class-installer.php:249 +msgid "Invalid installation type" +msgstr "" + +#: includes/class-installer.php:19 +msgid "" +"Invalid plugin slug format. Please use only lowercase letters, numbers and " +"hyphens." +msgstr "" + +#: includes/class-installer.php:26 +msgid "" +"Invalid theme slug format. Please use only lowercase letters, numbers and " +"hyphens." +msgstr "" + +#: includes/class-installer.php:30 +msgid "" +"Invalid URL format for theme. Please provide a complete URL including http:" +"// or https://" +msgstr "" + +#: includes/class-installer.php:20 +msgid "" +"Invalid URL format. Please provide a complete URL including http:// or https:" +"//" +msgstr "" + +#: includes/admin-page.php:232 +msgid "Last Install Time" +msgstr "" + +#: includes/admin-page.php:214 +msgid "Metric" +msgstr "" + +#: includes/admin-page.php:233 +msgid "Never Installed" +msgstr "" + +#: bulk-plugin-installer.php:160 bulk-plugin-installer.php:235 +msgid "No files uploaded" +msgstr "" + +#: bulk-plugin-installer.php:200 bulk-plugin-installer.php:275 +#: includes/class-installer.php:79 includes/class-installer.php:253 +msgid "No items provided" +msgstr "" + +#: bulk-plugin-installer.php:191 bulk-plugin-installer.php:266 +msgid "No valid files uploaded" +msgstr "" + +#: includes/class-installer.php:22 +msgid "Only ZIP files are allowed for plugin uploads." +msgstr "" + +#: includes/class-installer.php:27 +msgid "Only ZIP files are allowed for theme uploads." +msgstr "" + +#: includes/admin-page.php:20 +msgid "Please enter at least one slug." +msgstr "" + +#: includes/admin-page.php:21 +msgid "Please enter at least one URL." +msgstr "" + +#: includes/admin-page.php:19 +msgid "Please select at least one ZIP file." +msgstr "" + +#: includes/class-installer.php:110 +msgid "Plugin already installed, skipped" +msgstr "" + +#: bulk-plugin-installer.php:47 bulk-plugin-installer.php:48 +#: bulk-plugin-installer.php:59 bulk-plugin-installer.php:60 +msgid "Plugin Installer" +msgstr "" + +#: includes/admin-page.php:68 +msgid "Plugin Slugs (WenPai.org):" +msgstr "" + +#: includes/admin-page.php:61 +msgid "Plugin Slugs:" +msgstr "" + +#: includes/admin-page.php:41 +msgid "Plugins" +msgstr "" + +#: includes/admin-page.php:17 +msgid "remaining" +msgstr "" + +#: includes/admin-page.php:55 includes/admin-page.php:110 +msgid "Remote URL" +msgstr "" + +#: includes/admin-page.php:14 +msgid "Retry" +msgstr "" + +#: includes/admin-page.php:190 +msgid "Save Settings" +msgstr "" + +#: includes/admin-page.php:43 includes/admin-page.php:157 +msgid "Settings" +msgstr "" + +#: bulk-plugin-installer.php:308 +msgid "Settings saved successfully!" +msgstr "" + +#: includes/admin-page.php:201 +msgid "Statistics" +msgstr "" + +#: includes/admin-page.php:224 +msgid "Successful Installs" +msgstr "" + +#: includes/class-installer.php:230 includes/class-installer.php:431 +msgid "Successfully installed" +msgstr "" + +#: includes/admin-page.php:34 +msgid "Support" +msgstr "" + +#: includes/admin-page.php:13 +msgid "Switch to Plugins tab" +msgstr "" + +#: includes/admin-page.php:12 +msgid "Switch to Themes tab" +msgstr "" + +#: includes/class-installer.php:31 +msgid "" +"The domain is not in the trusted list for themes. Please add it in settings " +"or use another source." +msgstr "" + +#: includes/class-installer.php:21 +msgid "" +"The domain is not in the trusted list. Please add it in settings or use " +"another source." +msgstr "" + +#: includes/class-installer.php:24 +msgid "The uploaded file is not a valid WordPress plugin ZIP." +msgstr "" + +#: includes/class-installer.php:29 +msgid "The uploaded file is not a valid WordPress theme ZIP." +msgstr "" + +#: includes/class-installer.php:324 includes/class-installer.php:352 +msgid "Theme already installed, skipped" +msgstr "" + +#: includes/admin-page.php:123 +msgid "Theme Slugs (WenPai.org):" +msgstr "" + +#: includes/admin-page.php:116 +msgid "Theme Slugs:" +msgstr "" + +#: includes/admin-page.php:42 +msgid "Themes" +msgstr "" + +#: includes/class-installer.php:28 +msgid "" +"This appears to be a plugin ZIP file. Please use the Plugins tab for " +"installation." +msgstr "" + +#: includes/class-installer.php:23 +msgid "" +"This appears to be a theme ZIP file. Please use the Themes tab for " +"installation." +msgstr "" + +#: bulk-plugin-installer.php:336 +msgid "This plugin requires PHP 7.4 or higher." +msgstr "" + +#: includes/admin-page.php:220 +msgid "Total Installs" +msgstr "" + +#: includes/class-installer.php:11 +msgid "Unable to initialize filesystem. Please check server permissions." +msgstr "" + +#: bulk-plugin-installer.php:364 bulk-plugin-installer.php:375 +msgid "Upload from URL" +msgstr "" + +#: includes/admin-page.php:56 includes/admin-page.php:111 +msgid "Upload ZIP" +msgstr "" + +#: includes/admin-page.php:215 +msgid "Value" +msgstr "" + +#: includes/admin-page.php:32 +#, php-format +msgid "Version: %s" +msgstr "" + +#: includes/admin-page.php:202 +msgid "View statistics of plugin and theme installations." +msgstr "" + +#: includes/admin-page.php:54 includes/admin-page.php:109 +msgid "WenPai.org Repository (China Mirror)" +msgstr "" + +#: includes/admin-page.php:53 includes/admin-page.php:108 +msgid "WordPress.org Repository" +msgstr "" + +#. Author of the plugin +msgid "WPMultisite.com" +msgstr "" + +#: includes/admin-page.php:4 +msgid "You do not have sufficient permissions to access this page." +msgstr "" + +#: includes/admin-page.php:161 +msgid "You need administrator privileges to modify these settings." +msgstr "" + +#: includes/admin-page.php:82 includes/admin-page.php:137 +msgid "ZIP Files:" +msgstr ""