Skip to content

Commit

Permalink
chore: Update documentation links and version to 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yarlson committed Jul 16, 2024
1 parent c860b97 commit b4df35f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmd/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var (
var fileCmd = &cobra.Command{
Use: "file",
Short: "Upload and download files",
Long: "Lokalise is a project-oriented translation management system, which means we store all keys and translations in the database and can generate files in any format you require. Assigning a key to one or more platforms means including the key in the export routine for file formats, associated with this platform, e.g. if a key is assigned to iOS platform it would get included with strings and xliff format exports. In addition to assign keys to platforms you may assign keys to files and have different filename depending on the platform. List of supported file formats is available here https://docs.lokalise.com/supported-file-formats.",
Long: "Lokalise is a project-oriented translation management system, which means we store all keys and translations in the database and can generate files in any format you require. Assigning a key to one or more platforms means including the key in the export routine for file formats, associated with this platform, e.g. if a key is assigned to iOS platform it would get included with strings and xliff format exports. In addition to assign keys to platforms you may assign keys to files and have different filename depending on the platform. List of supported file formats is available here https://docs.lokalise.com/en/collections/2909121-keys-and-files#supported-file-formats.",
}

var fileListCmd = &cobra.Command{
Expand All @@ -85,7 +85,7 @@ var fileListCmd = &cobra.Command{
var fileUploadCmd = &cobra.Command{
Use: "upload",
Short: "Upload a file",
Long: "Imports a localization file to the project. Requires Upload files admin right. List of supported file formats is available here https://docs.lokalise.com/supported-file-formats",
Long: "Imports a localization file to the project. Requires Upload files admin right. List of supported file formats is available here https://docs.lokalise.com/en/collections/2909121-keys-and-files#supported-file-formats.",
RunE: func(*cobra.Command, []string) error {
f := Api.Files()
q := Api.QueuedProcesses()
Expand Down
10 changes: 6 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ package cmd
import (
"encoding/json"
"fmt"
"log"
"os"

"github.com/lokalise/go-lokalise-api/v4"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"log"
"os"
)

const (
Version = "3.0.0"
Version = "3.0.1"
DefaultPageLimit = 5000
)

Expand Down Expand Up @@ -50,6 +51,7 @@ var rootCmd = &cobra.Command{

return err
},
DisableAutoGenTag: true,
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand All @@ -74,7 +76,7 @@ func init() {
cobra.OnInitialize(parseConfig)

rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is ./config.yml)")
rootCmd.PersistentFlags().StringVarP(&Token, "token", "t", "", "API token. You can create API tokens at https://lokalise.com/profile.")
rootCmd.PersistentFlags().StringVarP(&Token, "token", "t", "", "API token. You can create API tokens at https://app.lokalise.com/profile.")

// binding
_ = viper.BindPFlag("token", rootCmd.PersistentFlags().Lookup("token"))
Expand Down
4 changes: 2 additions & 2 deletions cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ func init() {
fs := webhookCreateCmd.Flags()
fs.StringVar(&newWebhook.URL, "url", "", "Specify the URL to your endpoint (required).")
_ = webhookCreateCmd.MarkFlagRequired("url")
fs.StringSliceVar(&newWebhook.Events, "events", []string{}, "List of events to subscribe to (required, see https://docs.lokalise.com/en/articles/3184756-webhooks).")
fs.StringSliceVar(&newWebhook.Events, "events", []string{}, "List of events to subscribe to (required, see https://developers.lokalise.com/docs/webhook-events).")
_ = webhookCreateCmd.MarkFlagRequired("events")
fs.StringVar(&eventLanguageMap, "event-lang-map", "", "Map the event with an array of languages iso codes. Omit this parameter for all languages in the project. JSON, see https://lokalise.com/api2docs/curl/#resource-webhooks")
fs.StringVar(&newWebhook.Branch, "branch", "", "If webhook is limited to a single branch")

// Update
fs = webhookUpdateCmd.Flags()
fs.StringVar(&updateWebhook.URL, "url", "", "Update the URL to your endpoint.")
fs.StringSliceVar(&updateWebhook.Events, "events", []string{}, "Replace list of events, see https://docs.lokalise.com/en/articles/3184756-webhooks.")
fs.StringSliceVar(&updateWebhook.Events, "events", []string{}, "Replace list of events, see https://developers.lokalise.com/docs/webhook-events.")
fs.StringVar(&eventLanguageMap, "event-lang-map", "", "Map the event with an array of languages iso codes. Omit this parameter for all languages in the project.")
fs.StringVar(&newWebhook.Branch, "branch", "", "If webhook is limited to a single branch")

Expand Down

0 comments on commit b4df35f

Please sign in to comment.