mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #1748 from node-red-hitachi/0.19-editor-diff-i18n-jp
Add i18n support for project
This commit is contained in:
commit
95b4c8d515
@ -1233,7 +1233,7 @@ RED.diff = (function() {
|
|||||||
// currentDiff = diff;
|
// currentDiff = diff;
|
||||||
|
|
||||||
var trayOptions = {
|
var trayOptions = {
|
||||||
title: options.title||"Review Changes", //TODO: nls
|
title: options.title||RED._("diff.reviewChanges"),
|
||||||
width: Infinity,
|
width: Infinity,
|
||||||
overlay: true,
|
overlay: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
@ -1416,7 +1416,7 @@ RED.diff = (function() {
|
|||||||
|
|
||||||
function showTextDiff(textA,textB) {
|
function showTextDiff(textA,textB) {
|
||||||
var trayOptions = {
|
var trayOptions = {
|
||||||
title: "Compare Changes", //TODO: nls
|
title: RED._("diff.compareChanges"),
|
||||||
width: Infinity,
|
width: Infinity,
|
||||||
overlay: true,
|
overlay: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
@ -1747,7 +1747,7 @@ RED.diff = (function() {
|
|||||||
try {
|
try {
|
||||||
commonFlow = JSON.parse(commonVersion.content||"[]");
|
commonFlow = JSON.parse(commonVersion.content||"[]");
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log("Common Version doesn't contain valid JSON:",commonVersionUrl);
|
console.log(RED._("diff.commonVersionError"),commonVersionUrl);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1755,7 +1755,7 @@ RED.diff = (function() {
|
|||||||
try {
|
try {
|
||||||
oldFlow = JSON.parse(oldVersion.content||"[]");
|
oldFlow = JSON.parse(oldVersion.content||"[]");
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log("Old Version doesn't contain valid JSON:",oldVersionUrl);
|
console.log(RED._("diff.oldVersionError"),oldVersionUrl);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1765,7 +1765,7 @@ RED.diff = (function() {
|
|||||||
try {
|
try {
|
||||||
newFlow = JSON.parse(newVersion.content||"[]");
|
newFlow = JSON.parse(newVersion.content||"[]");
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log("New Version doesn't contain valid JSON:",newFlow);
|
console.log(RED._("diff.newVersionError"),newFlow);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1797,11 +1797,11 @@ RED.diff = (function() {
|
|||||||
if (isBinary) {
|
if (isBinary) {
|
||||||
var diffBinaryRow = $('<tr class="node-text-diff-header">').appendTo(codeBody);
|
var diffBinaryRow = $('<tr class="node-text-diff-header">').appendTo(codeBody);
|
||||||
var binaryContent = $('<td colspan="3"></td>').appendTo(diffBinaryRow);
|
var binaryContent = $('<td colspan="3"></td>').appendTo(diffBinaryRow);
|
||||||
$('<span></span>').text("Cannot show binary file contents").appendTo(binaryContent);
|
$('<span></span>').text(RED._("diff.noBinaryFileShowed")).appendTo(binaryContent);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (commitOptions.unmerged) {
|
if (commitOptions.unmerged) {
|
||||||
conflictHeader = $('<span style="float: right;"><span>'+resolvedConflicts+'</span> of <span>'+unresolvedConflicts+'</span> conflicts resolved</span>').appendTo(content);
|
conflictHeader = $('<span style="float: right;">'+RED._("diff.conflictHeader",{resolved:resolvedConflicts, unresolved:unresolvedConflicts})+'</span>').appendTo(content);
|
||||||
}
|
}
|
||||||
hunks.forEach(function(hunk) {
|
hunks.forEach(function(hunk) {
|
||||||
var diffRow = $('<tr class="node-text-diff-header">').appendTo(codeBody);
|
var diffRow = $('<tr class="node-text-diff-header">').appendTo(codeBody);
|
||||||
@ -1914,7 +1914,7 @@ RED.diff = (function() {
|
|||||||
diffRow.remove();
|
diffRow.remove();
|
||||||
addedRows.find(".linetext").addClass('added');
|
addedRows.find(".linetext").addClass('added');
|
||||||
conflictHeader.empty();
|
conflictHeader.empty();
|
||||||
$('<span><span>'+resolvedConflicts+'</span> of <span>'+unresolvedConflicts+'</span> conflicts resolved</span>').appendTo(conflictHeader);
|
$('<span>'+RED._("diff.conflictHeader",{resolved:resolvedConflicts, unresolved:unresolvedConflicts})+'</span>').appendTo(conflictHeader);
|
||||||
|
|
||||||
conflictResolutions[file.file] = conflictResolutions[file.file] || {};
|
conflictResolutions[file.file] = conflictResolutions[file.file] || {};
|
||||||
conflictResolutions[file.file][hunk.localChangeStart] = {
|
conflictResolutions[file.file][hunk.localChangeStart] = {
|
||||||
@ -1946,7 +1946,7 @@ RED.diff = (function() {
|
|||||||
function showCommitDiff(options) {
|
function showCommitDiff(options) {
|
||||||
var commit = parseCommitDiff(options.commit);
|
var commit = parseCommitDiff(options.commit);
|
||||||
var trayOptions = {
|
var trayOptions = {
|
||||||
title: "View Commit Changes", //TODO: nls
|
title: RED._("diff.viewCommitDiff"),
|
||||||
width: Infinity,
|
width: Infinity,
|
||||||
overlay: true,
|
overlay: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
@ -2008,7 +2008,7 @@ RED.diff = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var trayOptions = {
|
var trayOptions = {
|
||||||
title: title||"Compare Changes", //TODO: nls
|
title: title|| RED._("diff.compareChanges"),
|
||||||
width: Infinity,
|
width: Infinity,
|
||||||
overlay: true,
|
overlay: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
@ -2041,7 +2041,7 @@ RED.diff = (function() {
|
|||||||
trayOptions.buttons.push(
|
trayOptions.buttons.push(
|
||||||
{
|
{
|
||||||
id: "node-diff-view-resolve-diff",
|
id: "node-diff-view-resolve-diff",
|
||||||
text: "Save conflict resolution",
|
text: RED._("diff.saveConflict"),
|
||||||
class: "primary disabled",
|
class: "primary disabled",
|
||||||
click: function() {
|
click: function() {
|
||||||
if (!$("#node-diff-view-resolve-diff").hasClass('disabled')) {
|
if (!$("#node-diff-view-resolve-diff").hasClass('disabled')) {
|
||||||
|
@ -219,8 +219,16 @@
|
|||||||
"nodeCount": "__count__ node",
|
"nodeCount": "__count__ node",
|
||||||
"nodeCount_plural": "__count__ nodes",
|
"nodeCount_plural": "__count__ nodes",
|
||||||
"local":"Local changes",
|
"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",
|
||||||
|
"conflictHeader": "<span>__resolved__</span> of <span>__unresolved__</span> 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": {
|
"subflow": {
|
||||||
"editSubflow": "Edit flow template: __name__",
|
"editSubflow": "Edit flow template: __name__",
|
||||||
|
@ -215,7 +215,16 @@
|
|||||||
"nodeCount": "__count__ 個のノード",
|
"nodeCount": "__count__ 個のノード",
|
||||||
"nodeCount_plural": "__count__ 個のノード",
|
"nodeCount_plural": "__count__ 個のノード",
|
||||||
"local": "ローカルの変更",
|
"local": "ローカルの変更",
|
||||||
"remote": "リモートの変更"
|
"remote": "リモートの変更",
|
||||||
|
"reviewChanges": "変更を表示",
|
||||||
|
"noBinaryFileShowed": "バイナリファイルの中身は表示することができません",
|
||||||
|
"viewCommitDiff": "コミットの内容を表示",
|
||||||
|
"compareChanges": "変更を比較",
|
||||||
|
"saveConflict": "解決して保存",
|
||||||
|
"conflictHeader": "<span>__unresolved__</span> 個中 <span>__resolved__</span> 個のコンフリクトを解決",
|
||||||
|
"commonVersionError": "共通バージョンは正しいJSON形式ではありません:",
|
||||||
|
"oldVersionError": "古いバージョンは正しいJSON形式ではありません:",
|
||||||
|
"newVersionError": "新しいバージョンは正しいJSON形式ではありません:"
|
||||||
},
|
},
|
||||||
"subflow": {
|
"subflow": {
|
||||||
"editSubflow": "フローのテンプレートを編集: __name__",
|
"editSubflow": "フローのテンプレートを編集: __name__",
|
||||||
|
Loading…
Reference in New Issue
Block a user