[python] i18n-ize an error message in a skeleton generator

GitOrigin-RevId: 54d6de5102b200a2341f1b454b8ca63e08d3bb8f
This commit is contained in:
Andrey Vlasovskikh
2021-11-17 20:26:58 +00:00
committed by intellij-monorepo-bot
parent 44162b8458
commit 9cd033354e
2 changed files with 6 additions and 2 deletions
@@ -63,4 +63,7 @@ python.interpreter.label=Interpreter:
# Configure project interpreter
python.configure.interpreter.action=Configure a Python interpreter\u2026
python.configuring.interpreter.progress=Configuring a Python interpreter
python.configuring.interpreter.progress=Configuring a Python interpreter
# Skeletons generator
dialog.message.broken.home.path.for=Broken home path for {0}
@@ -10,6 +10,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.ArrayUtil;
import com.intellij.util.Time;
import com.intellij.util.containers.ContainerUtil;
import com.jetbrains.python.PySdkBundle;
import com.jetbrains.python.PythonHelpersLocator;
import com.jetbrains.python.sdk.InvalidSdkException;
import com.jetbrains.python.sdk.PySdkUtil;
@@ -140,7 +141,7 @@ public class PyLegacySkeletonGenerator extends PySkeletonGenerator {
return myWorkingDir;
}
final String binaryPath = mySdk.getHomePath();
if (binaryPath == null) throw new InvalidSdkException("Broken home path for " + mySdk.getName());
if (binaryPath == null) throw new InvalidSdkException(PySdkBundle.message("dialog.message.broken.home.path.for", mySdk.getName()));
return new File(binaryPath).getParent();
}