diff --git a/src/public/app/widgets/type_widgets/options/spellcheck.js b/src/public/app/widgets/type_widgets/options/spellcheck.js index 1f714ca0b..df2daa8e4 100644 --- a/src/public/app/widgets/type_widgets/options/spellcheck.js +++ b/src/public/app/widgets/type_widgets/options/spellcheck.js @@ -1,27 +1,28 @@ import utils from "../../../services/utils.js"; import OptionsWidget from "./options_widget.js"; +import { t } from "../../../services/i18n.js"; const TPL = `
`; export default class SpellcheckOptions extends OptionsWidget { diff --git a/src/public/app/widgets/type_widgets/options/sync.js b/src/public/app/widgets/type_widgets/options/sync.js index bb8e3c9dd..0b5bebf9d 100644 --- a/src/public/app/widgets/type_widgets/options/sync.js +++ b/src/public/app/widgets/type_widgets/options/sync.js @@ -1,44 +1,45 @@ import server from "../../../services/server.js"; import toastService from "../../../services/toast.js"; import OptionsWidget from "./options_widget.js"; +import { t } from "../../../services/i18n.js"; const TPL = ` `; export default class SyncOptions extends OptionsWidget { @@ -58,9 +59,8 @@ export default class SyncOptions extends OptionsWidget { if (result.success) { toastService.showMessage(result.message); - } - else { - toastService.showError(`Sync server handshake failed, error: ${result.message}`); + } else { + toastService.showError(t('sync_2.handshake_failed', { message: result.message })); } }); } diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json index 2efb60d67..92e94c935 100644 --- a/src/public/translations/cn/translation.json +++ b/src/public/translations/cn/translation.json @@ -1194,5 +1194,29 @@ "reload_app": "重新加载应用以应用更改", "set_all_to_default": "将所有快捷键重置为默认值", "confirm_reset": "您确定要将所有键盘快捷键重置为默认值吗?" + }, + "spellcheck": { + "title": "拼写检查", + "description": "这些选项仅适用于桌面版本,浏览器将使用其原生的拼写检查功能。更改后需要重启应用。", + "enable": "启用拼写检查", + "language_code_label": "语言代码", + "language_code_placeholder": "例如 \"en-US\", \"de-AT\"", + "multiple_languages_info": "多种语言可以用逗号分隔,例如 \"en-US, de-DE, cs\"。拼写检查选项的更改将在应用重启后生效。", + "available_language_codes_label": "可用的语言代码:" + }, + "sync_2": { + "config_title": "同步配置", + "server_address": "服务器地址", + "timeout": "同步超时(单位:毫秒)", + "proxy_label": "同步代理服务器(可选)", + "note": "注意", + "note_description": "代理设置留空则使用系统代理(仅桌面客户端有效)。", + "special_value_description": "另一个特殊值是noproxy
,它强制忽略系统代理并遵守 NODE_TLS_REJECT_UNAUTHORIZED
。",
+ "save": "保存",
+ "help": "帮助",
+ "test_title": "同步测试",
+ "test_description": "测试和同步服务器之间的连接。如果同步服务器没有初始化,会将本地文档同步到同步服务器上。",
+ "test_button": "测试同步",
+ "handshake_failed": "同步服务器握手失败,错误:{{message}}"
}
}
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index 1fc78b79e..45c7058d0 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -1195,5 +1195,29 @@
"reload_app": "Reload app to apply changes",
"set_all_to_default": "Set all shortcuts to the default",
"confirm_reset": "Do you really want to reset all keyboard shortcuts to the default?"
+ },
+ "spellcheck": {
+ "title": "Spell Check",
+ "description": "These options apply only for desktop builds, browsers will use their own native spell check. App restart is required after change.",
+ "enable": "Enable spellcheck",
+ "language_code_label": "Language code(s)",
+ "language_code_placeholder": "for example \"en-US\", \"de-AT\"",
+ "multiple_languages_info": "Multiple languages can be separated by comma, e.g. \"en-US, de-DE, cs\". Changes to the spell check options will take effect after application restart.",
+ "available_language_codes_label": "Available language codes:"
+ },
+ "sync": {
+ "config_title": "Sync Configuration",
+ "server_address": "Server instance address",
+ "timeout": "Sync timeout (milliseconds)",
+ "proxy_label": "Sync proxy server (optional)",
+ "note": "Note",
+ "note_description": "If you leave the proxy setting blank, the system proxy will be used (applies to desktop/electron build only).",
+ "special_value_description": "Another special value is noproxy
which forces ignoring even the system proxy and respects NODE_TLS_REJECT_UNAUTHORIZED
.",
+ "save": "Save",
+ "help": "Help",
+ "test_title": "Sync Test",
+ "test_description": "This will test the connection and handshake to the sync server. If the sync server isn't initialized, this will set it up to sync with the local document.",
+ "test_button": "Test sync",
+ "handshake_failed": "Sync server handshake failed, error: {{message}}"
}
}