show exit option for file deletion in red
This commit is contained in:
parent
10f892323e
commit
90265e7080
@ -92,7 +92,7 @@ func exit() {
|
|||||||
s := bufio.NewScanner(os.Stdin)
|
s := bufio.NewScanner(os.Stdin)
|
||||||
s.Split(bufio.ScanRunes)
|
s.Split(bufio.ScanRunes)
|
||||||
|
|
||||||
fmt.Print(Translate("exit? [y/N]: "))
|
fmt.Print(Translate("exit? [%s/%s]: ", "y", "N"))
|
||||||
if s.Scan() {
|
if s.Scan() {
|
||||||
text := strings.ToLower(s.Text())
|
text := strings.ToLower(s.Text())
|
||||||
if text == "y" || text == "yes" {
|
if text == "y" || text == "yes" {
|
||||||
@ -108,7 +108,7 @@ func exit() {
|
|||||||
s := bufio.NewScanner(os.Stdin)
|
s := bufio.NewScanner(os.Stdin)
|
||||||
s.Split(bufio.ScanRunes)
|
s.Split(bufio.ScanRunes)
|
||||||
|
|
||||||
fmt.Print(Translate("Delete files? [y/N/c]: "))
|
fmt.Print(Translate("Delete files? [%s/%s/%s]: ", ColorRed.Sprint("y"), "n", "C"))
|
||||||
if s.Scan() {
|
if s.Scan() {
|
||||||
text := strings.ToLower(s.Text())
|
text := strings.ToLower(s.Text())
|
||||||
if text == "y" || text == "yes" {
|
if text == "y" || text == "yes" {
|
||||||
|
@ -23,7 +23,6 @@ var Languages = map[string]map[string]string{
|
|||||||
"Total size: %s": "Gesamtgröße: %s",
|
"Total size: %s": "Gesamtgröße: %s",
|
||||||
"'%s' could not be found": "'%s' konnte nicht gefunden werden",
|
"'%s' could not be found": "'%s' konnte nicht gefunden werden",
|
||||||
"Could not delete '%s': %s": "'%s' konnte nicht gelöscht werden: %s",
|
"Could not delete '%s': %s": "'%s' konnte nicht gelöscht werden: %s",
|
||||||
"Delete files? [y/N/c]: ": "Dateien löschen? [y/N/c]: ",
|
|
||||||
"ambiguous path: %s": "Nicht eindeutiger Pfad: %s",
|
"ambiguous path: %s": "Nicht eindeutiger Pfad: %s",
|
||||||
"possible paths:\n%s": "Mögliche Pfade:\n%s",
|
"possible paths:\n%s": "Mögliche Pfade:\n%s",
|
||||||
"Commands:": "Befehle:",
|
"Commands:": "Befehle:",
|
||||||
@ -33,7 +32,8 @@ var Languages = map[string]map[string]string{
|
|||||||
"urm: unmark files for removal": "urm: Entmarkiere Dateien zur Löschung",
|
"urm: unmark files for removal": "urm: Entmarkiere Dateien zur Löschung",
|
||||||
"exit: delete marked files and exit": "exit: Lösche markierte Dateien und beende Programm",
|
"exit: delete marked files and exit": "exit: Lösche markierte Dateien und beende Programm",
|
||||||
"Use command 'exit' for exiting properly": "Nutze den Befehl 'exit', um das Programm ordnungsgemäß zu beenden",
|
"Use command 'exit' for exiting properly": "Nutze den Befehl 'exit', um das Programm ordnungsgemäß zu beenden",
|
||||||
"exit? [y/N]: ": "Beenden? [y/N]: ",
|
"Delete files? [%s/%s/%s]: ": "Dateien löschen? [%s/%s/%s]: ",
|
||||||
|
"exit? [%s/%s]: ": "Beenden? [%s/%s]: ",
|
||||||
},
|
},
|
||||||
"ja": {
|
"ja": {
|
||||||
"fileCountFormat": "%d個",
|
"fileCountFormat": "%d個",
|
||||||
@ -47,7 +47,6 @@ var Languages = map[string]map[string]string{
|
|||||||
"Total size: %s": "全額: %s",
|
"Total size: %s": "全額: %s",
|
||||||
"'%s' could not be found": "「%s」が見つかりませんでした",
|
"'%s' could not be found": "「%s」が見つかりませんでした",
|
||||||
"Could not delete '%s': %s": "「%s」が削除できませんでした: %s",
|
"Could not delete '%s': %s": "「%s」が削除できませんでした: %s",
|
||||||
"Delete files? [y/N/c]: ": "削除してほしいですか? [y/N/c]: ",
|
|
||||||
"ambiguous path: %s": "あいまいなパス: %s",
|
"ambiguous path: %s": "あいまいなパス: %s",
|
||||||
"possible paths:\n%s": "可能なパス:\n%s",
|
"possible paths:\n%s": "可能なパス:\n%s",
|
||||||
"Commands:": "コマンド:",
|
"Commands:": "コマンド:",
|
||||||
@ -57,7 +56,8 @@ var Languages = map[string]map[string]string{
|
|||||||
"urm: unmark files for removal": "urm: ファイルに削除のマークを除きます",
|
"urm: unmark files for removal": "urm: ファイルに削除のマークを除きます",
|
||||||
"exit: delete marked files and exit": "exit: 削除のマークされたファイルを削除して終了",
|
"exit: delete marked files and exit": "exit: 削除のマークされたファイルを削除して終了",
|
||||||
"Use command 'exit' for exiting properly": "「exit」コマンドを使って終了します",
|
"Use command 'exit' for exiting properly": "「exit」コマンドを使って終了します",
|
||||||
"exit? [y/N]: ": "終了してほしいですか? [y/N]: ",
|
"Delete files? [%s/%s/%s]: ": "削除してほしいですか? [%s/%s/%s]: ",
|
||||||
|
"exit? [%s/%s]: ": "終了してほしいですか? [%s/%s]: ",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user