Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix profile link in help messages and update the app version in md files #122

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/contributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"encoding/json"

"github.com/lokalise/go-lokalise-api/v4"
"github.com/spf13/cobra"
)
Expand Down
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
1 change: 1 addition & 0 deletions cmd/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"encoding/json"

"github.com/lokalise/go-lokalise-api/v4"
"github.com/spf13/cobra"
)
Expand Down
1 change: 1 addition & 0 deletions cmd/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"encoding/json"
"fmt"

"github.com/lokalise/go-lokalise-api/v4"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
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
1 change: 1 addition & 0 deletions cmd/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"encoding/json"

"github.com/lokalise/go-lokalise-api/v4"
"github.com/spf13/cobra"
)
Expand Down
1 change: 1 addition & 0 deletions cmd/teamusergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"encoding/json"

"github.com/lokalise/go-lokalise-api/v4"
"github.com/spf13/cobra"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"encoding/json"

"github.com/lokalise/go-lokalise-api/v4"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -121,15 +122,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
9 changes: 2 additions & 7 deletions docs/lokalise2.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
## lokalise2

Lokalise CLI v2.6.8. Read the docs at https://github.com/lokalise/lokalise-cli-2-go

### Synopsis

Lokalise CLI v2.6.8. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
Lokalise CLI v3.0.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go

### Options

```
--config string config file (default is ./config.yml)
-h, --help help for lokalise2
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO
Expand All @@ -37,4 +33,3 @@ Lokalise CLI v2.6.8. Read the docs at https://github.com/lokalise/lokalise-cli-2
* [lokalise2 translation-status](lokalise2_translation-status.md) - Manage custom translation statuses
* [lokalise2 webhook](lokalise2_webhook.md) - Manage webhooks

###### Auto generated by spf13/cobra on 21-Oct-2021
9 changes: 2 additions & 7 deletions docs/lokalise2_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

Manage branches

### Synopsis

Manage branches

### Options

```
Expand All @@ -17,14 +13,13 @@ Manage branches

```
--config string config file (default is ./config.yml)
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.6.8. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v3.0.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 branch create](lokalise2_branch_create.md) - Create a branch
* [lokalise2 branch delete](lokalise2_branch_delete.md) - Delete a branch
* [lokalise2 branch list](lokalise2_branch_list.md) - List all branches

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_branch_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ lokalise2 branch create [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 branch](lokalise2_branch.md) - Manage branches

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_branch_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ lokalise2 branch delete [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 branch](lokalise2_branch.md) - Manage branches

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_branch_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ lokalise2 branch list [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 branch](lokalise2_branch.md) - Manage branches

###### Auto generated by spf13/cobra on 21-Oct-2021
5 changes: 2 additions & 3 deletions docs/lokalise2_comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ Comments can be used to give translators a context about the key, or as a discus

```
--config string config file (default is ./config.yml)
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.6.8. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v3.0.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 comment create](lokalise2_comment_create.md) - Add a comment
* [lokalise2 comment delete](lokalise2_comment_delete.md) - Delete a comment
* [lokalise2 comment list](lokalise2_comment_list.md) - List project comments
* [lokalise2 comment list-key](lokalise2_comment_list-key.md) - List key comments
* [lokalise2 comment retrieve](lokalise2_comment_retrieve.md) - Retrieve a comment

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_comment_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ lokalise2 comment create [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 comment](lokalise2_comment.md) - Manage key comments

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_comment_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ lokalise2 comment delete [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 comment](lokalise2_comment.md) - Manage key comments

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_comment_list-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ lokalise2 comment list-key [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 comment](lokalise2_comment.md) - Manage key comments

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_comment_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ lokalise2 comment list [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 comment](lokalise2_comment.md) - Manage key comments

###### Auto generated by spf13/cobra on 21-Oct-2021
7 changes: 1 addition & 6 deletions docs/lokalise2_comment_retrieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

Retrieve a comment

### Synopsis

Retrieve a comment

```
lokalise2 comment retrieve [flags]
```
Expand All @@ -23,11 +19,10 @@ lokalise2 comment retrieve [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 comment](lokalise2_comment.md) - Manage key comments

###### Auto generated by spf13/cobra on 21-Oct-2021
5 changes: 2 additions & 3 deletions docs/lokalise2_contributor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ You may add unlimited number of contributors to your project. User roles include

```
--config string config file (default is ./config.yml)
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.6.8. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v3.0.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 contributor create](lokalise2_contributor_create.md) - Create a contributor
* [lokalise2 contributor delete](lokalise2_contributor_delete.md) - Delete a contributor
* [lokalise2 contributor list](lokalise2_contributor_list.md) - List all contributors
* [lokalise2 contributor retrieve](lokalise2_contributor_retrieve.md) - Retrieve a contributor
* [lokalise2 contributor update](lokalise2_contributor_update.md) - Update a contributor

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_contributor_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ lokalise2 contributor create [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 contributor](lokalise2_contributor.md) - Manage project contributors

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_contributor_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ lokalise2 contributor delete [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 contributor](lokalise2_contributor.md) - Manage project contributors

###### Auto generated by spf13/cobra on 21-Oct-2021
3 changes: 1 addition & 2 deletions docs/lokalise2_contributor_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ lokalise2 contributor list [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 contributor](lokalise2_contributor.md) - Manage project contributors

###### Auto generated by spf13/cobra on 21-Oct-2021
7 changes: 1 addition & 6 deletions docs/lokalise2_contributor_retrieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

Retrieve a contributor

### Synopsis

Retrieve a contributor

```
lokalise2 contributor retrieve [flags]
```
Expand All @@ -22,11 +18,10 @@ lokalise2 contributor retrieve [flags]
```
--config string config file (default is ./config.yml)
--project-id string Unique project identifier (required).
-t, --token string API token. You can create API tokens at https://lokalise.com/profile.
-t, --token string API token. You can create API tokens at https://app.lokalise.com/profile.
```

### SEE ALSO

* [lokalise2 contributor](lokalise2_contributor.md) - Manage project contributors

###### Auto generated by spf13/cobra on 21-Oct-2021
Loading
Loading