mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
Align python download and install progress text/details with a guideline (PY-64420)
Previous texts were uninformative and didn't comply with our guidelines. GitOrigin-RevId: ec9f3b6456e504a806c94ff9427f147085be668d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2aeebdce1d
commit
95b312f00e
@@ -35,11 +35,10 @@ python.sdk.please.reconfigure.interpreter=Please reconfigure Python interpreter
|
||||
python.sdk.pipenv.creating.venv.not.supported=Creating a virtual environments based on Pipenv environments is not supported
|
||||
python.sdk.invalid.remote.sdk=Invalid remote SDK
|
||||
python.sdk.package.managing.not.supported.for.sdk=Package managing is not supported for SDK {0}
|
||||
python.sdk.preparation.hint=Preparing for installation
|
||||
python.sdk.downloading=Downloading {0}
|
||||
python.sdk.installing.hint.windows=Windows may require your approval. Please check the taskbar.
|
||||
python.sdk.installing.hint=Installation is in progress. Please check system alerts.
|
||||
python.sdk.running=Running {0}
|
||||
python.sdk.preparation.progress.text=Preparing for installation\u2026
|
||||
python.sdk.downloading.progress.details=Downloading {0}
|
||||
python.sdk.running.progress.text=Running {0}\u2026
|
||||
python.sdk.running.one.minute.progress.details=About 1 minute left
|
||||
python.sdk.running.sudo.prompt=Enter your password to install {0}
|
||||
|
||||
# PLEASE add only the keys that are supposed to be re-used by plugins,
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.intellij.openapi.progress.ProcessCanceledException
|
||||
import com.intellij.openapi.progress.ProgressIndicator
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.util.io.HttpRequests
|
||||
import com.intellij.util.system.OS
|
||||
import com.jetbrains.python.PySdkBundle
|
||||
import com.jetbrains.python.sdk.*
|
||||
import java.nio.file.Path
|
||||
@@ -79,17 +78,13 @@ abstract class DownloadableReleaseInstaller : ReleaseInstaller {
|
||||
Paths.get(tempPath, "${System.nanoTime()}-${it.fileName}")
|
||||
}
|
||||
try {
|
||||
indicator.text = PySdkBundle.message("python.sdk.preparation.hint")
|
||||
indicator.text = PySdkBundle.message("python.sdk.preparation.progress.text")
|
||||
files.forEach { (resource, path) ->
|
||||
download(resource, path, indicator)
|
||||
}
|
||||
|
||||
onPrepareComplete()
|
||||
|
||||
indicator.text = when(OS.CURRENT) {
|
||||
OS.Windows -> PySdkBundle.message("python.sdk.installing.hint.windows")
|
||||
else -> PySdkBundle.message("python.sdk.installing.hint")
|
||||
}
|
||||
process(release, files, indicator)
|
||||
}
|
||||
finally {
|
||||
@@ -115,7 +110,7 @@ abstract class DownloadableReleaseInstaller : ReleaseInstaller {
|
||||
@Throws(PrepareException::class)
|
||||
private fun download(resource: Resource, target: Path, indicator: ProgressIndicator) {
|
||||
LOGGER.info("Downloading ${resource.url} to $target")
|
||||
indicator.text2 = PySdkBundle.message("python.sdk.downloading", resource.fileName)
|
||||
indicator.text2 = PySdkBundle.message("python.sdk.downloading.progress.details", resource.fileName)
|
||||
try {
|
||||
indicator.checkCanceled()
|
||||
HttpRequests.request(resource.url)
|
||||
|
||||
@@ -42,7 +42,6 @@ abstract class ResourceTypeReleaseInstaller(private val resourceType: ResourceTy
|
||||
|
||||
@Throws(ProcessException::class)
|
||||
override fun process(release: Release, resourcePaths: Map<Resource, Path>, indicator: ProgressIndicator) {
|
||||
indicator.isIndeterminate = true
|
||||
resourcePaths.forEach { (resource, path) ->
|
||||
processResource(resource, path, indicator)
|
||||
}
|
||||
@@ -50,7 +49,9 @@ abstract class ResourceTypeReleaseInstaller(private val resourceType: ResourceTy
|
||||
|
||||
@Throws(ProcessException::class)
|
||||
private fun processResource(resource: Resource, path: Path, indicator: ProgressIndicator) {
|
||||
indicator.text2 = PySdkBundle.message("python.sdk.running", resource.fileName)
|
||||
indicator.isIndeterminate = true
|
||||
indicator.text = PySdkBundle.message("python.sdk.running.progress.text", resource.fileName)
|
||||
indicator.text2 = PySdkBundle.message("python.sdk.running.one.minute.progress.details")
|
||||
|
||||
val commandLine = buildCommandLine(resource, path)
|
||||
LOGGER.info("Running ${commandLine.commandLineString}")
|
||||
|
||||
Reference in New Issue
Block a user