WIP: feat: translation support
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
See #483
This commit is contained in:
@ -7,22 +7,23 @@ import (
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/leonelquinteros/gotext"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// UpgradeCommand upgrades abra in-place.
|
||||
var UpgradeCommand = &cobra.Command{
|
||||
Use: "upgrade [flags]",
|
||||
Use: gotext.Get("upgrade [flags]"),
|
||||
Aliases: []string{"u"},
|
||||
Short: "Upgrade abra",
|
||||
Long: `Upgrade abra in-place with the latest stable or release candidate.
|
||||
Short: gotext.Get("Upgrade abra"),
|
||||
Long: gotext.Get(`Upgrade abra in-place with the latest stable or release candidate.
|
||||
|
||||
By default, the latest stable release is downloaded.
|
||||
|
||||
Use "--rc/-r" to install the latest release candidate. Please bear in mind that
|
||||
it may contain absolutely catastrophic deal-breaker bugs. Thank you very much
|
||||
for the testing efforts 💗`,
|
||||
Example: " abra upgrade --rc",
|
||||
for the testing efforts 💗`),
|
||||
Example: gotext.Get(" abra upgrade --rc"),
|
||||
Args: cobra.NoArgs,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
mainURL := "https://install.abra.coopcloud.tech"
|
||||
@ -33,7 +34,7 @@ for the testing efforts 💗`,
|
||||
c = exec.Command("bash", "-c", fmt.Sprintf("wget -q -O- %s | bash -s -- --rc", releaseCandidateURL))
|
||||
}
|
||||
|
||||
log.Debugf("attempting to run %s", c)
|
||||
log.Debugf(gotext.Get("attempting to run %s", c))
|
||||
|
||||
if err := internal.RunCmd(c); err != nil {
|
||||
log.Fatal(err)
|
||||
@ -51,6 +52,6 @@ func init() {
|
||||
"rc",
|
||||
"r",
|
||||
false,
|
||||
"install release candidate (may contain bugs)",
|
||||
gotext.Get("install release candidate (may contain bugs)"),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user