1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #1742 from node-red-hitachi/0.19-editor-main-i18n-jp

Update i18n support for main editor interface and Japanese message …
This commit is contained in:
Nick O'Leary 2018-05-30 10:22:38 +01:00 committed by GitHub
commit 57c4c754d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 23 deletions

View File

@ -153,13 +153,13 @@
loadFlows(function() { loadFlows(function() {
var project = RED.projects.getActiveProject(); var project = RED.projects.getActiveProject();
var message = { var message = {
"change-branch":"Change to local branch '"+project.git.branches.local+"'", "change-branch": RED._("notification.project.change-branch", {project: project.git.branches.local}),
"merge-abort":"Git merge aborted", "merge-abort": RED._("notification.project.merge-abort"),
"loaded":"Project '"+msg.project+"' loaded", "loaded": RED._("notification.project.loaded", {project: msg.project}),
"updated":"Project '"+msg.project+"' updated", "updated": RED._("notification.project.updated", {project: msg.project}),
"pull":"Project '"+msg.project+"' reloaded", "pull": RED._("notification.project.pull", {project: msg.project}),
"revert": "Project '"+msg.project+"' reloaded", "revert": RED._("notification.project.revert", {project: msg.project}),
"merge-complete":"Git merge completed" "merge-complete": RED._("notification.project.merge-complete")
}[msg.action]; }[msg.action];
RED.notify("<p>"+message+"</p>"); RED.notify("<p>"+message+"</p>");
RED.sidebar.info.refresh() RED.sidebar.info.refresh()
@ -183,7 +183,7 @@
if (!!RED.projects.getActiveProject()) { if (!!RED.projects.getActiveProject()) {
options.buttons = [ options.buttons = [
{ {
text: "Manage project dependencies", text: RED._("notification.label.manage-project-dep"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
RED.projects.settings.show('deps'); RED.projects.settings.show('deps');
@ -194,7 +194,7 @@
} else { } else {
options.buttons = [ options.buttons = [
{ {
text: "Close", text: RED._("common.label.close"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
} }
@ -207,7 +207,7 @@
if (RED.user.hasPermission("projects.write")) { if (RED.user.hasPermission("projects.write")) {
options.buttons = [ options.buttons = [
{ {
text: "Setup credentials", text: RED._("notification.label.setup-cred"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
RED.projects.showCredentialsPrompt(); RED.projects.showCredentialsPrompt();
@ -218,7 +218,7 @@
} else { } else {
options.buttons = [ options.buttons = [
{ {
text: "Close", text: RED._("common.label.close"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
} }
@ -229,7 +229,7 @@
if (RED.user.hasPermission("projects.write")) { if (RED.user.hasPermission("projects.write")) {
options.buttons = [ options.buttons = [
{ {
text: "Setup project files", text: RED._("notification.label.setup-project"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
RED.projects.showFilesPrompt(); RED.projects.showFilesPrompt();
@ -241,7 +241,7 @@
if (RED.user.hasPermission("projects.write")) { if (RED.user.hasPermission("projects.write")) {
options.buttons = [ options.buttons = [
{ {
text: "Create default package file", text: RED._("notification.label.create-default-package"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
RED.projects.createDefaultPackageFile(); RED.projects.createDefaultPackageFile();
@ -253,13 +253,13 @@
if (RED.user.hasPermission("projects.write")) { if (RED.user.hasPermission("projects.write")) {
options.buttons = [ options.buttons = [
{ {
text: "No thanks", text: RED._("notification.label.no-thanks"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
} }
}, },
{ {
text: "Create default project files", text: RED._("notification.label.create-default-project"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
RED.projects.createDefaultFileSet(); RED.projects.createDefaultFileSet();
@ -273,7 +273,7 @@
if (RED.user.hasPermission("projects.write")) { if (RED.user.hasPermission("projects.write")) {
options.buttons = [ options.buttons = [
{ {
text: "Show merge conflicts", text: RED._("notification.label.show-merge-conflicts"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();
RED.sidebar.versionControl.showLocalChanges(); RED.sidebar.versionControl.showLocalChanges();
@ -382,10 +382,10 @@
function loadEditor() { function loadEditor() {
var menuOptions = []; var menuOptions = [];
if (RED.settings.theme("projects.enabled",false)) { if (RED.settings.theme("projects.enabled",false)) {
menuOptions.push({id:"menu-item-projects-menu",label:"Projects",options:[ menuOptions.push({id:"menu-item-projects-menu",label:RED._("menu.label.projects"),options:[
{id:"menu-item-projects-new",label:"New",disabled:false,onselect:"core:new-project"}, {id:"menu-item-projects-new",label:RED._("menu.label.projects-new"),disabled:false,onselect:"core:new-project"},
{id:"menu-item-projects-open",label:"Open",disabled:false,onselect:"core:open-project"}, {id:"menu-item-projects-open",label:RED._("menu.label.projects-open"),disabled:false,onselect:"core:open-project"},
{id:"menu-item-projects-settings",label:"Project Settings",disabled:false,onselect:"core:show-project-settings"} {id:"menu-item-projects-settings",label:RED._("menu.label.projects-settings"),disabled:false,onselect:"core:show-project-settings"}
]}); ]});
} }

View File

@ -71,7 +71,11 @@
"editPalette":"Manage palette", "editPalette":"Manage palette",
"other": "Other", "other": "Other",
"showTips": "Show tips", "showTips": "Show tips",
"help": "Node-RED website" "help": "Node-RED website",
"projects": "Projects",
"projects-new": "New",
"projects-open": "Open",
"projects-settings": "Project Settings"
} }
}, },
"user": { "user": {
@ -112,6 +116,24 @@
"cannotAddCircularReference": "Cannot add subflow - circular reference detected", "cannotAddCircularReference": "Cannot add subflow - circular reference detected",
"unsupportedVersion": "<p>Using an unsupported version of Node.js</p><p>You should upgrade to the latest Node.js LTS release</p>", "unsupportedVersion": "<p>Using an unsupported version of Node.js</p><p>You should upgrade to the latest Node.js LTS release</p>",
"failedToAppendNode": "<p>Failed to load '__module__'</p><p>__error__</p>" "failedToAppendNode": "<p>Failed to load '__module__'</p><p>__error__</p>"
},
"project": {
"change-branch": "Change to local branch '__project__'",
"merge-abort": "Git merge aborted",
"loaded": "Project '__project__' loaded",
"updated": "Project '__project__' updated",
"pull": "Project '__project__' reloaded",
"revert": "Project '__project__' reloaded",
"merge-complete": "Git merge completed"
},
"label": {
"manage-project-dep": "Manage project dependencies",
"setup-cred": "Setup credentials",
"setup-project": "Setup project files",
"create-default-package": "Create default package file",
"no-thanks": "No thanks",
"create-default-project": "Create default project files",
"show-merge-conflicts": "Show merge conflicts"
} }
}, },
"clipboard": { "clipboard": {

View File

@ -71,7 +71,11 @@
"editPalette": "パレットの管理", "editPalette": "パレットの管理",
"other": "その他", "other": "その他",
"showTips": "ヒントを表示", "showTips": "ヒントを表示",
"help": "Node-REDウェブサイト" "help": "Node-REDウェブサイト",
"projects": "プロジェクト",
"projects-new": "新規",
"projects-open": "開く",
"projects-settings": "設定"
} }
}, },
"user": { "user": {
@ -106,7 +110,26 @@
"lostConnectionTry": "すぐに接続", "lostConnectionTry": "すぐに接続",
"cannotAddSubflowToItself": "サブフロー自身を追加できません", "cannotAddSubflowToItself": "サブフロー自身を追加できません",
"cannotAddCircularReference": "循環参照を検出したため、サブフローを追加できません", "cannotAddCircularReference": "循環参照を検出したため、サブフローを追加できません",
"unsupportedVersion": "サポートされていないバージョンのNode.jsを使用しています。<br/>最新のNode.js LTSに更新してください。" "unsupportedVersion": "サポートされていないバージョンのNode.jsを使用しています。<br/>最新のNode.js LTSに更新してください。",
"failedToAppendNode": "<p>'__module__'がロードできませんでした。</p><p>__error__</p>"
},
"project": {
"change-branch": "ローカルブランチ'__project__'に変更しました",
"merge-abort": "Gitマージを中止しました",
"loaded": "プロジェクト'__project__'をロードしました",
"updated": "プロジェクト'__project__'を更新しました",
"pull": "プロジェクト'__project__'を再ロードしました",
"revert": "プロジェクト'__project__'を再ロードしました",
"merge-complete": "Gitマージが完了しました"
},
"label": {
"manage-project-dep": "プロジェクトの依存関係の管理",
"setup-cred": "認証情報の設定",
"setup-project": "プロジェクトファイルの設定",
"create-default-package": "デフォルトパッケージファイルの作成",
"no-thanks": "不要",
"create-default-project": "デフォルトプロジェクトファイルの作成",
"show-merge-conflicts": "マージ競合を表示"
} }
}, },
"clipboard": { "clipboard": {