From 9160cee9191a6e91febb37956d4d90739a9a2b5b Mon Sep 17 00:00:00 2001 From: ousugo Date: Tue, 21 Jan 2025 02:21:16 +0800 Subject: [PATCH] feat: add WebDAV backup hour options and optimize english hour translations --- src/renderer/src/i18n/locales/en-us.json | 3 +++ src/renderer/src/i18n/locales/ja-jp.json | 1 + src/renderer/src/i18n/locales/ru-ru.json | 1 + src/renderer/src/i18n/locales/zh-cn.json | 1 + src/renderer/src/i18n/locales/zh-tw.json | 1 + .../settings/DataSettings/WebDavSettings.tsx | 15 +++++++++++---- 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 34af3c75..fb9be262 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -375,7 +375,10 @@ "webdav.path": "WebDAV Path", "webdav.path.placeholder": "/backup", "webdav.autoSync": "Auto Backup", + "webdav.minute": "Minute", "webdav.minutes": "Minutes", + "webdav.hour": "Hour", + "webdav.hours": "Hours", "webdav.restore.button": "Restore from WebDAV", "webdav.title": "WebDAV", "webdav.user": "WebDAV User", diff --git a/src/renderer/src/i18n/locales/ja-jp.json b/src/renderer/src/i18n/locales/ja-jp.json index d3cb3b94..2129cb61 100644 --- a/src/renderer/src/i18n/locales/ja-jp.json +++ b/src/renderer/src/i18n/locales/ja-jp.json @@ -374,6 +374,7 @@ "webdav.path.placeholder": "/backup", "webdav.autoSync": "自動バックアップ", "webdav.minutes": "分", + "webdav.hours": "時間", "webdav.restore.button": "WebDAVから復元", "webdav.title": "WebDAV", "webdav.user": "WebDAVユーザー", diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json index d00468b2..8db41968 100644 --- a/src/renderer/src/i18n/locales/ru-ru.json +++ b/src/renderer/src/i18n/locales/ru-ru.json @@ -376,6 +376,7 @@ "webdav.path.placeholder": "/backup", "webdav.autoSync": "Автоматическое резервное копирование", "webdav.minutes": "минут", + "webdav.hours": "часов", "webdav.restore.button": "Восстановление с WebDAV", "webdav.title": "WebDAV", "webdav.user": "Пользователь WebDAV", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index cd79aaf3..3b02384d 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -377,6 +377,7 @@ "webdav.path.placeholder": "/backup", "webdav.autoSync": "自动备份", "webdav.minutes": "分钟", + "webdav.hours": "小时", "webdav.restore.button": "从 WebDAV 恢复", "webdav.title": "WebDAV", "webdav.user": "WebDAV 用户名", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 3922eed7..870136d9 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -376,6 +376,7 @@ "webdav.path.placeholder": "/backup", "webdav.autoSync": "自動備份", "webdav.minutes": "分鐘", + "webdav.hours": "小時", "webdav.restore.button": "從 WebDAV 恢復", "webdav.title": "WebDAV", "webdav.user": "WebDAV 使用者名稱", diff --git a/src/renderer/src/pages/settings/DataSettings/WebDavSettings.tsx b/src/renderer/src/pages/settings/DataSettings/WebDavSettings.tsx index 0f0b5ca9..e2ed1802 100644 --- a/src/renderer/src/pages/settings/DataSettings/WebDavSettings.tsx +++ b/src/renderer/src/pages/settings/DataSettings/WebDavSettings.tsx @@ -40,7 +40,7 @@ const WebDavSettings: FC = () => { const dispatch = useAppDispatch() - const { t } = useTranslation() + const { t, i18n } = useTranslation() const { webdavSync } = useRuntime() @@ -168,12 +168,19 @@ const WebDavSettings: FC = () => { {t('settings.data.webdav.autoSync')} {webdavSync && syncInterval > 0 && (