From 5a70bea67ad7b40ce349e4179f4a578b1228a6fe Mon Sep 17 00:00:00 2001 From: Yuma Matsuura Date: Mon, 28 May 2018 16:00:32 +0900 Subject: [PATCH] add translate project diff --- editor/js/ui/diff.js | 12 ++++++------ red/api/editor/locales/en-US/editor.json | 8 ++++++-- red/api/editor/locales/ja/editor.json | 7 ++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/editor/js/ui/diff.js b/editor/js/ui/diff.js index 4a305eb6c..97a92178b 100644 --- a/editor/js/ui/diff.js +++ b/editor/js/ui/diff.js @@ -1233,7 +1233,7 @@ RED.diff = (function() { // currentDiff = diff; var trayOptions = { - title: options.title||"Review Changes", //TODO: nls + title: options.title||RED._("diff.reviewChanges"), width: Infinity, overlay: true, buttons: [ @@ -1416,7 +1416,7 @@ RED.diff = (function() { function showTextDiff(textA,textB) { var trayOptions = { - title: "Compare Changes", //TODO: nls + title: RED._("diff.compareChanges"), width: Infinity, overlay: true, buttons: [ @@ -1797,7 +1797,7 @@ RED.diff = (function() { if (isBinary) { var diffBinaryRow = $('').appendTo(codeBody); var binaryContent = $('').appendTo(diffBinaryRow); - $('').text("Cannot show binary file contents").appendTo(binaryContent); + $('').text(RED._("diff.noBinaryFileShowed")).appendTo(binaryContent); } else { if (commitOptions.unmerged) { @@ -1946,7 +1946,7 @@ RED.diff = (function() { function showCommitDiff(options) { var commit = parseCommitDiff(options.commit); var trayOptions = { - title: "View Commit Changes", //TODO: nls + title: RED._("diff.viewCommitDiff"), width: Infinity, overlay: true, buttons: [ @@ -2008,7 +2008,7 @@ RED.diff = (function() { } var trayOptions = { - title: title||"Compare Changes", //TODO: nls + title: title|| RED._("diff.compareChanges"), width: Infinity, overlay: true, buttons: [ @@ -2041,7 +2041,7 @@ RED.diff = (function() { trayOptions.buttons.push( { id: "node-diff-view-resolve-diff", - text: "Save conflict resolution", + text: RED._("diff.saveConflict"), class: "primary disabled", click: function() { if (!$("#node-diff-view-resolve-diff").hasClass('disabled')) { diff --git a/red/api/editor/locales/en-US/editor.json b/red/api/editor/locales/en-US/editor.json index d827ba092..bcfe55972 100644 --- a/red/api/editor/locales/en-US/editor.json +++ b/red/api/editor/locales/en-US/editor.json @@ -193,8 +193,12 @@ "nodeCount": "__count__ node", "nodeCount_plural": "__count__ nodes", "local":"Local changes", - "remote":"Remote changes" - + "remote":"Remote changes", + "reviewChanges": "Review Changes", + "noBinaryFileShowed": "Cannot show binary file contents", + "viewCommitDiff": "View Commit Changes", + "compareChanges": "Compare Changes", + "saveConflict": "Save conflict resolution" }, "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 68e4fc517..8d3c958ff 100644 --- a/red/api/editor/locales/ja/editor.json +++ b/red/api/editor/locales/ja/editor.json @@ -188,7 +188,12 @@ "nodeCount": "__count__ 個のノード", "nodeCount_plural": "__count__ 個のノード", "local": "ローカルの変更", - "remote": "リモートの変更" + "remote": "リモートの変更", + "reviewChanges": "変更を表示", + "noBinaryFileShowed": "バイナリファイルの中身は表示することができません", + "viewCommitDiff": "コミットの内容を表示", + "compareChanges": "変更を比較", + "saveConflict": "解決して保存" }, "subflow": { "editSubflow": "フローのテンプレートを編集: __name__",