Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve I18N Issues Based on version 0.5 #104

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions includes/class-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function reset_admin_notice() {
isset( $_GET['reset-success-nonce'] ) &&
wp_verify_nonce( sanitize_key( $_GET['reset-success-nonce'] ), 'aspireupdate-reset-success-nonce' )
) {
echo '<div class="notice notice-success is-dismissible"><p>Settings have been reset to default.</p></div>';
echo '<div class="notice notice-success is-dismissible"><p>' . esc_html__( 'Settings have been reset to default.', 'AspireUpdate' ) . '</p></div>';
delete_option( 'aspireupdate-reset' );
}
}
Expand Down Expand Up @@ -276,8 +276,8 @@ public function the_settings_page() {
do_settings_sections( 'aspireupdate-settings' );
?>
<p class="submit">
<input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes">
<a href="<?php echo esc_url( $reset_url ); ?>" class="button button-secondary" >Reset</a>
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e( 'Save Changes', 'AspireUpdate' ); ?>">
<a href="<?php echo esc_url( $reset_url ); ?>" class="button button-secondary" ><?php esc_html_e( 'Reset', 'AspireUpdate' ); ?></a>
</p>
</form>
</div>
Expand Down Expand Up @@ -352,7 +352,7 @@ public function register_settings() {
),
array(
'value' => 'other',
'label' => 'Other',
'label' => esc_html__( 'Other', 'AspireUpdate' ),
'require-api-key' => 'false',
),
),
Expand Down Expand Up @@ -491,7 +491,7 @@ public function add_settings_field_callback( $args = array() ) {
case 'api-key':
?>
<input type="text" id="aspireupdate-settings-field-<?php echo esc_attr( $id ); ?>" name="<?php echo esc_attr( $this->option_name ); ?>[<?php echo esc_attr( $id ); ?>]" value="<?php echo esc_attr( $options[ $id ] ?? '' ); ?>" class="regular-text" />
<input type="button" id="aspireupdate-generate-api-key" value="Generate API Key" title="Generate API Key" />
<input type="button" id="aspireupdate-generate-api-key" value="Generate API Key" title="<?php esc_attr_e( 'Generate API Key', 'AspireUpdate' ); ?>" />
<p class="error"></p>
<?php
break;
Expand Down
2 changes: 2 additions & 0 deletions languages/AspireUpdate-zh_TW.l10n.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
return ['domain'=>NULL,'plural-forms'=>NULL,'language'=>'zh_TW','project-id-version'=>'AspireUpdate','pot-creation-date'=>'2024-11-02 12:34-0700','po-revision-date'=>'2024-11-02 12:40-0700','x-generator'=>'Poedit 3.5','messages'=>['Settings have been reset to default.'=>'設定已重設為預設值。','AspireUpdate Settings'=>'AspireUpdate 設定','Save Changes'=>'儲存設定','Reset'=>'重設','API Configuration'=>'API 組態','Enable AspireUpdate API Rewrites'=>'啟用 AspireUpdate API 重寫','API Host'=>'API 主機','Your new API Host.'=>'設定新的 API 主機。','Other'=>'其他主機','API Key'=>'API 金鑰','Provides an API key for repositories that may require authentication.'=>'為需要驗證的存放庫提供 API 金鑰。','API Debug Configuration'=>'API 偵錯組態','Enable Debug Mode'=>'啟用偵錯模式','Enables debug mode for the plugin.'=>'為外掛啟用偵錯模式。','Enable Debug Type'=>'啟用偵錯類型','Request'=>'要求','Response'=>'回應','String'=>'字串','Outputs the request URL and headers / response headers and body / string that is being rewritten.'=>'輸出經過重寫的要求網址、標頭、回應標頭、內容及字串。','Disable SSL Verification'=>'停用 SSL 驗證','Disables the verification of SSL to allow local testing.'=>'停用 SSL 驗證,便能在本機環境進行測試。','Generate API Key'=>'產生 API 金鑰','AspireUpdate'=>'AspireUpdate','https://aspirepress.org/'=>'https://aspirepress.org/','Update plugins and themes for WordPress.'=>'更新 WordPress 的外掛及佈景主題。','AspirePress'=>'AspirePress','https://docs.aspirepress.org/aspireupdate/'=>'https://docs.aspirepress.org/aspireupdate/']];
Binary file added languages/AspireUpdate-zh_TW.mo
Binary file not shown.
131 changes: 131 additions & 0 deletions languages/AspireUpdate-zh_TW.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
msgid ""
msgstr ""
"Project-Id-Version: AspireUpdate\n"
"POT-Creation-Date: 2024-11-02 12:34-0700\n"
"PO-Revision-Date: 2024-11-02 12:40-0700\n"
"Last-Translator: Alex Lion <[email protected]>\n"
"Language-Team: Alex Lion <[email protected]>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.5\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: aspire-update.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.min.js\n"

#: includes/class-admin-settings.php:119
msgid "Settings have been reset to default."
msgstr "設定已重設為預設值。"

#: includes/class-admin-settings.php:272
msgid "AspireUpdate Settings"
msgstr "AspireUpdate 設定"

#: includes/class-admin-settings.php:279
msgid "Save Changes"
msgstr "儲存設定"

#: includes/class-admin-settings.php:280
msgid "Reset"
msgstr "重設"

#: includes/class-admin-settings.php:313
msgid "API Configuration"
msgstr "API 組態"

#: includes/class-admin-settings.php:324
msgid "Enable AspireUpdate API Rewrites"
msgstr "啟用 AspireUpdate API 重寫"

#: includes/class-admin-settings.php:337
msgid "API Host"
msgstr "API 主機"

#: includes/class-admin-settings.php:345
msgid "Your new API Host."
msgstr "設定新的 API 主機。"

#: includes/class-admin-settings.php:355
msgid "Other"
msgstr "其他主機"

#: includes/class-admin-settings.php:364
msgid "API Key"
msgstr "API 金鑰"

#: includes/class-admin-settings.php:372
msgid "Provides an API key for repositories that may require authentication."
msgstr "為需要驗證的存放庫提供 API 金鑰。"

#: includes/class-admin-settings.php:378
msgid "API Debug Configuration"
msgstr "API 偵錯組態"

#: includes/class-admin-settings.php:389
msgid "Enable Debug Mode"
msgstr "啟用偵錯模式"

#: includes/class-admin-settings.php:397
msgid "Enables debug mode for the plugin."
msgstr "為外掛啟用偵錯模式。"

#: includes/class-admin-settings.php:403
msgid "Enable Debug Type"
msgstr "啟用偵錯類型"

#: includes/class-admin-settings.php:412
msgid "Request"
msgstr "要求"

#: includes/class-admin-settings.php:413
msgid "Response"
msgstr "回應"

#: includes/class-admin-settings.php:414
msgid "String"
msgstr "字串"

#: includes/class-admin-settings.php:416
msgid ""
"Outputs the request URL and headers / response headers and body / string "
"that is being rewritten."
msgstr "輸出經過重寫的要求網址、標頭、回應標頭、內容及字串。"

#: includes/class-admin-settings.php:422
msgid "Disable SSL Verification"
msgstr "停用 SSL 驗證"

#: includes/class-admin-settings.php:431
msgid "Disables the verification of SSL to allow local testing."
msgstr "停用 SSL 驗證,便能在本機環境進行測試。"

#: includes/class-admin-settings.php:494
msgid "Generate API Key"
msgstr "產生 API 金鑰"

#. Plugin Name of the plugin/theme
msgid "AspireUpdate"
msgstr "AspireUpdate"

#. Plugin URI of the plugin/theme
msgid "https://aspirepress.org/"
msgstr "https://aspirepress.org/"

#. Description of the plugin/theme
msgid "Update plugins and themes for WordPress."
msgstr "更新 WordPress 的外掛及佈景主題。"

#. Author of the plugin/theme
msgid "AspirePress"
msgstr "AspirePress"

#. Author URI of the plugin/theme
msgid "https://docs.aspirepress.org/aspireupdate/"
msgstr "https://docs.aspirepress.org/aspireupdate/"