diff --git a/core/app/service/script_library.go b/core/app/service/script_library.go index cc2727132..be4e09dc1 100644 --- a/core/app/service/script_library.go +++ b/core/app/service/script_library.go @@ -188,8 +188,11 @@ func (u *ScriptService) Sync(req dto.OperateByTaskID) error { } var scriptSetting model.Setting _ = global.DB.Where("key = ?", "ScriptVersion").First(&scriptSetting).Error - if scriptSetting.Value == string(versionRes) { - syncTask.Logf("The local-%s and remote-%s versions are detected to be consistent. Skip...", scriptSetting.Value, versionRes) + localVersion := strings.ReplaceAll(string(versionRes), "\n", "") + remoteVersion := strings.ReplaceAll(scriptSetting.Value, "\n", "") + + syncTask.Log(i18n.GetMsgWithMap("ScriptVersion", map[string]interface{}{"localVersion": localVersion, "remoteVersion": remoteVersion})) + if localVersion == remoteVersion { return nil } diff --git a/core/i18n/lang/en.yaml b/core/i18n/lang/en.yaml index 37931328f..47134ace9 100644 --- a/core/i18n/lang/en.yaml +++ b/core/i18n/lang/en.yaml @@ -93,6 +93,7 @@ SubTask: "Subtask" #script ScriptLibrary: "Script Library" +ScriptVersion: "Local: {{ .localVersion }}, Remote: {{ .remoteVersion }}" Node: "Node" SyncNode: "Sync node data" diff --git a/core/i18n/lang/ja.yaml b/core/i18n/lang/ja.yaml index e797b6228..15f442bbc 100644 --- a/core/i18n/lang/ja.yaml +++ b/core/i18n/lang/ja.yaml @@ -94,6 +94,7 @@ SubTask: "サブタスク" #script ScriptLibrary: "スクリプトライブラリ" +ScriptVersion: "ローカル: {{ .localVersion }}, リモート: {{ .remoteVersion }}" Node: "ノード" SyncNode: "ノードデータ同期" diff --git a/core/i18n/lang/ko.yaml b/core/i18n/lang/ko.yaml index 2fd5791fc..652f7ebd3 100644 --- a/core/i18n/lang/ko.yaml +++ b/core/i18n/lang/ko.yaml @@ -93,6 +93,7 @@ SubTask: "서브 작업" #script ScriptLibrary: "스크립트 라이브러리" +ScriptVersion: "로컬: {{ .localVersion }}, 원격: {{ .remoteVersion }}" Node: "노드" SyncNode: "노드 데이터 동기화" diff --git a/core/i18n/lang/ms.yml b/core/i18n/lang/ms.yml index 649abb99f..c33f7eb3b 100644 --- a/core/i18n/lang/ms.yml +++ b/core/i18n/lang/ms.yml @@ -93,6 +93,7 @@ SubTask: "Tugas Sub" #script ScriptLibrary: "Pustaka Skrip" +ScriptVersion: "Tempatan: {{ .localVersion }}, Jauh: {{ .remoteVersion }}" Node: "Nod" SyncNode: "Segerakkan data nod" diff --git a/core/i18n/lang/pt-BR.yaml b/core/i18n/lang/pt-BR.yaml index e6f3a8c26..6416b3991 100644 --- a/core/i18n/lang/pt-BR.yaml +++ b/core/i18n/lang/pt-BR.yaml @@ -93,6 +93,7 @@ SubTask: "Subtarefa" #script ScriptLibrary: "Biblioteca de Scripts" +ScriptVersion: "Local: {{ .localVersion }}, Remoto: {{ .remoteVersion }}" Node: "Nó" SyncNode: "Sincronizar dados do nó" diff --git a/core/i18n/lang/ru.yaml b/core/i18n/lang/ru.yaml index 7c9d573e4..9ab0fe849 100644 --- a/core/i18n/lang/ru.yaml +++ b/core/i18n/lang/ru.yaml @@ -93,6 +93,7 @@ SubTask: "Подзадача" #script ScriptLibrary: "Библиотека скриптов" +ScriptVersion: "Локальная: {{ .localVersion }}, Удалённая: {{ .remoteVersion }}" Node: "Узел" SyncNode: "Синхронизация данных узла" diff --git a/core/i18n/lang/zh-Hant.yaml b/core/i18n/lang/zh-Hant.yaml index ad1549ffe..5d125183d 100644 --- a/core/i18n/lang/zh-Hant.yaml +++ b/core/i18n/lang/zh-Hant.yaml @@ -93,6 +93,7 @@ SubTask: "子任務" #script ScriptLibrary: "腳本庫" +ScriptVersion: "本地: {{ .localVersion }}, 遠端: {{ .remoteVersion }}" #sync node Node: "節點" diff --git a/core/i18n/lang/zh.yaml b/core/i18n/lang/zh.yaml index ca64878ca..acd151147 100644 --- a/core/i18n/lang/zh.yaml +++ b/core/i18n/lang/zh.yaml @@ -93,6 +93,7 @@ SubTask: "子任务" #script ScriptLibrary: "脚本库" +ScriptVersion: "本地:{{ .localVersion }}, 远程:{{ .remoteVersion }}" #sync node Node: "节点"