diff --git a/editor/js/ui/diff.js b/editor/js/ui/diff.js index 97a92178b..eb822df1e 100644 --- a/editor/js/ui/diff.js +++ b/editor/js/ui/diff.js @@ -1747,7 +1747,7 @@ RED.diff = (function() { try { commonFlow = JSON.parse(commonVersion.content||"[]"); } catch(err) { - console.log("Common Version doesn't contain valid JSON:",commonVersionUrl); + console.log(RED._("diff.commonVersionError"),commonVersionUrl); console.log(err); return; } @@ -1755,7 +1755,7 @@ RED.diff = (function() { try { oldFlow = JSON.parse(oldVersion.content||"[]"); } catch(err) { - console.log("Old Version doesn't contain valid JSON:",oldVersionUrl); + console.log(RED._("diff.oldVersionError"),oldVersionUrl); console.log(err); return; } @@ -1765,7 +1765,7 @@ RED.diff = (function() { try { newFlow = JSON.parse(newVersion.content||"[]"); } catch(err) { - console.log("New Version doesn't contain valid JSON:",newFlow); + console.log(RED._("diff.newVersionError"),newFlow); console.log(err); return; } @@ -1801,7 +1801,7 @@ RED.diff = (function() { } else { if (commitOptions.unmerged) { - conflictHeader = $(''+resolvedConflicts+' of '+unresolvedConflicts+' conflicts resolved').appendTo(content); + conflictHeader = $(''+RED._("diff.conflictHeader",{resolved:resolvedConflicts, unresolved:unresolvedConflicts})+'').appendTo(content); } hunks.forEach(function(hunk) { var diffRow = $('').appendTo(codeBody); @@ -1914,7 +1914,7 @@ RED.diff = (function() { diffRow.remove(); addedRows.find(".linetext").addClass('added'); conflictHeader.empty(); - $(''+resolvedConflicts+' of '+unresolvedConflicts+' conflicts resolved').appendTo(conflictHeader); + $(''+RED._("diff.conflictHeader",{resolved:resolvedConflicts, unresolved:unresolvedConflicts})+'').appendTo(conflictHeader); conflictResolutions[file.file] = conflictResolutions[file.file] || {}; conflictResolutions[file.file][hunk.localChangeStart] = { diff --git a/red/api/editor/locales/en-US/editor.json b/red/api/editor/locales/en-US/editor.json index bcfe55972..96af46b9c 100644 --- a/red/api/editor/locales/en-US/editor.json +++ b/red/api/editor/locales/en-US/editor.json @@ -198,7 +198,11 @@ "noBinaryFileShowed": "Cannot show binary file contents", "viewCommitDiff": "View Commit Changes", "compareChanges": "Compare Changes", - "saveConflict": "Save conflict resolution" + "saveConflict": "Save conflict resolution", + "conflictHeader": "__resolved__ of __unresolved__ conflicts resolved", + "commonVersionError": "Common Version doesn't contain valid JSON:", + "oldVersionError": "Old Version doesn't contain valid JSON:", + "newVersionError": "New Version doesn't contain valid JSON:" }, "subflow": { "editSubflow": "Edit flow template: __name__", diff --git a/red/api/editor/locales/ja/editor.json b/red/api/editor/locales/ja/editor.json index 8d3c958ff..17dcefb1e 100644 --- a/red/api/editor/locales/ja/editor.json +++ b/red/api/editor/locales/ja/editor.json @@ -193,7 +193,11 @@ "noBinaryFileShowed": "バイナリファイルの中身は表示することができません", "viewCommitDiff": "コミットの内容を表示", "compareChanges": "変更を比較", - "saveConflict": "解決して保存" + "saveConflict": "解決して保存", + "conflictHeader": "__unresolved__ 個中 __resolved__ 個のコンフリクトを解決", + "commonVersionError": "共通バージョンは正しいJSON形式ではありません:", + "oldVersionError": "古いバージョンは正しいJSON形式ではありません:", + "newVersionError": "新しいバージョンは正しいJSON形式ではありません:" }, "subflow": { "editSubflow": "フローのテンプレートを編集: __name__",