From 2dfb5b38e98d44e6f591aeb2d62da0cdd727e719 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 15 Mar 2023 11:46:30 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=B3=BB=E7=BB=9F=E6=97=B6=E9=97=B4=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=20https://github.com/siyuan-note/siyuan/issues/7669?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/appearance/langs/en_US.json | 3 ++- app/appearance/langs/es_ES.json | 3 ++- app/appearance/langs/fr_FR.json | 3 ++- app/appearance/langs/zh_CHT.json | 3 ++- app/appearance/langs/zh_CN.json | 3 ++- kernel/go.mod | 2 +- kernel/go.sum | 6 ++++++ kernel/model/sync.go | 2 ++ 8 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index 85bd6098b..f0d631c59 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1117,6 +1117,7 @@ "191": "[%d/%d] Created historical data index", "192": "Rebuilding historical data index, please wait...", "193": "Please refer to the [Artificial Intelligence] chapter of the User Guide for configuration", - "194": "There are restrictions on the Nutstore interface, please use other WebDAV services" + "194": "There are restrictions on the Nutstore interface, please use other WebDAV services", + "195": "The system time is incorrect, please calibrate the system time and try again" } } diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index 875ee952a..f51994064 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1117,6 +1117,7 @@ "191": "[%d/%d] Índice de datos históricos creado", "192": "Reconstruyendo el índice de datos históricos, espere...", "193": "Consulte el capítulo [Inteligencia artificial] de la guía del usuario para la configuración", - "194": "Existen restricciones en la interfaz de Nutstore, utilice otros servicios WebDAV" + "194": "Existen restricciones en la interfaz de Nutstore, utilice otros servicios WebDAV", + "195": "La hora del sistema es incorrecta, calibre la hora del sistema y vuelva a intentarlo" } } diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 21857888d..9ea12b5b7 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1117,6 +1117,7 @@ "191": "[%d/%d] Création d'un index de données historiques", "192": "Reconstruction de l'index des données historiques, veuillez patienter...", "193": "Veuillez vous référer au chapitre [Intelligence Artificielle] du guide de l'utilisateur pour la configuration", - "194": "Il existe des restrictions sur l'interface Nutstore, veuillez utiliser d'autres services WebDAV" + "194": "Il existe des restrictions sur l'interface Nutstore, veuillez utiliser d'autres services WebDAV", + "195": "L'heure du système est incorrecte, veuillez calibrer l'heure du système et réessayer" } } diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 964ba0c0f..43b2893d5 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1117,6 +1117,7 @@ "191": "[%d/%d] 已經建立條歷史數據索引", "192": "正在重建歷史數據索引,請稍等...", "193": "請先參考用戶指南 [人工智能] 章節進行配置", - "194": "堅果雲接口存在限制,請使用其他 WebDAV 服務" + "194": "堅果雲接口存在限制,請使用其他 WebDAV 服務", + "195": "系統時間不正確,請校準系統時間後再試" } } diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 68dcaf9c1..448202b73 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1117,6 +1117,7 @@ "191": "[%d/%d] 已经建立条历史数据索引", "192": "正在重建历史数据索引,请稍等...", "193": "请先参考用户指南 [人工智能] 章节进行配置", - "194": "坚果云接口存在限制,请使用其他 WebDAV 服务" + "194": "坚果云接口存在限制,请使用其他 WebDAV 服务", + "195": "系统时间不正确,请校准系统时间后再试" } } diff --git a/kernel/go.mod b/kernel/go.mod index 40721545b..c94ecbbe6 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -42,7 +42,7 @@ require ( github.com/radovskyb/watcher v1.0.7 github.com/sashabaranov/go-gpt3 v1.4.0 github.com/shirou/gopsutil/v3 v3.23.2 - github.com/siyuan-note/dejavu v0.0.0-20230315030141-aa009a045727 + github.com/siyuan-note/dejavu v0.0.0-20230315034343-e9513a7e1999 github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b github.com/siyuan-note/filelock v0.0.0-20230223100551-200cbe1cf84e diff --git a/kernel/go.sum b/kernel/go.sum index 4579cf87d..be886b6bb 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -279,6 +279,12 @@ github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+ github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= github.com/siyuan-note/dejavu v0.0.0-20230315030141-aa009a045727 h1:FkwDzml+y1Vr0KBMdO4AU7/t+1grcSq/RA4xub9F6LU= github.com/siyuan-note/dejavu v0.0.0-20230315030141-aa009a045727/go.mod h1:KUsHkTYpibU30rUArZOakCCHF1SGHQlxPWUu2LqW72s= +github.com/siyuan-note/dejavu v0.0.0-20230315033328-1ba6b15d02ba h1:GJUcrnYvt92w3VIO+8RaiYzDyl9EYucm6XO+i8amxh4= +github.com/siyuan-note/dejavu v0.0.0-20230315033328-1ba6b15d02ba/go.mod h1:KUsHkTYpibU30rUArZOakCCHF1SGHQlxPWUu2LqW72s= +github.com/siyuan-note/dejavu v0.0.0-20230315033551-2d5f5db2919f h1:Aqrf755AR9zGMFYAfLyZ1kIdQi5x2c8YXGxLULNHD6M= +github.com/siyuan-note/dejavu v0.0.0-20230315033551-2d5f5db2919f/go.mod h1:KUsHkTYpibU30rUArZOakCCHF1SGHQlxPWUu2LqW72s= +github.com/siyuan-note/dejavu v0.0.0-20230315034343-e9513a7e1999 h1:t4FSwNVaa2CJbAIJNyF5egCdgqAeBDbP0WmGXcPBbGs= +github.com/siyuan-note/dejavu v0.0.0-20230315034343-e9513a7e1999/go.mod h1:KUsHkTYpibU30rUArZOakCCHF1SGHQlxPWUu2LqW72s= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw= github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b h1:828lTUW2C0uNiolODqoACu7J8sDUzswD4Xo04mUombg= diff --git a/kernel/model/sync.go b/kernel/model/sync.go index 36e03b9f7..1d570c1aa 100644 --- a/kernel/model/sync.go +++ b/kernel/model/sync.go @@ -505,6 +505,8 @@ func formatErrorMsg(err error) string { msg = Conf.Language(189) } else if errors.Is(err, dejavu.ErrRepoFatalErr) { msg = Conf.Language(23) + } else if errors.Is(err, cloud.ErrSystemTimeIncorrect) { + msg = Conf.Language(195) } else { msgLowerCase := strings.ToLower(msg) if strings.Contains(msgLowerCase, "permission denied") || strings.Contains(msg, "access is denied") {