Mark user interface strings

For now exclude command help, as cobra itself is not localizable yet.
This commit is contained in:
Philipp Wolfer 2023-12-09 16:43:14 +01:00
parent 511b71b909
commit d6ca8d33f7
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
27 changed files with 1005 additions and 95 deletions

View file

@ -21,8 +21,8 @@ import (
"os"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.uploadedlobster.com/scotty/internal/config"
"go.uploadedlobster.com/scotty/internal/i18n"
"go.uploadedlobster.com/scotty/internal/version"
)
@ -32,8 +32,8 @@ var cfgFile string
var rootCmd = &cobra.Command{
Use: version.AppName,
Short: "Beam data between music listening services",
Long: `Scotty transfers your listens/scrobbles between ListenBrainz and
various other listening and streaming services.`,
Long: `Scotty transfers listens and loves between different listening and streaming
services. Run "scotty backends" for a list of supported service backends.`,
Version: version.AppVersion,
// Uncomment the following line if your bare application
// has an action associated with it:
@ -69,8 +69,6 @@ func init() {
func initConfig() {
// If a config file is found, read it in.
if err := config.InitConfig(cfgFile); err != nil {
fmt.Fprintln(os.Stderr, "Failed reading config:", err)
} else {
fmt.Println("Using config file:", viper.ConfigFileUsed())
fmt.Fprintln(os.Stderr, i18n.Tr("Failed reading config: %v", err))
}
}