IDEA-247675 - external systems i18n
authorAlexander Bubenchikov <alexander.bubenchikov@jetbrains.com>
Thu, 27 Aug 2020 13:16:10 +0000 (16:16 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Thu, 27 Aug 2020 13:47:28 +0000 (13:47 +0000)
GitOrigin-RevId: b30d07ec3d6f479dac0f0300d04d7ab381210547

platform/external-system-api/resources/messages/ExternalSystemBundle.properties
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskSettingsControl.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalSystemKeymapExtension.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalSystemTaskActivator.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/ui/ExternalProjectDataSelectorDialog.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/ui/SelectExternalTaskDialog.java
platform/external-system-rt/src/com/intellij/openapi/externalSystem/model/project/dependencies/UnknownDependencyNode.java
platform/lang-api/src/com/intellij/build/output/BuildOutputInstantReader.java

index cbca4f2b994b0a152c38c608bac5ba854ee220ad..37d1de3b9869162192b980e1ee7647df8e824dae 100644 (file)
@@ -190,3 +190,12 @@ popup.title.choose.activation.phase=Choose activation phase
 popup.title.choose.task=Choose task
 activity.name.select.external.data=Select External Data
 build.event.title.sync=Sync
+dialog.title.project.data.to.import={0} Project Data To Import
+please.wait=Please wait...
+there.are.not.selected.module.dependencies.of.the.module.br.b.0.b=There are not selected module dependencies of the module: <br><b>{0}</b>
+link.label.choose.task.to.assign.shortcut=Choose a task to assign a shortcut
+dialog.message.before.build.triggering.task.failed=Before build triggering task failed
+dialog.message.after.build.triggering.task.failed=After build triggering task failed
+dialog.title.choose.task=Choose {0} Task
+label.modules.selected={0} Modules. {1} selected
+dialog.message.can.t.store.external.task.settings.into.run.configuration=Can''t store external task settings into run configuration. Reason: target run configuration is undefined. Tasks: ''{0}'', external project: ''{1}'', vm options: ''{2}'', arguments: ''{3}''
index 8dc13b881a4ecb5979ccf9e970bb382d40a91452..ac16579246b22eae6ebdc154b3c0acef978a05bd 100644 (file)
@@ -172,11 +172,8 @@ public class ExternalSystemTaskSettingsControl implements ExternalSystemSettings
   public boolean validate(@NotNull ExternalSystemTaskExecutionSettings settings) throws ConfigurationException {
     String projectPath = myProjectPathField.getText();
     if (myOriginalSettings == null) {
-      throw new ConfigurationException(String.format(
-        "Can't store external task settings into run configuration. Reason: target run configuration is undefined. Tasks: '%s', " +
-        "external project: '%s', vm options: '%s', arguments: '%s'",
-        myTasksTextField.getText(), projectPath, myVmOptionsEditor.getText(), myArgumentsEditor.getText()
-      ));
+      throw new ConfigurationException(
+        ExternalSystemBundle.message("dialog.message.can.t.store.external.task.settings.into.run.configuration", myTasksTextField.getText(),projectPath,myVmOptionsEditor.getText(),myArgumentsEditor.getText()));
     }
     return true;
   }
index 712b73cc86e7d2166b15b95305cd13111138921c..6282d3f16940590923cb7833ccc92d17c37f9476 100644 (file)
@@ -107,7 +107,7 @@ public class ExternalSystemKeymapExtension implements KeymapExtension {
       }
       if (systemGroup instanceof Group) {
         Icon icon = AllIcons.General.Add;
-        ((Group)systemGroup).addHyperlink(new Hyperlink(icon, "Choose a task to assign a shortcut") {
+        ((Group)systemGroup).addHyperlink(new Hyperlink(icon, ExternalSystemBundle.message("link.label.choose.task.to.assign.shortcut")) {
           @Override
           public void onClick(MouseEvent e) {
             SelectExternalTaskDialog dialog = new SelectExternalTaskDialog(systemId, project);
index d1d5f2ed8c5d0439d106e0de899c6920a7a69c34..d545bf9d21d1cb626c6a7afeeb4e8d0868e3f927 100644 (file)
@@ -66,14 +66,14 @@ public class ExternalSystemTaskActivator {
       @Override
       public void beforeRun(@NotNull ProjectTaskContext context) throws ExecutionException {
         if (!doExecuteBuildPhaseTriggers(true, context)) {
-          throw new ExecutionException("Before build triggering task failed");
+          throw new ExecutionException(ExternalSystemBundle.message("dialog.message.before.build.triggering.task.failed"));
         }
       }
 
       @Override
       public void afterRun(@NotNull ProjectTaskManager.Result result) throws ExecutionException {
         if (!doExecuteBuildPhaseTriggers(false, result.getContext())) {
-          throw new ExecutionException("After build triggering task failed");
+          throw new ExecutionException(ExternalSystemBundle.message("dialog.message.after.build.triggering.task.failed"));
         }
       }
     });
index 2d7c4edb7cb30b60dfaaf280db968cd47d6e100a..8db6e4ff8134d88b9e510a29998cd7269b0d188e 100644 (file)
@@ -27,6 +27,7 @@ import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.DialogWrapper;
 import com.intellij.openapi.ui.Messages;
 import com.intellij.openapi.util.Couple;
+import com.intellij.openapi.util.NlsContexts;
 import com.intellij.openapi.util.SimpleModificationTracker;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.psi.util.CachedValue;
@@ -117,7 +118,7 @@ public final class ExternalProjectDataSelectorDialog extends DialogWrapper {
     });
 
     String externalSystemName = myProjectInfo.getProjectSystemId().getReadableName();
-    setTitle(String.format("%s Project Data To Import", externalSystemName));
+    setTitle(ExternalSystemBundle.message("dialog.title.project.data.to.import", externalSystemName));
     init();
   }
 
@@ -164,7 +165,7 @@ public final class ExternalProjectDataSelectorDialog extends DialogWrapper {
 
   @Override
   protected void doOKAction() {
-    loadingPanel.setLoadingText("Please wait...");
+    loadingPanel.setLoadingText(ExternalSystemBundle.message("please.wait"));
     loadingPanel.startLoading();
 
     final DataNode<ProjectData> projectStructure = myProjectInfo.getExternalProjectStructure();
@@ -248,7 +249,7 @@ public final class ExternalProjectDataSelectorDialog extends DialogWrapper {
                 }, "<br>");
             if (StringUtil.isNotEmpty(listOfUncheckedDependencies)) {
               hasErrors = true;
-              tooltip = "There are not selected module dependencies of the module: <br><b>" + listOfUncheckedDependencies + "</b>";
+              tooltip = ExternalSystemBundle.message("there.are.not.selected.module.dependencies.of.the.module.br.b.0.b", listOfUncheckedDependencies);
             }
           }
         }
@@ -651,7 +652,7 @@ public final class ExternalProjectDataSelectorDialog extends DialogWrapper {
         }
         return true;
       });
-      stateMessage = String.format("%1$d Modules. %2$d selected", myModulesCount, selectedModulesCount[0]);
+      stateMessage = ExternalSystemBundle.message("label.modules.selected", myModulesCount, selectedModulesCount[0]);
     }
 
     return new SelectionState(isRequiredSelectionEnabled, stateMessage);
@@ -676,7 +677,7 @@ public final class ExternalProjectDataSelectorDialog extends DialogWrapper {
     boolean isRequiredSelectionEnabled;
     @Nullable String message;
 
-    SelectionState(boolean isRequiredSelectionEnabled, @Nullable String message) {
+    SelectionState(boolean isRequiredSelectionEnabled, @Nullable @NlsContexts.Label String message) {
       this.isRequiredSelectionEnabled = isRequiredSelectionEnabled;
       this.message = message;
     }
index 529dcf801047ec1c404c81ad18cfa0ec74e32d88..3c90523ccf9b4dec8c15b2224827c227ebef2cc9 100644 (file)
@@ -3,6 +3,7 @@ package com.intellij.openapi.externalSystem.service.ui;
 
 import com.intellij.openapi.externalSystem.model.ProjectSystemId;
 import com.intellij.openapi.externalSystem.model.task.TaskData;
+import com.intellij.openapi.externalSystem.util.ExternalSystemBundle;
 import com.intellij.openapi.externalSystem.view.ExternalSystemNode;
 import com.intellij.openapi.externalSystem.view.ModuleNode;
 import com.intellij.openapi.externalSystem.view.ProjectNode;
@@ -30,7 +31,7 @@ public class SelectExternalTaskDialog extends SelectExternalSystemNodeDialog {
   private Pair<String, TaskData> myResult;
 
   public SelectExternalTaskDialog(@NotNull ProjectSystemId systemId, Project project) {
-    super(systemId, project, String.format("Choose %s Task", systemId.getReadableName()), NODE_CLASSES, null);
+    super(systemId, project, ExternalSystemBundle.message("dialog.title.choose.task", systemId.getReadableName()), NODE_CLASSES, null);
     groupTasks = Boolean.FALSE;
     useTasksNode = Boolean.FALSE;
     init();
index 04a2dfbd3ac2aa4056c07c9364c45d7389b33e8c..d86cea888cea202d18d6d16682f1b079b4936ba6 100644 (file)
@@ -2,13 +2,14 @@
 package com.intellij.openapi.externalSystem.model.project.dependencies;
 
 import com.intellij.serialization.PropertyMapping;
+import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
 
 public class UnknownDependencyNode extends AbstractDependencyNode {
   private final String name;
 
   @PropertyMapping({"id", "name"})
-  public UnknownDependencyNode(long id, String name) {
+  public UnknownDependencyNode(long id, @Nls String name) {
     super(id);
     this.name = name;
   }
@@ -16,7 +17,7 @@ public class UnknownDependencyNode extends AbstractDependencyNode {
   @NotNull
   @Override
   public String getDisplayName() {
-    return name == null ? "unknown" : name;
+    return name == null ? "unknown" : name; //NON-NLS
   }
 
   @Override
index c84b7c677803437a5428573c63383f0a8ab68e7e..384e9dc74f2f68a1b51e97355102aeee48680066 100644 (file)
@@ -1,6 +1,7 @@
 // Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.build.output;
 
+import com.intellij.openapi.util.NlsSafe;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -12,6 +13,7 @@ public interface BuildOutputInstantReader {
   Object getParentEventId();
 
   @Nullable
+  @NlsSafe
   String readLine();
 
   void pushBack();