diff --git a/VERSION b/VERSION index e05cd469..38f77a65 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0-alpha.1 +2.0.1 diff --git a/go.mod b/go.mod index 00176269..80c8b83b 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/cobra v1.8.0 github.com/vanilla-os/differ/diff v0.0.0-20231226220222-4f9298cef551 - github.com/vanilla-os/orchid v0.4.0 + github.com/vanilla-os/orchid v0.5.0 github.com/vanilla-os/prometheus v0.2.0 golang.org/x/sys v0.16.0 ) diff --git a/go.sum b/go.sum index 1fb722d8..b1fa9888 100644 --- a/go.sum +++ b/go.sum @@ -435,8 +435,8 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/vanilla-os/differ/diff v0.0.0-20231226220222-4f9298cef551 h1:BKXrzgTCUfSFcFy6PNvePR/ETcAsrM19oP+Qo9Ztf/c= github.com/vanilla-os/differ/diff v0.0.0-20231226220222-4f9298cef551/go.mod h1:HMg24arXCutcwngVaJ4DQuhwLmS8CA/CuVSjEyIxFpw= -github.com/vanilla-os/orchid v0.4.0 h1:Phx+WSdcvXAV48rCLbAVMr5ePaJyqG1263ybHxOUvYQ= -github.com/vanilla-os/orchid v0.4.0/go.mod h1:dNPvHxofO4hEXodEKXp0nLQDZhoHh8evCUXc6X1xLao= +github.com/vanilla-os/orchid v0.5.0 h1:QAOjJ2VcyND5TxK0XYUEu+dysxXicRHhV6i/07S47mk= +github.com/vanilla-os/orchid v0.5.0/go.mod h1:dNPvHxofO4hEXodEKXp0nLQDZhoHh8evCUXc6X1xLao= github.com/vanilla-os/prometheus v0.2.0 h1:fPEW6FucgmLI2dWriKcuE341gV1+wGDKzAkejcCKDT8= github.com/vanilla-os/prometheus v0.2.0/go.mod h1:Ilao6APSwX7sk1SJSrmi4TNtiJtaQgb0QWRbEqs3Cpw= github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= diff --git a/main.go b/main.go index 03367ffb..fd7a4094 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,7 @@ import ( ) var ( - Version = "2.0.0-alpha.1" + Version = "2.0.1" ) //go:embed locales/*.yml diff --git a/vendor/github.com/vanilla-os/orchid/README.md b/vendor/github.com/vanilla-os/orchid/README.md index 72a60037..16006657 100644 --- a/vendor/github.com/vanilla-os/orchid/README.md +++ b/vendor/github.com/vanilla-os/orchid/README.md @@ -1,11 +1,5 @@ [![build](https://github.com/Vanilla-OS/orchid/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Vanilla-OS/orchid/actions/workflows/build.yml) # orchid -VanillaOS common libraries - -## log - -## cmdr - -## orchid binary +VanillaOS common libraries. diff --git a/vendor/github.com/vanilla-os/orchid/cmdr/app.go b/vendor/github.com/vanilla-os/orchid/cmdr/app.go index c6927872..2184b871 100644 --- a/vendor/github.com/vanilla-os/orchid/cmdr/app.go +++ b/vendor/github.com/vanilla-os/orchid/cmdr/app.go @@ -42,7 +42,7 @@ func NewApp(name string, version string, locales embed.FS) *App { Error.Println(err) os.Exit(1) } - i18n.SetDefaultLocale(orchid.Locale()) + i18n.SetDefaultLocale(getLocale(locales)) a := &App{ Name: name, Logger: log.Default(), @@ -57,6 +57,17 @@ func NewApp(name string, version string, locales embed.FS) *App { return a } +func getLocale(locales embed.FS) string { + found := orchid.Locale() + // if the found locale is not supported by the orchid app (it does not + // exist in the embedded locales FS), then use the default "en" locale + _, err := locales.ReadFile(path.Join("locales", found+".yml")) + if err != nil { + found = "en" + } + return found +} + func (a *App) logSetup() error { err := a.ensureLogDir() if err != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index 570fd6d8..9e7c5dfc 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -759,7 +759,7 @@ github.com/ulikunitz/xz/lzma # github.com/vanilla-os/differ/diff v0.0.0-20231226220222-4f9298cef551 ## explicit; go 1.21.4 github.com/vanilla-os/differ/diff -# github.com/vanilla-os/orchid v0.4.0 +# github.com/vanilla-os/orchid v0.5.0 ## explicit; go 1.19 github.com/vanilla-os/orchid github.com/vanilla-os/orchid/cmdr