From a5c00b5c81fd5c3c7f8877c602d4b2dd49458aeb Mon Sep 17 00:00:00 2001 From: YumaMatsuura <38545050+YumaMatsuura@users.noreply.github.com> Date: Fri, 25 May 2018 21:55:03 +0900 Subject: [PATCH] add translate-user-settings (#1740) --- editor/js/ui/projects/projectUserSettings.js | 44 ++++++++++---------- red/api/editor/locales/en-US/editor.json | 25 ++++++++++- red/api/editor/locales/ja/editor.json | 25 ++++++++++- 3 files changed, 70 insertions(+), 24 deletions(-) diff --git a/editor/js/ui/projects/projectUserSettings.js b/editor/js/ui/projects/projectUserSettings.js index 4c3840461..a343a07cc 100644 --- a/editor/js/ui/projects/projectUserSettings.js +++ b/editor/js/ui/projects/projectUserSettings.js @@ -24,18 +24,18 @@ RED.projects.userSettings = (function() { var currentGitSettings = RED.settings.get('git') || {}; currentGitSettings.user = currentGitSettings.user || {}; - var title = $('
').text("Committer Details").appendTo(pane); + var title = $('').text(RED._("editor:sidebar.project.userSettings.committerDetail")).appendTo(pane); var gitconfigContainer = $('').appendTo(pane); - $('').appendTo(gitconfigContainer).text("Leave blank to use system default"); + $('').appendTo(gitconfigContainer).text(RED._("editor:sidebar.project.userSettings.committer-tip")); var row = $('').appendTo(gitconfigContainer); - $('').text('Username').appendTo(row); + $('').text(RED._("editor:sidebar.project.userSettings.userName")).appendTo(row); gitUsernameInput = $('').appendTo(row); gitUsernameInput.val(currentGitSettings.user.name||""); row = $('').appendTo(gitconfigContainer); - $('').text('Email').appendTo(row); + $('').text(RED._("editor:sidebar.project.userSettings.email")).appendTo(row); gitEmailInput = $('').appendTo(row); gitEmailInput.val(currentGitSettings.user.email||""); } @@ -44,10 +44,10 @@ RED.projects.userSettings = (function() { function createSSHKeySection(pane) { var container = $('').appendTo(pane); var popover; - var title = $('').text("SSH Keys").appendTo(container); - var subtitle = $('').appendTo(container).text("Allows you to create secure connections to remote git repositories."); + var title = $('').text(RED._("editor:sidebar.project.userSettings.sshKeys")).appendTo(container); + var subtitle = $('').appendTo(container).text(RED._("editor:sidebar.project.userSettings.sshKeys-tip")); - var addKeyButton = $('') + var addKeyButton = $('') .appendTo(subtitle) .click(function(evt) { addKeyButton.attr('disabled',true); @@ -72,9 +72,9 @@ RED.projects.userSettings = (function() { var validPassphrase = passphrase.length === 0 || passphrase.length >= 8; passphraseInput.toggleClass('input-error',!validPassphrase); if (!validPassphrase) { - passphraseInputSubLabel.text("Passphrase too short"); + passphraseInputSubLabel.text(RED._("editor:sidebar.project.userSettings.passphrase-short")); } else if (passphrase.length === 0) { - passphraseInputSubLabel.text("Optional"); + passphraseInputSubLabel.text(RED._("editor:sidebar.project.userSettings.optional")); } else { passphraseInputSubLabel.text(""); } @@ -91,11 +91,11 @@ RED.projects.userSettings = (function() { var row = $('').appendTo(container); var addKeyDialog = $('').hide().appendTo(row); - $('