mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-21 23:01:03 +00:00
287 Display hotkeys to detach from the container (#465)
Co-authored-by: glendsoza <glendsouza23@gmail.com>
This commit is contained in:
parent
15bc01b9af
commit
e5ca391291
8 changed files with 82 additions and 69 deletions
|
|
@ -408,7 +408,7 @@ func (gui *Gui) handleContainerAttach(g *gocui.Gui, v *gocui.View) error {
|
|||
return gui.createErrorPanel(err.Error())
|
||||
}
|
||||
|
||||
return gui.runSubprocess(c)
|
||||
return gui.runSubprocessWithMessage(c, gui.Tr.DetachFromContainerShortCut)
|
||||
}
|
||||
|
||||
func (gui *Gui) handlePruneContainers() error {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ import (
|
|||
)
|
||||
|
||||
func (gui *Gui) runSubprocess(cmd *exec.Cmd) error {
|
||||
return gui.runSubprocessWithMessage(cmd, "")
|
||||
}
|
||||
|
||||
func (gui *Gui) runSubprocessWithMessage(cmd *exec.Cmd, msg string) error {
|
||||
gui.Mutexes.SubprocessMutex.Lock()
|
||||
defer gui.Mutexes.SubprocessMutex.Unlock()
|
||||
|
||||
|
|
@ -22,7 +26,7 @@ func (gui *Gui) runSubprocess(cmd *exec.Cmd) error {
|
|||
|
||||
gui.PauseBackgroundThreads = true
|
||||
|
||||
gui.runCommand(cmd)
|
||||
gui.runCommand(cmd, msg)
|
||||
|
||||
if err := gui.g.Resume(); err != nil {
|
||||
return gui.createErrorPanel(err.Error())
|
||||
|
|
@ -33,7 +37,7 @@ func (gui *Gui) runSubprocess(cmd *exec.Cmd) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (gui *Gui) runCommand(cmd *exec.Cmd) {
|
||||
func (gui *Gui) runCommand(cmd *exec.Cmd, msg string) {
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stdout
|
||||
cmd.Stdin = os.Stdin
|
||||
|
|
@ -51,7 +55,9 @@ func (gui *Gui) runCommand(cmd *exec.Cmd) {
|
|||
}()
|
||||
|
||||
fmt.Fprintf(os.Stdout, "\n%s\n\n", utils.ColoredString("+ "+strings.Join(cmd.Args, " "), color.FgBlue))
|
||||
|
||||
if msg != "" {
|
||||
fmt.Fprintf(os.Stdout, "\n%s\n\n", utils.ColoredString(msg, color.FgGreen))
|
||||
}
|
||||
if err := cmd.Run(); err != nil {
|
||||
// not handling the error explicitly because usually we're going to see it
|
||||
// in the output anyway
|
||||
|
|
|
|||
|
|
@ -83,15 +83,16 @@ func dutchSet() TranslationSet {
|
|||
NoVolumes: "Geen volumes",
|
||||
NoNetworks: "Geen networks",
|
||||
|
||||
ConfirmQuit: "Weet je zeker dat je weg wil gaan?",
|
||||
MustForceToRemoveContainer: "Je kan geen draaiende container verwijderen tenzij je het forceert, Wil je het forceren?",
|
||||
NotEnoughSpace: "Niet genoeg ruimte om de panelen te renderen",
|
||||
ConfirmPruneImages: "Weet je zeker dat je alle niet gebruikte images wil vernietigen?",
|
||||
ConfirmPruneContainers: "Weet je zeker dat je alle niet gestopte containers wil vernietigen?",
|
||||
ConfirmPruneVolumes: "Weet je zeker dat je alle niet gebruikte volumes wil vernietigen?",
|
||||
ConfirmPruneNetworks: "Weet je zeker dat je alle niet gebruikte networks wil vernietigen?",
|
||||
StopService: "Weet je zeker dat je deze service zijn containers wil stoppen?",
|
||||
StopContainer: "Weet je zeker dat je deze container wil stoppen?",
|
||||
PressEnterToReturn: "Druk op enter om terug te gaan naar lazydocker (Deze popup kan uit gezet worden door in de config dit neer te zetten `gui.returnImmediately: true`)",
|
||||
ConfirmQuit: "Weet je zeker dat je weg wil gaan?",
|
||||
MustForceToRemoveContainer: "Je kan geen draaiende container verwijderen tenzij je het forceert, Wil je het forceren?",
|
||||
NotEnoughSpace: "Niet genoeg ruimte om de panelen te renderen",
|
||||
ConfirmPruneImages: "Weet je zeker dat je alle niet gebruikte images wil vernietigen?",
|
||||
ConfirmPruneContainers: "Weet je zeker dat je alle niet gestopte containers wil vernietigen?",
|
||||
ConfirmPruneVolumes: "Weet je zeker dat je alle niet gebruikte volumes wil vernietigen?",
|
||||
ConfirmPruneNetworks: "Weet je zeker dat je alle niet gebruikte networks wil vernietigen?",
|
||||
StopService: "Weet je zeker dat je deze service zijn containers wil stoppen?",
|
||||
StopContainer: "Weet je zeker dat je deze container wil stoppen?",
|
||||
PressEnterToReturn: "Druk op enter om terug te gaan naar lazydocker (Deze popup kan uit gezet worden door in de config dit neer te zetten `gui.returnImmediately: true`)",
|
||||
DetachFromContainerShortCut: "Als u wilt loskoppelen van de container, drukt u standaard op ctrl-p en vervolgens op ctrl-q",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ type TranslationSet struct {
|
|||
PruningStatus string
|
||||
StopService string
|
||||
PressEnterToReturn string
|
||||
DetachFromContainerShortCut string
|
||||
StopAllContainers string
|
||||
RemoveAllContainers string
|
||||
ViewRestartOptions string
|
||||
|
|
@ -241,19 +242,20 @@ func englishSet() TranslationSet {
|
|||
NoNetworks: "No networks",
|
||||
NoServices: "No services",
|
||||
|
||||
ConfirmQuit: "Are you sure you want to quit?",
|
||||
ConfirmUpProject: "Are you sure you want to 'up' your docker compose project?",
|
||||
MustForceToRemoveContainer: "You cannot remove a running container unless you force it. Do you want to force it?",
|
||||
NotEnoughSpace: "Not enough space to render panels",
|
||||
ConfirmPruneImages: "Are you sure you want to prune all unused images?",
|
||||
ConfirmPruneContainers: "Are you sure you want to prune all stopped containers?",
|
||||
ConfirmStopContainers: "Are you sure you want to stop all containers?",
|
||||
ConfirmRemoveContainers: "Are you sure you want to remove all containers?",
|
||||
ConfirmPruneVolumes: "Are you sure you want to prune all unused volumes?",
|
||||
ConfirmPruneNetworks: "Are you sure you want to prune all unused networks?",
|
||||
StopService: "Are you sure you want to stop this service's containers?",
|
||||
StopContainer: "Are you sure you want to stop this container?",
|
||||
PressEnterToReturn: "Press enter to return to lazydocker (this prompt can be disabled in your config by setting `gui.returnImmediately: true`)",
|
||||
ConfirmQuit: "Are you sure you want to quit?",
|
||||
ConfirmUpProject: "Are you sure you want to 'up' your docker compose project?",
|
||||
MustForceToRemoveContainer: "You cannot remove a running container unless you force it. Do you want to force it?",
|
||||
NotEnoughSpace: "Not enough space to render panels",
|
||||
ConfirmPruneImages: "Are you sure you want to prune all unused images?",
|
||||
ConfirmPruneContainers: "Are you sure you want to prune all stopped containers?",
|
||||
ConfirmStopContainers: "Are you sure you want to stop all containers?",
|
||||
ConfirmRemoveContainers: "Are you sure you want to remove all containers?",
|
||||
ConfirmPruneVolumes: "Are you sure you want to prune all unused volumes?",
|
||||
ConfirmPruneNetworks: "Are you sure you want to prune all unused networks?",
|
||||
StopService: "Are you sure you want to stop this service's containers?",
|
||||
StopContainer: "Are you sure you want to stop this container?",
|
||||
PressEnterToReturn: "Press enter to return to lazydocker (this prompt can be disabled in your config by setting `gui.returnImmediately: true`)",
|
||||
DetachFromContainerShortCut: "By default, to detach from the container press ctrl-p then ctrl-q",
|
||||
|
||||
No: "no",
|
||||
Yes: "yes",
|
||||
|
|
|
|||
|
|
@ -100,18 +100,19 @@ func frenchSet() TranslationSet {
|
|||
NoVolumes: "Aucun volumes",
|
||||
NoNetworks: "Aucun réseaux",
|
||||
|
||||
ConfirmQuit: "Êtes vous certain de vouloir quitter?",
|
||||
MustForceToRemoveContainer: "Vous ne pouvez pas supprimer un conteneur qui tourne sans le forcer. Voulez-vous le forcer ?",
|
||||
NotEnoughSpace: "Manque d'espace pour afficher les differents panneaux",
|
||||
ConfirmPruneImages: "Êtes-vous certain de vouloir détruire toutes les images non utilisés ?",
|
||||
ConfirmPruneContainers: "Êtes-vous certain de vouloir détruire tous les conteneurs arrêtés ?",
|
||||
ConfirmStopContainers: "Êtes-vous certain de vouloir arrêter tous les conteneurs ?",
|
||||
ConfirmRemoveContainers: "Êtes-vous certain de vouloir supprimer tous les conteneurs ?",
|
||||
ConfirmPruneVolumes: "Êtes-vous certain de vouloir détruire tous les volumes non utilisés ?",
|
||||
ConfirmPruneNetworks: "Êtes-vous certain de vouloir détruire tous les réseaux non utilisés ?",
|
||||
StopService: "Êtes-vous certain de vouloir arrêter le conteneur de ce service ?",
|
||||
StopContainer: "Êtes-vous certain de vouloir arrêter ce conteneur ?",
|
||||
PressEnterToReturn: "Appuiez sur Enter pour revenir à lazydocker (ce message peut être désactivé dans vos configurations en appliquant `gui.returnImmediately: true`)",
|
||||
ConfirmQuit: "Êtes vous certain de vouloir quitter?",
|
||||
MustForceToRemoveContainer: "Vous ne pouvez pas supprimer un conteneur qui tourne sans le forcer. Voulez-vous le forcer ?",
|
||||
NotEnoughSpace: "Manque d'espace pour afficher les differents panneaux",
|
||||
ConfirmPruneImages: "Êtes-vous certain de vouloir détruire toutes les images non utilisés ?",
|
||||
ConfirmPruneContainers: "Êtes-vous certain de vouloir détruire tous les conteneurs arrêtés ?",
|
||||
ConfirmStopContainers: "Êtes-vous certain de vouloir arrêter tous les conteneurs ?",
|
||||
ConfirmRemoveContainers: "Êtes-vous certain de vouloir supprimer tous les conteneurs ?",
|
||||
ConfirmPruneVolumes: "Êtes-vous certain de vouloir détruire tous les volumes non utilisés ?",
|
||||
ConfirmPruneNetworks: "Êtes-vous certain de vouloir détruire tous les réseaux non utilisés ?",
|
||||
StopService: "Êtes-vous certain de vouloir arrêter le conteneur de ce service ?",
|
||||
StopContainer: "Êtes-vous certain de vouloir arrêter ce conteneur ?",
|
||||
PressEnterToReturn: "Appuiez sur Enter pour revenir à lazydocker (ce message peut être désactivé dans vos configurations en appliquant `gui.returnImmediately: true`)",
|
||||
DetachFromContainerShortCut: "Par défaut, pour se détacher du conteneur appuyez sur ctrl-p puis ctrl-q",
|
||||
|
||||
No: "non",
|
||||
Yes: "oui",
|
||||
|
|
|
|||
|
|
@ -82,15 +82,16 @@ func germanSet() TranslationSet {
|
|||
NoVolumes: "Keine Volumes",
|
||||
NoNetworks: "Keine Netzwerk",
|
||||
|
||||
ConfirmQuit: "Bist du dir sicher, dass du verlassen möchtest?",
|
||||
MustForceToRemoveContainer: "Du kannst keinen Container entfernen, der noch ausgeführt wird außer du erzwingst es. Möchtest du es erzwingen?",
|
||||
NotEnoughSpace: "Nicht genug Platz um die Panel darzustellen",
|
||||
ConfirmPruneImages: "Bist du dir sicher, dass du alle unbenutzten Images entfernen möchtest?",
|
||||
ConfirmPruneContainers: "Bist du dir sicher, dass du alle angehaltenen Container entfernen möchtes?",
|
||||
ConfirmPruneVolumes: "Bist du dir sicher, dass du alle unbenutzen Volumes entfernen möchtest?",
|
||||
ConfirmPruneNetworks: "Bist du dir sicher, dass du alle unbenutzen Netzwerk entfernen möchtest?",
|
||||
StopService: "Bist du dir sicher, dass du den Dienst dieses Containers anhalten möchtest?",
|
||||
StopContainer: "Bist du dir sicher, dass du den Container anhalten möchtest?",
|
||||
PressEnterToReturn: "Drücke Eingabe um zu lazydocker zurückzukehren. (Diese Nachfrage kann in Deiner Konfiguration deaktiviert werden, indem du folgenden Wert setzt: `gui.returnImmediately: true`)",
|
||||
ConfirmQuit: "Bist du dir sicher, dass du verlassen möchtest?",
|
||||
MustForceToRemoveContainer: "Du kannst keinen Container entfernen, der noch ausgeführt wird außer du erzwingst es. Möchtest du es erzwingen?",
|
||||
NotEnoughSpace: "Nicht genug Platz um die Panel darzustellen",
|
||||
ConfirmPruneImages: "Bist du dir sicher, dass du alle unbenutzten Images entfernen möchtest?",
|
||||
ConfirmPruneContainers: "Bist du dir sicher, dass du alle angehaltenen Container entfernen möchtes?",
|
||||
ConfirmPruneVolumes: "Bist du dir sicher, dass du alle unbenutzen Volumes entfernen möchtest?",
|
||||
ConfirmPruneNetworks: "Bist du dir sicher, dass du alle unbenutzen Netzwerk entfernen möchtest?",
|
||||
StopService: "Bist du dir sicher, dass du den Dienst dieses Containers anhalten möchtest?",
|
||||
StopContainer: "Bist du dir sicher, dass du den Container anhalten möchtest?",
|
||||
PressEnterToReturn: "Drücke Eingabe um zu lazydocker zurückzukehren. (Diese Nachfrage kann in Deiner Konfiguration deaktiviert werden, indem du folgenden Wert setzt: `gui.returnImmediately: true`)",
|
||||
DetachFromContainerShortCut: "Um sich vom Container zu trennen, drücken Sie standardmäßig ctrl-p und dann ctrl-q",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,15 +82,16 @@ func polishSet() TranslationSet {
|
|||
NoVolumes: "Brak wolumenów",
|
||||
NoNetworks: "Brak sieci",
|
||||
|
||||
ConfirmQuit: "Na pewno chcesz wyjść?",
|
||||
MustForceToRemoveContainer: "Nie możesz usunąć uruchomionego kontenera dopóki nie zrobisz tego siłą. Chcesz wykonać to z siłą?",
|
||||
NotEnoughSpace: "Niedostateczna ilość miejsca do wyświetlenia paneli",
|
||||
ConfirmPruneImages: "Na pewno wyczyścić wszystkie nieużywane obrazy?",
|
||||
ConfirmPruneContainers: "Na pewno wyczyścić wszystkie nieuruchomione kontenery?",
|
||||
ConfirmPruneVolumes: "Na pewno wyczyścić wszystkie nieużywane wolumeny?",
|
||||
ConfirmPruneNetworks: "Na pewno wyczyścić wszystkie nieużywane seici?",
|
||||
StopService: "Na pewno zatrzymać kontenery tego serwisu?",
|
||||
StopContainer: "Na pewno zatrzymać ten kontener?",
|
||||
PressEnterToReturn: "Wciśnij enter aby powrócić do lazydockera (ten komunikat może być wyłączony w konfiguracji poprzez ustawienie `gui.returnImmediately: true`)",
|
||||
ConfirmQuit: "Na pewno chcesz wyjść?",
|
||||
MustForceToRemoveContainer: "Nie możesz usunąć uruchomionego kontenera dopóki nie zrobisz tego siłą. Chcesz wykonać to z siłą?",
|
||||
NotEnoughSpace: "Niedostateczna ilość miejsca do wyświetlenia paneli",
|
||||
ConfirmPruneImages: "Na pewno wyczyścić wszystkie nieużywane obrazy?",
|
||||
ConfirmPruneContainers: "Na pewno wyczyścić wszystkie nieuruchomione kontenery?",
|
||||
ConfirmPruneVolumes: "Na pewno wyczyścić wszystkie nieużywane wolumeny?",
|
||||
ConfirmPruneNetworks: "Na pewno wyczyścić wszystkie nieużywane seici?",
|
||||
StopService: "Na pewno zatrzymać kontenery tego serwisu?",
|
||||
StopContainer: "Na pewno zatrzymać ten kontener?",
|
||||
PressEnterToReturn: "Wciśnij enter aby powrócić do lazydockera (ten komunikat może być wyłączony w konfiguracji poprzez ustawienie `gui.returnImmediately: true`)",
|
||||
DetachFromContainerShortCut: "Domyślnie, aby odłączyć się od kontenera, naciśnij ctrl-p, a następnie ctrl-q",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,15 +82,16 @@ func turkishSet() TranslationSet {
|
|||
NoVolumes: "Alanlar yok",
|
||||
NoNetworks: "Ağları yok",
|
||||
|
||||
ConfirmQuit: "Çıkmak istediğine emin misin?",
|
||||
MustForceToRemoveContainer: "Zorlamadan çalışan bir konteyneri kaldıramazsınız. Zorlamak ister misin?",
|
||||
NotEnoughSpace: "Panelleri oluşturmak için yeterli alan yok",
|
||||
ConfirmPruneImages: "Kullanılmayan tüm görüntüleri temizlemek istediğinize emin misiniz?",
|
||||
ConfirmPruneContainers: "Durdurulan tüm konteynerları temizlemek istediğinizden emin misiniz?",
|
||||
ConfirmPruneVolumes: "Kullanılmayan tüm alanları temizlemek istediğinizden emin misiniz?",
|
||||
ConfirmPruneNetworks: "Kullanılmayan tüm ağları temizlemek istediğinizden emin misiniz?",
|
||||
StopService: "Bu servisin konteynerlerini durdurmak istediğinize emin misiniz?",
|
||||
StopContainer: "Bu konteyneri durdurmak istediğinize emin misiniz?",
|
||||
PressEnterToReturn: "lazydocker' a geri dönmek için enter tuşuna basın ( Bu uyarı, `gui.return Immediately: true` ayarıyla devre dışı bırakılabilir)",
|
||||
ConfirmQuit: "Çıkmak istediğine emin misin?",
|
||||
MustForceToRemoveContainer: "Zorlamadan çalışan bir konteyneri kaldıramazsınız. Zorlamak ister misin?",
|
||||
NotEnoughSpace: "Panelleri oluşturmak için yeterli alan yok",
|
||||
ConfirmPruneImages: "Kullanılmayan tüm görüntüleri temizlemek istediğinize emin misiniz?",
|
||||
ConfirmPruneContainers: "Durdurulan tüm konteynerları temizlemek istediğinizden emin misiniz?",
|
||||
ConfirmPruneVolumes: "Kullanılmayan tüm alanları temizlemek istediğinizden emin misiniz?",
|
||||
ConfirmPruneNetworks: "Kullanılmayan tüm ağları temizlemek istediğinizden emin misiniz?",
|
||||
StopService: "Bu servisin konteynerlerini durdurmak istediğinize emin misiniz?",
|
||||
StopContainer: "Bu konteyneri durdurmak istediğinize emin misiniz?",
|
||||
PressEnterToReturn: "lazydocker' a geri dönmek için enter tuşuna basın ( Bu uyarı, `gui.return Immediately: true` ayarıyla devre dışı bırakılabilir)",
|
||||
DetachFromContainerShortCut: "Varsayılan olarak, kaptan ayırmak için ctrl-p ve ardından ctrl-q tuşlarına basın",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue