mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
i18n Fixes in remote interpreters
GitOrigin-RevId: 82ea247ba597511682b2e1f633ecde6b57718762
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2f483b740b
commit
13bed886ac
@@ -54,6 +54,7 @@ jar.copy.error.message=Cannot copy ''{0}'' to ''{1}''.\nReason: {2}.
|
||||
jar.copy.error.title=Error Copying File
|
||||
file.synchronize.progress=Synchronizing files...
|
||||
cannot.load.remote.file=Cannot load ''{0}'': {1}
|
||||
remote.sdk.exception.cant.obtain.remote.credentials=Cant obtain remote credentials
|
||||
cannot.create.local.file=Cannot create local file: {0}
|
||||
download.progress.connecting=Connecting to ''{0}''...
|
||||
download.progress.downloading=Downloading ''{0}''...
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
package com.intellij.remote;
|
||||
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.openapi.util.NlsContexts.DialogMessage;
|
||||
|
||||
import java.net.NoRouteToHostException;
|
||||
|
||||
@@ -11,7 +13,7 @@ public class RemoteSdkException extends ExecutionException {
|
||||
|
||||
private Throwable myCause;
|
||||
|
||||
public RemoteSdkException(String s, Throwable throwable) {
|
||||
public RemoteSdkException(@DialogMessage String s, Throwable throwable) {
|
||||
super(s, throwable);
|
||||
|
||||
myAuthFailed = false;
|
||||
@@ -29,7 +31,7 @@ public class RemoteSdkException extends ExecutionException {
|
||||
myCause = throwable;
|
||||
}
|
||||
|
||||
public RemoteSdkException(String s) {
|
||||
public RemoteSdkException(@DialogMessage String s) {
|
||||
super(s);
|
||||
myAuthFailed = false;
|
||||
myNoRouteToHost = false;
|
||||
@@ -59,7 +61,7 @@ public class RemoteSdkException extends ExecutionException {
|
||||
public static RemoteSdkException cantObtainRemoteCredentials(Throwable e) {
|
||||
// TODO needs review
|
||||
if (e.getCause() instanceof RemoteCredentialException) {
|
||||
return new RemoteSdkException("Cant obtain remote credentials", e);
|
||||
return new RemoteSdkException(IdeBundle.message("remote.sdk.exception.cant.obtain.remote.credentials"), e);
|
||||
}
|
||||
else {
|
||||
return new RemoteSdkException(e.getMessage(), e);
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.process.ProcessOutput;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.intellij.openapi.util.NlsContexts.DialogMessage;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -34,15 +35,15 @@ public class PyExecutionException extends ExecutionException {
|
||||
private final int myExitCode;
|
||||
@NotNull private final List<? extends PyExecutionFix> myFixes;
|
||||
|
||||
public PyExecutionException(@NotNull String message, @NotNull String command, @NotNull List<String> args) {
|
||||
public PyExecutionException(@DialogMessage @NotNull String message, @NotNull String command, @NotNull List<String> args) {
|
||||
this(message, command, args, "", "", 0, Collections.emptyList());
|
||||
}
|
||||
|
||||
public PyExecutionException(@NotNull String message, @NotNull String command, @NotNull List<String> args, @NotNull ProcessOutput output) {
|
||||
public PyExecutionException(@DialogMessage @NotNull String message, @NotNull String command, @NotNull List<String> args, @NotNull ProcessOutput output) {
|
||||
this(message, command, args, output.getStdout(), output.getStderr(), output.getExitCode(), Collections.emptyList());
|
||||
}
|
||||
|
||||
public PyExecutionException(@NotNull String message, @NotNull String command, @NotNull List<String> args,
|
||||
public PyExecutionException(@DialogMessage @NotNull String message, @NotNull String command, @NotNull List<String> args,
|
||||
@NotNull String stdout, @NotNull String stderr, int exitCode,
|
||||
@NotNull List<? extends PyExecutionFix> fixes) {
|
||||
super(message);
|
||||
|
||||
@@ -1094,3 +1094,5 @@ python.install.framework.ensure.installed=Ensuring {0} is installed
|
||||
python.install.framework.checking.is.installed=Checking if {0} is installed...
|
||||
python.install.framework.installing=Installing {0}...
|
||||
py.commandline.configure=Confiures Python SDKs for the project
|
||||
|
||||
python.task.cannot.find.python.interpreter.for.selected.module=Cannot find Python interpreter for selected module
|
||||
|
||||
@@ -15,12 +15,15 @@
|
||||
*/
|
||||
package com.jetbrains.python.sdk;
|
||||
|
||||
|
||||
import com.intellij.openapi.util.NlsContexts.DialogMessage;
|
||||
|
||||
public class InvalidSdkException extends Exception {
|
||||
public InvalidSdkException(String s) {
|
||||
public InvalidSdkException(@DialogMessage String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public InvalidSdkException(String message, Throwable cause) {
|
||||
public InvalidSdkException(@DialogMessage String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.projectRoots.impl.SdkConfigurationUtil;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.NlsContexts.DialogMessage;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.platform.DirectoryProjectGeneratorBase;
|
||||
@@ -423,7 +424,7 @@ public abstract class PythonProjectGenerator<T extends PyNewProjectSettings> ext
|
||||
/**
|
||||
* @param reason why project can't be created
|
||||
*/
|
||||
PyNoProjectAllowedOnSdkException(@NotNull final String reason) {
|
||||
PyNoProjectAllowedOnSdkException(@NotNull @DialogMessage final String reason) {
|
||||
super(reason);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.jetbrains.python.buildout.BuildoutFacet;
|
||||
import com.jetbrains.python.console.PydevConsoleRunner;
|
||||
import com.jetbrains.python.sdk.PythonEnvUtil;
|
||||
import com.jetbrains.python.sdk.PythonSdkUtil;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -72,7 +73,7 @@ public class PythonTask {
|
||||
|
||||
@NotNull
|
||||
public static PythonTask create(@NotNull final Module module,
|
||||
@NotNull final String runTabTitle,
|
||||
@Nls @NotNull final String runTabTitle,
|
||||
@NotNull final Sdk sdk) {
|
||||
// Ctor throws checked exception which is not good, so this wrapper saves user from dumb code
|
||||
try {
|
||||
@@ -88,7 +89,7 @@ public class PythonTask {
|
||||
myRunTabTitle = runTabTitle;
|
||||
mySdk = sdk;
|
||||
if (mySdk == null) { // TODO: Get rid of such a weird contract
|
||||
throw new ExecutionException("Cannot find Python interpreter for selected module");
|
||||
throw new ExecutionException(PyBundle.message("python.task.cannot.find.python.interpreter.for.selected.module"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user