mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-25 05:47:57 +02:00
Mark user interface strings
For now exclude command help, as cobra itself is not localizable yet.
This commit is contained in:
parent
511b71b909
commit
d6ca8d33f7
27 changed files with 1005 additions and 95 deletions
|
@ -26,12 +26,13 @@ import (
|
|||
|
||||
"github.com/spf13/cobra"
|
||||
"go.uploadedlobster.com/scotty/internal/cli"
|
||||
"go.uploadedlobster.com/scotty/internal/i18n"
|
||||
)
|
||||
|
||||
var serviceEditCmd = &cobra.Command{
|
||||
Use: "edit",
|
||||
Short: "Edit existing service configuration",
|
||||
Long: `Edit an existing service configuration.`,
|
||||
Long: `Edit an existing service in the configuration file.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
service, err := cli.SelectService()
|
||||
cobra.CheckErr(err)
|
||||
|
@ -48,7 +49,7 @@ var serviceEditCmd = &cobra.Command{
|
|||
// Save the service config
|
||||
err = service.Save()
|
||||
cobra.CheckErr(err)
|
||||
fmt.Printf("Updated service %v using backend %v\n", service.Name, service.Backend)
|
||||
fmt.Println(i18n.Tr("Updated service %v using backend %v\n", service.Name, service.Backend))
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue