mirror of
https://github.com/Cheviiot/Vintner.git
synced 2026-08-03 15:57:24 +00:00
Add short subcommand aliases and EN/RU CLI localization
Subcommands gain one/two-letter aliases (dl, i, e, v, h) alongside their full names. CLI-owned chrome - top-level usage, per-subcommand usage lines, progress messages, and the license prompt - now goes through internal/i18n, an env-driven message catalog (MSVC_GO_WINE_LANG, falling back to the standard LC_ALL/LC_MESSAGES/LANG locale variables) with English and Russian translations. Deeper error text from internal packages stays in English. Also refreshed the top-level usage text, which hadn't kept up with --with-wdk/--list-workloads/--list-components/--print-deps-tree.
This commit is contained in:
@@ -4,12 +4,13 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/Cheviiot/msvc-go-wine/internal/i18n"
|
||||
"github.com/Cheviiot/msvc-go-wine/internal/install"
|
||||
)
|
||||
|
||||
func runInstall(args []string) int {
|
||||
if len(args) > 1 || (len(args) == 1 && (args[0] == "-h" || args[0] == "--help")) {
|
||||
fmt.Fprintln(os.Stderr, "usage: msvc-go-wine install [dest] (default: ~/.msvc-go-wine)")
|
||||
fmt.Fprintln(os.Stderr, i18n.T("install.usage"))
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -23,7 +24,7 @@ func runInstall(args []string) int {
|
||||
return 1
|
||||
}
|
||||
dest = def
|
||||
fmt.Println("No directory given, using default:", dest)
|
||||
fmt.Println(i18n.T("install.default_dir", dest))
|
||||
}
|
||||
|
||||
self, err := os.Executable()
|
||||
@@ -36,6 +37,6 @@ func runInstall(args []string) int {
|
||||
fmt.Fprintln(os.Stderr, "msvc-go-wine install:", err)
|
||||
return 1
|
||||
}
|
||||
fmt.Println("Done. Add", dest+"/bin/<arch> to PATH to use cl, link, lib, ...")
|
||||
fmt.Println(i18n.T("install.done", dest+"/bin/<arch>"))
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user