From 4e43a048bf1820bb919651c3fe128cabfef0d908 Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Mon, 13 Jan 2020 20:05:56 +0300 Subject: [PATCH] i18n for sh plugin GitOrigin-RevId: 9840905b275bbf2339ba70201286894e45c554fe --- plugins/sh/resources/messages/ShBundle.properties | 5 +++++ .../com/intellij/sh/formatter/ShShfmtFormatterUtil.java | 3 ++- .../src/com/intellij/sh/run/ShRunConfigurationEditor.java | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/sh/resources/messages/ShBundle.properties b/plugins/sh/resources/messages/ShBundle.properties index 3e91dbd9ff06..0848e8489a18 100644 --- a/plugins/sh/resources/messages/ShBundle.properties +++ b/plugins/sh/resources/messages/ShBundle.properties @@ -36,6 +36,11 @@ sh.suppress.inspection=Suppress {0} sh.title.case=Shell Script sh.unnamed.element.presentable.name= +sh.label.download.shfmt.formatter=Download Shfmt Formatter +sh.label.choose.interpreter=Choose Interpreter +sh.label.choose.script.working.directory=Choose Script Working Directory +sh.label.choose.shell.script=Choose Shell Script + action.ShGenerateUntilLoop.text=Until Loop action.ShGenerateUntilLoop.description=Creates until loop action.ShGenerateWhileLoop.text=While Loop diff --git a/plugins/sh/src/com/intellij/sh/formatter/ShShfmtFormatterUtil.java b/plugins/sh/src/com/intellij/sh/formatter/ShShfmtFormatterUtil.java index d9417ec55e84..0432b321c144 100644 --- a/plugins/sh/src/com/intellij/sh/formatter/ShShfmtFormatterUtil.java +++ b/plugins/sh/src/com/intellij/sh/formatter/ShShfmtFormatterUtil.java @@ -13,6 +13,7 @@ import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.io.FileUtil; import com.intellij.psi.codeStyle.CodeStyleSettings; +import com.intellij.sh.ShBundle; import com.intellij.sh.ShLanguage; import com.intellij.sh.settings.ShSettings; import com.intellij.sh.statistics.ShFeatureUsagesCollector; @@ -76,7 +77,7 @@ public class ShShfmtFormatterUtil { DownloadableFileDescription description = service.createFileDescription(getShfmtDistributionLink(), downloadName); FileDownloader downloader = service.createDownloader(Collections.singletonList(description), downloadName); - Task.Backgroundable task = new Task.Backgroundable(project, "Download Shfmt Formatter") { + Task.Backgroundable task = new Task.Backgroundable(project, ShBundle.message("sh.label.download.shfmt.formatter")) { @Override public void run(@NotNull ProgressIndicator indicator) { try { diff --git a/plugins/sh/src/com/intellij/sh/run/ShRunConfigurationEditor.java b/plugins/sh/src/com/intellij/sh/run/ShRunConfigurationEditor.java index 332230564336..7623b1fbbcbd 100644 --- a/plugins/sh/src/com/intellij/sh/run/ShRunConfigurationEditor.java +++ b/plugins/sh/src/com/intellij/sh/run/ShRunConfigurationEditor.java @@ -6,6 +6,7 @@ import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.options.SettingsEditor; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.TextFieldWithBrowseButton; +import com.intellij.sh.ShBundle; import com.intellij.ui.RawCommandLineEditor; import org.jetbrains.annotations.NotNull; @@ -20,9 +21,9 @@ public class ShRunConfigurationEditor extends SettingsEditor private RawCommandLineEditor myInterpreterOptions; ShRunConfigurationEditor(Project project) { - myScriptSelector.addBrowseFolderListener("Choose Shell Script", "", project, FileChooserDescriptorFactory.createSingleFileDescriptor()); - myScriptWorkingDirectory.addBrowseFolderListener("Choose Script Working Directory", "", project, FileChooserDescriptorFactory.createSingleFolderDescriptor()); - myInterpreterSelector.addBrowseFolderListener("Choose Interpreter", "", project, FileChooserDescriptorFactory.createSingleFileDescriptor()); + myScriptSelector.addBrowseFolderListener(ShBundle.message("sh.label.choose.shell.script"), "", project, FileChooserDescriptorFactory.createSingleFileDescriptor()); + myScriptWorkingDirectory.addBrowseFolderListener(ShBundle.message("sh.label.choose.script.working.directory"), "", project, FileChooserDescriptorFactory.createSingleFolderDescriptor()); + myInterpreterSelector.addBrowseFolderListener(ShBundle.message("sh.label.choose.interpreter"), "", project, FileChooserDescriptorFactory.createSingleFileDescriptor()); } @Override