change ja to jp

This commit is contained in:
hanyixuanten
2026-08-01 18:02:01 +08:00
parent 3fa50cb126
commit ae9d1cad4c
5 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ The plugin supports translating the main content of WordPress posts and pages, i
HTBD can generate dedicated URLs for different languages, with support for:
- Language subdirectories such as `/en/` and `/ja/`
- Language subdirectories such as `/en/` and `/jp/`
- A separate domain for each language
- Language-specific permalinks based on the configured routing mode
@@ -150,10 +150,10 @@ When English uses the `/en/` subdirectory, its translated URL is:
https://example.com/en/about/
```
When Japanese uses the `/ja/` subdirectory, its translated URL is:
When Japanese uses the `/jp/` subdirectory, its translated URL is:
```txt
https://example.com/ja/about/
https://example.com/jp/about/
```
Requests for `wp-login.php` or `wp-admin` through a target-language subdirectory or bound domain are redirected to the corresponding source-site URL. Query parameters are preserved.
+3 -3
View File
@@ -37,7 +37,7 @@ HTBD 使用百度翻译开放平台提供的翻译 API。用户可以在 WordPre
HTBD 可以为不同语言生成独立的访问地址,支持:
- 语言子目录,例如 `/en/``/ja/`
- 语言子目录,例如 `/en/``/jp/`
- 不同语言绑定不同域名
- 根据配置生成对应语言的固定链接
@@ -150,10 +150,10 @@ https://example.com/about/
https://example.com/en/about/
```
日语使用 `/ja/` 子目录时,译文地址为:
日语使用 `/jp/` 子目录时,译文地址为:
```txt
https://example.com/ja/about/
https://example.com/jp/about/
```
通过目标语言子目录或绑定域名请求 `wp-login.php``wp-admin` 时,插件会重定向到源站对应地址,并保留查询参数。
+1 -1
View File
@@ -101,7 +101,7 @@ class HTBD_Admin {
<table class="form-table" role="presentation">
<tr><th scope="row"><?php esc_html_e( 'Source language detection', 'hyx-translator-for-baidu-translate' ); ?></th><td><label for="htbd-auto-detect-source-language"><input id="htbd-auto-detect-source-language" name="htbd_settings[auto_detect_source_language]" type="checkbox" value="1" <?php checked( $settings['auto_detect_source_language'] ); ?> /> <?php esc_html_e( 'Automatically detect the source language', 'hyx-translator-for-baidu-translate' ); ?></label></td></tr>
<tr id="htbd-source-language-row"<?php echo $settings['auto_detect_source_language'] ? ' style="display:none"' : ''; ?>><th scope="row"><label for="htbd-source-language"><?php esc_html_e( 'Source language', 'hyx-translator-for-baidu-translate' ); ?></label></th><td><input id="htbd-source-language" name="htbd_settings[source_language]" type="text" value="<?php echo esc_attr( $settings['source_language'] ); ?>" /><p class="description"><?php esc_html_e( 'Use a Baidu Translate language code, for example zh.', 'hyx-translator-for-baidu-translate' ); ?></p></td></tr>
<tr><th scope="row"><label for="htbd-target-languages"><?php esc_html_e( 'Target languages', 'hyx-translator-for-baidu-translate' ); ?></label></th><td><input id="htbd-target-languages" name="htbd_settings[target_languages]" type="text" value="<?php echo esc_attr( implode( ',', $settings['target_languages'] ) ); ?>" class="regular-text" /><p class="description"><?php esc_html_e( 'Separate multiple language codes with commas, for example en,ja.', 'hyx-translator-for-baidu-translate' ); ?></p></td></tr>
<tr><th scope="row"><label for="htbd-target-languages"><?php esc_html_e( 'Target languages', 'hyx-translator-for-baidu-translate' ); ?></label></th><td><input id="htbd-target-languages" name="htbd_settings[target_languages]" type="text" value="<?php echo esc_attr( implode( ',', $settings['target_languages'] ) ); ?>" class="regular-text" /><p class="description"><?php esc_html_e( 'Separate multiple language codes with commas, for example en,jp.', 'hyx-translator-for-baidu-translate' ); ?></p></td></tr>
<tr><th scope="row"><?php esc_html_e( 'URL mode', 'hyx-translator-for-baidu-translate' ); ?></th><td><fieldset id="htbd-routing-mode"><label><input type="checkbox" name="htbd_settings[routing_mode][]" value="subdirectory" <?php checked( in_array( 'subdirectory', $settings['routing_mode'], true ) ); ?> /> <?php esc_html_e( 'Subdirectory', 'hyx-translator-for-baidu-translate' ); ?></label><br /><label><input type="checkbox" name="htbd_settings[routing_mode][]" value="domain" <?php checked( in_array( 'domain', $settings['routing_mode'], true ) ); ?> /> <?php esc_html_e( 'Domain', 'hyx-translator-for-baidu-translate' ); ?></label></fieldset></td></tr>
<tr id="htbd-domain-bindings-row"<?php echo in_array( 'domain', $settings['routing_mode'], true ) ? '' : ' style="display:none"'; ?>><th scope="row"><label for="htbd-domain-bindings"><?php esc_html_e( 'Domain bindings', 'hyx-translator-for-baidu-translate' ); ?></label></th><td><textarea id="htbd-domain-bindings" name="htbd_settings[domain_bindings]" rows="4" class="large-text" placeholder="en.example.com=en"><?php echo esc_textarea( implode( "\n", $bindings ) ); ?></textarea><p class="description"><?php esc_html_e( 'Enter one domain=language code pair per line, for example en.example.com=en. Do not include https://, a path, or a port.', 'hyx-translator-for-baidu-translate' ); ?></p></td></tr>
<tr><th scope="row"><label for="htbd-baidu-app-id"><?php esc_html_e( 'Baidu application ID', 'hyx-translator-for-baidu-translate' ); ?></label></th><td><input id="htbd-baidu-app-id" name="htbd_settings[baidu_app_id]" type="text" value="<?php echo esc_attr( $settings['baidu_app_id'] ); ?>" class="regular-text" /></td></tr>
@@ -47,8 +47,8 @@ msgstr "使用百度翻译语言代码,例如 zh。"
msgid "Target languages"
msgstr "目标语言"
msgid "Separate multiple language codes with commas, for example en,ja."
msgstr "多个语言代码用英文逗号分隔,例如 en,ja。"
msgid "Separate multiple language codes with commas, for example en,jp."
msgstr "多个语言代码用英文逗号分隔,例如 en,jp。"
msgid "URL mode"
msgstr "网址模式"
@@ -59,7 +59,7 @@ msgid "Target languages"
msgstr ""
#: includes/class-admin.php:96
msgid "Separate multiple language codes with commas, for example en,ja."
msgid "Separate multiple language codes with commas, for example en,jp."
msgstr ""
#: includes/class-admin.php:97