mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] PY-84316 Change action text to reflect filename and location
GitOrigin-RevId: bfb11558949badec5af2ef80bdbfa2c9e3dfd3d2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ae6c83d957
commit
feedbe82b4
@@ -1656,7 +1656,8 @@ python.sdk.intention.family.name.sync.project=Sync project
|
||||
python.sdk.sync.project.text=Syncing project
|
||||
|
||||
action.PipSetDefaultRequirementsAction.text=Set as the environment dependencies list
|
||||
action.PipUpdateEnvAction.text=Pip Update from "requirements.txt"
|
||||
action.PipUpdateEnvAction.text=Pip Update from "{0}"
|
||||
action.PipUpdateEnvAction.FloatingToolbar.text=Install All
|
||||
|
||||
action.PipEnvLockDependenciesAction.text=Generate a Pipfile.lock
|
||||
action.PipEnvInstallDependenciesAction.text=Install Dependencies
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.jetbrains.python.packaging.pip.actions
|
||||
|
||||
import com.intellij.openapi.actionSystem.ActionPlaces
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.jetbrains.python.PyBundle
|
||||
import com.jetbrains.python.errorProcessing.PyResult
|
||||
import com.jetbrains.python.packaging.management.PythonPackageManagerAction
|
||||
import com.jetbrains.python.packaging.management.getPythonPackageManager
|
||||
@@ -61,5 +63,11 @@ internal class PipUpdateEnvAction() : PipPackageManagerAction() {
|
||||
if (manager.sdk.isReadOnly) {
|
||||
e.presentation.isEnabledAndVisible = false
|
||||
}
|
||||
if (e.place == ActionPlaces.CONTEXT_TOOLBAR) {
|
||||
e.presentation.text = PyBundle.message("action.PipUpdateEnvAction.FloatingToolbar.text")
|
||||
} else {
|
||||
val currentFile = e.getData(PlatformDataKeys.VIRTUAL_FILE)
|
||||
e.presentation.text = PyBundle.message("action.PipUpdateEnvAction.text", currentFile?.name ?: "requirements.txt")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user