Skip to content

Commit

Permalink
Adds better description for boolean flags
Browse files Browse the repository at this point in the history
  • Loading branch information
yarlson committed Feb 7, 2020
1 parent 4d4e7c4 commit efaaf3c
Show file tree
Hide file tree
Showing 108 changed files with 148 additions and 148 deletions.
12 changes: 6 additions & 6 deletions cmd/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func init() {
fs.StringVar(&downloadDestination, "dest", "./", "Destination folder for ZIP file.")
fs.StringVar(&downloadUnzipTo, "unzip-to", "./", "Unzip to this folder.")

fs.BoolVar(&downloadOptsOriginalFilenames, "original-filenames", true, "Enable to use original filenames/formats. If set to false all keys will be export to a single file per language (default true).")
fs.BoolVar(&downloadOptsOriginalFilenames, "original-filenames", true, "Enable to use original filenames/formats. If set to false (--original-filenames=false) all keys will be export to a single file per language (default true).")
fs.StringVar(&downloadOpts.BundleStructure, "bundle-structure", "", "Bundle structure, used when original-filenames set to false. Allowed placeholders are %LANG_ISO%, %LANG_NAME%, %FORMAT% and %PROJECT_NAME%).")
fs.StringVar(&downloadOptsDirectoryPrefix, "directory-prefix", "", "Directory prefix in the bundle, used when original_filenames set to true). Allowed placeholder is %LANG_ISO%.")
fs.BoolVar(&downloadOpts.AllPlatforms, "all-platforms", false, "Enable to include all platform keys. If disabled, only the keys, associated with the platform of the format will be exported.")
Expand All @@ -209,11 +209,11 @@ func init() {
fs.StringVar(&downloadOpts.ExportSort, "export-sort", "", "Export key sort mode. Allowed value are first_added, last_added, last_updated, a_z, z_a.")
fs.StringVar(&downloadOpts.ExportEmptyAs, "export-empty-as", "", "Select how you would like empty translations to be exported. Allowed values are empty to keep empty, base to replace with the base language value, or skip to omit.")
fs.BoolVar(&downloadOpts.IncludeComments, "include-comments", false, "Enable to include key comments and description in exported file (if supported by the format).")
fs.BoolVar(&downloadOptsIncludeDescription, "include-description", true, "Enable to include key description in exported file (if supported by the format) (default true).")
fs.BoolVar(&downloadOptsIncludeDescription, "include-description", true, "Enable to include key description in exported file (if supported by the format) (default true). Use --include-description=false to disable.")
fs.StringSliceVar(&downloadOpts.IncludeProjectIDs, "include-pids", []string{}, "Other projects ID's, which keys should be included with this export.")
fs.StringSliceVar(&downloadOpts.Triggers, "triggers", []string{}, "Trigger integration exports (must be enabled in project settings). Allowed values are amazons3, gcs, github, gitlab, bitbucket.")
fs.StringSliceVar(&downloadOpts.FilterRepositories, "filter-repositories", []string{}, "Pull requests will be created only for listed repositories (organization/repository format). Leave empty array to process all configured integrations by platform only.")
fs.BoolVar(&downloadOptsReplaceBreaks, "replace-breaks", true, "Enable to replace line breaks in exported translations with \\n (default true).")
fs.BoolVar(&downloadOptsReplaceBreaks, "replace-breaks", true, "Enable to replace line breaks in exported translations with \\n (default true). Use --replace-breaks=false to disable.")
fs.BoolVar(&downloadOpts.DisableReferences, "disable-references", false, "Enable to skip automatic replace of key reference placeholders (e.g. [%key:hello_world%]) with their corresponding translations.")
fs.StringVar(&downloadOpts.PluralFormat, "plural-format", "", "Override the default plural format for the file type. Allowed values are json_string, icu, array, generic, symfony.")
fs.StringVar(&downloadOpts.PlaceholderFormat, "placeholder-format", "", "Override the default placeholder format for the file type. Allowed values are printf, ios, icu, net, symfony.")
Expand All @@ -238,11 +238,11 @@ func init() {
fs.BoolVar(&uploadOptsConvertPlaceholders, "convert-placeholders", false, "Enable to automatically convert placeholders to the Lokalise universal placeholders.")
fs.BoolVar(&uploadOpts.DetectICUPlurals, "detect-icu-plurals", false, "Enable to automatically detect and parse ICU formatted plurals in your translations.")
fs.StringSliceVar(&uploadOpts.Tags, "tags", []string{}, "Tag keys with the specified tags. By default tags are applied to created and updated keys.")
fs.BoolVar(&uploadOptsTagInsertedKeys, "tag-inserted-keys", true, "Add specified tags to inserted keys (default true).")
fs.BoolVar(&uploadOptsTagUpdatedKeys, "tag-updated-keys", true, "Add specified tags to updated keys (default true).")
fs.BoolVar(&uploadOptsTagInsertedKeys, "tag-inserted-keys", true, "Add specified tags to inserted keys (default true). Use --tag-inserted-keys=false to disable")
fs.BoolVar(&uploadOptsTagUpdatedKeys, "tag-updated-keys", true, "Add specified tags to updated keys (default true). Use tag-updated-keys=false to disable")
fs.BoolVar(&uploadOpts.TagSkippedKeys, "tag-skipped-keys", false, "Add specified tags to skipped keys.")
fs.BoolVar(&uploadOpts.ReplaceModified, "replace-modified", false, "Enable to replace translations, that have been modified (in the file being uploaded).")
fs.BoolVar(&uploadOptsSlashNToLinebreak, "slashn-to-linebreak", true, "Enable to replace \\n with a line break (default true).")
fs.BoolVar(&uploadOptsSlashNToLinebreak, "slashn-to-linebreak", true, "Enable to replace \\n with a line break (default true). Use --slashn-to-linebreak=false to disable.")
fs.BoolVar(&uploadOpts.KeysToValues, "keys-to-values", false, "Enable to automatically replace values with key names.")
fs.BoolVar(&uploadOpts.DistinguishByFile, "distinguish-by-file", false, "Enable to allow keys with similar names to coexist, in case they are assigned to differrent filenames.")
fs.BoolVar(&uploadOpts.ApplyTM, "apply-tm", false, "Enable to automatically apply 100% translation memory matches.")
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.2.2"
Version = "2.2.3"
DefaultPageLimit = 5000
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/screenshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func init() {
_ = screenshotCreateCmd.MarkFlagRequired("file")
fs.StringVar(&newScreenshot.Title, "title", "", "Screenshot title")
fs.StringVar(&newScreenshot.Description, "description", "", "Screenshot description.")
fs.BoolVar(&newScreenshotOcr, "ocr", true, "Try to recognize translations on the image and attach screenshot to all possible keys (default true).")
fs.BoolVar(&newScreenshotOcr, "ocr", true, "Try to recognize translations on the image and attach screenshot to all possible keys (default true). Use --ocr=false to disable.")
fs.UintSliceVar(&newScreenshotKeyIds, "key-ids", []uint{}, "Attach the screenshot to key IDs specified.")
fs.StringSliceVar(&newScreenshot.Tags, "tags", []string{}, "List of tags to add to the uploaded screenshot.")

Expand Down
8 changes: 4 additions & 4 deletions cmd/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ func init() {
fs.IntSliceVar(&newTaskKeys, "keys", []int{}, "List of keys identifiers, included in task. Required if parent_task_id is not specified.")
fs.StringVar(&taskLanguages, "languages", "", "List of languages in the task. One of `users` or `groups` must be provided (JSON, required, see https://lokalise.com/api2docs/curl/#transition-create-a-task-post).")
_ = taskCreateCmd.MarkFlagRequired("languages")
fs.BoolVar(&autoCloseLang, "auto-close-languages", true, "Whether languages should be closed automatically upon completion of the last item (default true).")
fs.BoolVar(&autoCloseTask, "auto-close-task", true, "Whether the task should be automatically closed upon all language completion (default true).")
fs.BoolVar(&autoCloseLang, "auto-close-languages", true, "Whether languages should be closed automatically upon completion of the last item (default true). Use --auto-close-languages=false to disable.")
fs.BoolVar(&autoCloseTask, "auto-close-task", true, "Whether the task should be automatically closed upon all language completion (default true). Use --auto-close-task=false to disable.")
fs.BoolVar(&newTask.InitialTMLeverage, "initial-tm-leverage", false, "Enable to calculate and save initial TM leverage with this task.")
fs.StringVar(&taskType, "task-type", "", "Specify if task type is `translation` (default) or `review`.")
fs.Int64Var(&newTask.ParentTaskID, "parent-task-id", 0, "If task_type is review, it can have a parent task. Current task will be opened when parent task is closed.")
Expand All @@ -154,8 +154,8 @@ func init() {
fs.StringVar(&updateTask.Description, "description", "", "Short description of the task.")
fs.StringVar(&updateTask.DueDate, "due-date", "", "Due date in `Y-m-d H:i:s` format. Example: `2018-12-24 23:59:59`.")
fs.StringVar(&taskLanguages, "languages", "", "List of languages to update. JSON, differs from a creation list, see https://lokalise.com/api2docs/curl/#transition-update-a-task-put.")
fs.BoolVar(&autoCloseLang, "auto-close-languages", true, "Whether languages should be closed automatically upon completion of the last item (default true).")
fs.BoolVar(&autoCloseTask, "auto-close-task", true, "Whether the task should be automatically closed upon all language completion (default true).")
fs.BoolVar(&autoCloseLang, "auto-close-languages", true, "Whether languages should be closed automatically upon completion of the last item (default true). Use --auto-close-languages=false to disable.")
fs.BoolVar(&autoCloseTask, "auto-close-task", true, "Whether the task should be automatically closed upon all language completion (default true). Use --auto-close-task=false to disable.")
fs.BoolVar(&updateTask.CloseTask, "close-task", false, "Whether the task should be closed and notifications sent. The task cannot be reopened again.")
fs.StringSliceVar(&updateTask.ClosingTags, "closing-tags", []string{}, "Tags that will be added to affected keys when task is closed.")
fs.BoolVar(&updateTask.LockTranslations, "do-lock-translations", false, "If set to 1, will lock translations for non-assigned project members.")
Expand Down
6 changes: 3 additions & 3 deletions docs/lokalise2.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## lokalise2

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

### Synopsis

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

### Options

Expand Down Expand Up @@ -36,4 +36,4 @@ Lokalise CLI v2.1.0. 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 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
4 changes: 2 additions & 2 deletions docs/lokalise2_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Manage branches

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.1.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.2.3. 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 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_branch_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ lokalise2 branch create [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_branch_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ lokalise2 branch delete [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_branch_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ lokalise2 branch list [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
4 changes: 2 additions & 2 deletions docs/lokalise2_comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Comments can be used to give translators a context about the key, or as a discus

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.1.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.2.3. 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 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_comment_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ lokalise2 comment create [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_comment_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ lokalise2 comment delete [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_comment_list-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ lokalise2 comment list-key [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_comment_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ lokalise2 comment list [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_comment_retrieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ lokalise2 comment retrieve [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
4 changes: 2 additions & 2 deletions docs/lokalise2_contributor.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ You may add unlimited number of contributors to your project. User roles include

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.1.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.2.3. 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 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_contributor_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ lokalise2 contributor create [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_contributor_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ lokalise2 contributor delete [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_contributor_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ lokalise2 contributor list [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_contributor_retrieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ lokalise2 contributor retrieve [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_contributor_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ lokalise2 contributor update [flags]

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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
4 changes: 2 additions & 2 deletions docs/lokalise2_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Lokalise is a project-oriented translation management system, which means we sto

### SEE ALSO

* [lokalise2](lokalise2.md) - Lokalise CLI v2.1.0. Read the docs at https://github.com/lokalise/lokalise-cli-2-go
* [lokalise2](lokalise2.md) - Lokalise CLI v2.2.3. 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

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
8 changes: 4 additions & 4 deletions docs/lokalise2_file_download.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lokalise2 file download [flags]
-h, --help help for download
--icu-numeric If enabled, plural forms zero, one and two will be replaced with =0, =1 and =2 respectively. Only works for ICU plural format.
--include-comments Enable to include key comments and description in exported file (if supported by the format).
--include-description Enable to include key description in exported file (if supported by the format) (default true). (default true)
--include-description Enable to include key description in exported file (if supported by the format) (default true). Use --include-description=false to disable. (default true)
--include-pids strings Other projects ID's, which keys should be included with this export.
--include-tags strings Narrow export range to tags specified.
--indentation string Provide to override default indentation in supported files. Allowed values are default, 1sp, 2sp, 3sp, 4sp, 5sp, 6sp, 7sp, 8sp and tab.
Expand All @@ -43,10 +43,10 @@ lokalise2 file download [flags]
--json-unescaped-slashes (JSON export only). Enable to leave forward slashes unescaped.
--keep-zip Keep or delete ZIP file after being unpacked.
--language-mapping string List of languages to override default iso codes for this export (JSON, see https://lokalise.com/api2docs/curl/#transition-download-files-post).
--original-filenames Enable to use original filenames/formats. If set to false all keys will be export to a single file per language (default true). (default true)
--original-filenames Enable to use original filenames/formats. If set to false (--original-filenames=false) all keys will be export to a single file per language (default true). (default true)
--placeholder-format string Override the default placeholder format for the file type. Allowed values are printf, ios, icu, net, symfony.
--plural-format string Override the default plural format for the file type. Allowed values are json_string, icu, array, generic, symfony.
--replace-breaks Enable to replace line breaks in exported translations with \n (default true). (default true)
--replace-breaks Enable to replace line breaks in exported translations with \n (default true). Use --replace-breaks=false to disable. (default true)
--triggers strings Trigger integration exports (must be enabled in project settings). Allowed values are amazons3, gcs, github, gitlab, bitbucket.
--unzip-to string Unzip to this folder. (default "./")
--webhook-url string Once the export is complete, sends a HTTP POST with the generated bundle URL to the specified URL.
Expand All @@ -65,4 +65,4 @@ lokalise2 file download [flags]

* [lokalise2 file](lokalise2_file.md) - Upload and download files

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
2 changes: 1 addition & 1 deletion docs/lokalise2_file_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ lokalise2 file list [flags]

* [lokalise2 file](lokalise2_file.md) - Upload and download files

###### Auto generated by spf13/cobra on 16-Jan-2020
###### Auto generated by spf13/cobra on 7-Feb-2020
Loading

0 comments on commit efaaf3c

Please sign in to comment.