Skip to content

Commit

Permalink
CLI-8 Fix parameter naming
Browse files Browse the repository at this point in the history
+ version bump
+ docs update
  • Loading branch information
andrewLab-lokalise committed May 28, 2020
1 parent e394077 commit b7032a1
Show file tree
Hide file tree
Showing 25 changed files with 44 additions and 38 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ If you are using project branching feature in Lokalise, simply add branch name s
Optionally, you may rename included `config-example.yml` to `config.yml` and set various CLI tool parameters like token or timeouts. You can specify a config file location using `--config` parameter.

## Changes
**2.5.1 (May 28, 2020)**

- Fix flag naming typo for file upload
- Changed `--pool` to `--poll`
- Changed `--pool-timeout` to `--poll`

**2.5.0 (May 28, 2020)**

- Added queued process [commands](docs/lokalise2_queued-process.md)
Expand Down
26 changes: 13 additions & 13 deletions cmd/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/spf13/cobra"
)

const poolingFrequency = 2 * time.Second
const pollingFrequency = 2 * time.Second

var (
filterFilename string
Expand Down Expand Up @@ -49,8 +49,8 @@ var (

uploadIncludePath bool

uploadPooling bool
uploadPoolingTimeout time.Duration
uploadPolling bool
uploadPollingTimeout time.Duration

uploadFile string
)
Expand Down Expand Up @@ -131,7 +131,7 @@ var fileUploadCmd = &cobra.Command{
return err
}

if !uploadPooling {
if !uploadPolling {
_ = printJson(resp)
continue
}
Expand All @@ -142,10 +142,10 @@ var fileUploadCmd = &cobra.Command{
defer wg.Done()
defer close(errs)

poolUntil := time.Now().Add(uploadPoolingTimeout)
pollUntil := time.Now().Add(uploadPollingTimeout)
for {
if time.Now().After(poolUntil) {
errs <- errors.New("pooling time exceeded limit")
if time.Now().After(pollUntil) {
errs <- errors.New("polling time exceeded limit")
break
}

Expand All @@ -162,13 +162,13 @@ var fileUploadCmd = &cobra.Command{
break
}

time.Sleep(poolingFrequency)
time.Sleep(pollingFrequency)
}
}(resp)

poolingError := <-errs
if poolingError != nil {
return poolingError
pollingError := <-errs
if pollingError != nil {
return pollingError
}
}
}
Expand Down Expand Up @@ -310,8 +310,8 @@ func init() {
fs.BoolVar(&uploadOptsCustomTranslationStatusInsertedKeys, "custom-translation-status-inserted-keys", true, "Add specified custom translation statuses to inserted keys (default true). Use --custom-translation-status-inserted-keys=false to disable.")
fs.BoolVar(&uploadOptsCustomTranslationStatusUpdatedKeys, "custom-translation-status-updated-keys", true, "Add specified custom translation statuses to updated keys (default true). Use --custom-translation-status-updated-keys=false to disable.")
fs.BoolVar(&uploadOptsCustomTranslationStatusSkippedKeys, "custom-translation-status-skipped-keys", false, "Add specified custom translation statuses to skipped keys.")
fs.BoolVar(&uploadPooling, "pool", false, "Enable to wait until background file upload finishes with result")
fs.DurationVar(&uploadPoolingTimeout, "pool-timeout", 30*time.Second, "Specify custom file upload pooling maximum duration. Default: 30s")
fs.BoolVar(&uploadPolling, "poll", false, "Enable to wait until background file upload finishes with result")
fs.DurationVar(&uploadPollingTimeout, "poll-timeout", 30*time.Second, "Specify custom file upload polling maximum duration. Default: 30s")
}

//noinspection GoUnhandledErrorResult
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
Version = "2.5.0"
Version = "2.5.1"
DefaultPageLimit = 5000
)

Expand Down
4 changes: 2 additions & 2 deletions docs/lokalise2.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## lokalise2

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

### Synopsis

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

### Options

Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage branches

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.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
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Comments can be used to give translators a context about the key, or as a discus

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.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
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_contributor.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You may add unlimited number of contributors to your project. User roles include

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.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
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Lokalise is a project-oriented translation management system, which means we sto

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 file download](lokalise2_file_download.md) - Download files
* [lokalise2 file list](lokalise2_file_list.md) - List all files
* [lokalise2 file upload](lokalise2_file_upload.md) - Upload a file
Expand Down
4 changes: 2 additions & 2 deletions docs/lokalise2_file_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ lokalise2 file upload [flags]
--include-path Include relative directory name in the filename when uploading.
--keys-to-values Enable to automatically replace values with key names.
--lang-iso string Language code of the translations in the file you are importing (required).
--pool Enable to wait until background file upload finishes with result
--pool-timeout duration Specify custom file upload pooling maximum duration. Default: 30s (default 30s)
--poll Enable to wait until background file upload finishes with result
--poll-timeout duration Specify custom file upload polling maximum duration. Default: 30s (default 30s)
--replace-modified Enable to replace translations, that have been modified (in the file being uploaded).
--slashn-to-linebreak Enable to replace \n with a line break (default true). Use --slashn-to-linebreak=false to disable. (default true)
--tag-inserted-keys Add specified tags to inserted keys (default true). Use --tag-inserted-keys=false to disable (default true)
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Each phrase that is used in your app or website must be identified by a key and

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 key create](lokalise2_key_create.md) - Create keys
* [lokalise2 key delete](lokalise2_key_delete.md) - Delete a key
* [lokalise2 key list](lokalise2_key_list.md) - List all keys
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ There are situations when it is necessary to export different language codes to

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 language create](lokalise2_language_create.md) - Create languages
* [lokalise2 language delete](lokalise2_language_delete.md) - Delete a language
* [lokalise2 language list](lokalise2_language_list.md) - List project languages
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_order.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Lokalise offers several human-powered translation providers, that can help trans

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 order create](lokalise2_order_create.md) - Create an order
* [lokalise2 order list](lokalise2_order_list.md) - List all orders
* [lokalise2 order retrieve](lokalise2_order_retrieve.md) - Retrieve an order
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_payment-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Credit cards are used to pay for translation orders. Each user has their own car

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 payment-card create](lokalise2_payment-card_create.md) - Create a card
* [lokalise2 payment-card delete](lokalise2_payment-card_delete.md) - Delete a card
* [lokalise2 payment-card list](lokalise2_payment-card_list.md) - Lists all cards
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Lokalise is a project-based translation management system. We recommend to keep

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 project create](lokalise2_project_create.md) - Create a project
* [lokalise2 project delete](lokalise2_project_delete.md) - Delete a project
* [lokalise2 project empty](lokalise2_project_empty.md) - Empty a project
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_queued-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage queued processes. Some heavy actions are processed asynchronously. Queued

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 queued-process list](lokalise2_queued-process_list.md) - Lists all queued processes for a project
* [lokalise2 queued-process retrieve](lokalise2_queued-process_retrieve.md) - Retrieve a process for a project

Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage screenshots

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 screenshot create](lokalise2_screenshot_create.md) - Create a screenshot
* [lokalise2 screenshot delete](lokalise2_screenshot_delete.md) - Delete a screenshot
* [lokalise2 screenshot list](lokalise2_screenshot_list.md) - List all screenshots
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage snapshots

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 snapshot create](lokalise2_snapshot_create.md) - Create a snapshot
* [lokalise2 snapshot delete](lokalise2_snapshot_delete.md) - Delete a snapshot
* [lokalise2 snapshot list](lokalise2_snapshot_list.md) - List all snapshots
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage tasks

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 task create](lokalise2_task_create.md) - Create a task
* [lokalise2 task delete](lokalise2_task_delete.md) - Delete a task
* [lokalise2 task list](lokalise2_task_list.md) - List all tasks
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_team-user-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage team user groups

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 team-user-group add-members](lokalise2_team-user-group_add-members.md) - Add members to the group
* [lokalise2 team-user-group add-projects](lokalise2_team-user-group_add-projects.md) - Add projects to the group
* [lokalise2 team-user-group create](lokalise2_team-user-group_create.md) - Create a new user group
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_team-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage team users

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 team-user delete](lokalise2_team-user_delete.md) - Delete a team user
* [lokalise2 team-user list](lokalise2_team-user_list.md) - List all team users
* [lokalise2 team-user retrieve](lokalise2_team-user_retrieve.md) - Retrieves a team user
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_team.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ List teams

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 team list](lokalise2_team_list.md) - List all teams

###### Auto generated by spf13/cobra on 28-May-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_translation-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Translation providers are used for translation orders.

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 translation-provider list](lokalise2_translation-provider_list.md) - List all providers
* [lokalise2 translation-provider retrieve](lokalise2_translation-provider_retrieve.md) - Retrieve a provider

Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_translation-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Custom translation statuses are used to provide a more efficient translation wor

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 translation-status create](lokalise2_translation-status_create.md) - Create a status
* [lokalise2 translation-status delete](lokalise2_translation-status_delete.md) - Delete a status
* [lokalise2 translation-status list](lokalise2_translation-status_list.md) - List all statuses
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage translations

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 translation list](lokalise2_translation_list.md) - List all translations
* [lokalise2 translation retrieve](lokalise2_translation_retrieve.md) - Retrieve a translation
* [lokalise2 translation update](lokalise2_translation_update.md) - Update a translation
Expand Down
2 changes: 1 addition & 1 deletion docs/lokalise2_webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Manage webhooks

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.5.1. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2 webhook create](lokalise2_webhook_create.md) - Create a webhook
* [lokalise2 webhook delete](lokalise2_webhook_delete.md) - Delete a webhook
* [lokalise2 webhook list](lokalise2_webhook_list.md) - List all webhooks
Expand Down

0 comments on commit b7032a1

Please sign in to comment.