This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b3a9ab  Improving Usage message (#973)
0b3a9ab is described below

commit 0b3a9ab77426f2042d4f7c415617d4ca2402d6c0
Author: Priti Desai <[email protected]>
AuthorDate: Thu Aug 30 18:47:22 2018 -0700

    Improving Usage message (#973)
    
    * initial draft of usage change
    
    * adding usage message
---
 cmd/export.go                    |  4 ++--
 cmd/undeploy.go                  |  5 +++--
 wski18n/i18n_ids.go              | 18 +++++++++++-------
 wski18n/i18n_resources.go        | 38 +++++++++++++++++++-------------------
 wski18n/resources/en_US.all.json | 22 +++++++++++++++++++---
 5 files changed, 54 insertions(+), 33 deletions(-)

diff --git a/cmd/export.go b/cmd/export.go
index ba42f72..a894906 100644
--- a/cmd/export.go
+++ b/cmd/export.go
@@ -36,8 +36,8 @@ import (
 var exportCmd = &cobra.Command{
        Use:        "export",
        SuggestFor: []string{"capture"},
-       Short:      "Export project assets from OpenWhisk",
-       Long:       `Exports managed project assets from OpenWhisk to manifest 
and function files`,
+       Short:      wski18n.T(wski18n.ID_CMD_DESC_SHORT_EXPORT),
+       Long:       wski18n.T(wski18n.ID_CMD_DESC_LONG_EXPORT),
        RunE:       ExportCmdImp,
 }
 
diff --git a/cmd/undeploy.go b/cmd/undeploy.go
index 9f10f62..569fc74 100644
--- a/cmd/undeploy.go
+++ b/cmd/undeploy.go
@@ -18,6 +18,7 @@
 package cmd
 
 import (
+       "github.com/apache/incubator-openwhisk-wskdeploy/wski18n"
        "github.com/spf13/cobra"
 )
 
@@ -26,8 +27,8 @@ import (
 var undeployCmd = &cobra.Command{
        Use:        "undeploy",
        SuggestFor: []string{"remove"},
-       Short:      "Undeploy assets from OpenWhisk",
-       Long:       `Undeploy removes deployed assets from the manifest and 
deployment files`,
+       Short:      wski18n.T(wski18n.ID_CMD_DESC_SHORT_UNDEPLOY),
+       Long:       wski18n.T(wski18n.ID_CMD_DESC_LONG_UNDEPLOY),
        RunE:       UndeployCmdImp,
 }
 
diff --git a/wski18n/i18n_ids.go b/wski18n/i18n_ids.go
index 7c45bba..faaf979 100644
--- a/wski18n/i18n_ids.go
+++ b/wski18n/i18n_ids.go
@@ -98,13 +98,17 @@ const (
        ID_MSG_PREFIX_WARNING = "msg_prefix_warning" // "Warning"
 
        // Cobra command descriptions
-       ID_CMD_DESC_LONG_REPORT   = "msg_cmd_desc_long_report"
-       ID_CMD_DESC_LONG_ROOT     = "msg_cmd_desc_long_root"
-       ID_CMD_DESC_LONG_SYNC     = "msg_cmd_desc_long_sync"
-       ID_CMD_DESC_SHORT_REPORT  = "msg_cmd_desc_short_report"
-       ID_CMD_DESC_SHORT_ROOT    = "msg_cmd_desc_short_root"
-       ID_CMD_DESC_SHORT_VERSION = "msg_cmd_desc_short_version"
-       ID_CMD_DESC_SHORT_SYNC    = "msg_cmd_desc_short_sync"
+       ID_CMD_DESC_LONG_REPORT    = "msg_cmd_desc_long_report"
+       ID_CMD_DESC_LONG_ROOT      = "msg_cmd_desc_long_root"
+       ID_CMD_DESC_LONG_SYNC      = "msg_cmd_desc_long_sync"
+       ID_CMD_DESC_LONG_UNDEPLOY  = "msg_cmd_desc_long_undeploy"
+       ID_CMD_DESC_LONG_EXPORT    = "msg_cmd_desc_long_export"
+       ID_CMD_DESC_SHORT_REPORT   = "msg_cmd_desc_short_report"
+       ID_CMD_DESC_SHORT_ROOT     = "msg_cmd_desc_short_root"
+       ID_CMD_DESC_SHORT_VERSION  = "msg_cmd_desc_short_version"
+       ID_CMD_DESC_SHORT_SYNC     = "msg_cmd_desc_short_sync"
+       ID_CMD_DESC_SHORT_UNDEPLOY = "msg_cmd_desc_short_undeploy"
+       ID_CMD_DESC_SHORT_EXPORT   = "msg_cmd_desc_short_export"
 
        // Cobra Flag messages
        ID_CMD_FLAG_API_HOST    = "msg_cmd_flag_api_host"
diff --git a/wski18n/i18n_resources.go b/wski18n/i18n_resources.go
index 198a009..ecc0f6a 100644
--- a/wski18n/i18n_resources.go
+++ b/wski18n/i18n_resources.go
@@ -97,7 +97,7 @@ func wski18nResourcesDe_deAllJson() (*asset, error) {
        return a, nil
 }
 
-var _wski18nResourcesEn_usAllJson = 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x5c\x5f\xaf\xdb\xb6\x92\x7f\xcf\xa7\x18\x14\x0b\xb4\x05\x1c\x9f\xf6\x2e\x16\x58\x14\xc8\x43\x36\x49\x7b\xcf\xde\xa4\x09\x4e\x92\x1b\x5c\x64\x03\x85\x96\xc6\x36\xaf\x25\x52\x97\xa4\xec\xb8\x07\xfe\xee\x8b\x19\x92\x92\xec\x63\x4a\xb2\x93\xee\xf6\x25\x3e\x26\x39\xf3\x9b\xe1\x70\x38\x7f\xe8\x7e\x7c\x04\x70\xff\x08\x00\xe0\x3b\x59\x7c\xf7\x0b\x7c\x57\xd9\x55\x56\x1b\x5c\xca\x2f\x19\x1a\xa3\xcd\x77\x33\x3f
 [...]
+var _wski18nResourcesEn_usAllJson = 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x3c\x6b\x8f\x1b\x37\x92\xdf\xfd\x2b\x0a\xc1\x02\x4e\x80\x19\x4d\xb2\x87\x03\x0e\xc6\xf9\x80\x39\x7b\x92\x9d\x8d\xed\x31\xc6\xe3\x0d\x02\xdb\x68\x53\xdd\x25\x89\xab\x6e\xb2\x97\x64\x4b\x56\x06\xfa\xef\x87\x2a\x92\xdd\xad\x47\x3f\x24\x3b\xb8\xf5\x17\x4b\x22\x59\x2f\x16\xeb\x49\xce\x87\x27\x00\x8f\x4f\x00\x00\xbe\x93\xd9\x77\xcf\xe0\xbb\xc2\xce\x93\xd2\xe0\x4c\x7e\x49\xd0\x18\x6d\xbe\xbb\xf0\xa3\xce\x08
 [...]
 
 func wski18nResourcesEn_usAllJsonBytes() ([]byte, error) {
        return bindataRead(
@@ -112,7 +112,7 @@ func wski18nResourcesEn_usAllJson() (*asset, error) {
                return nil, err
        }
 
-       info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 
17482, mode: os.FileMode(420), modTime: time.Unix(1528407012, 0)}
+       info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 
19493, mode: os.FileMode(420), modTime: time.Unix(1535665259, 0)}
        a := &asset{bytes: bytes, info: info}
        return a, nil
 }
@@ -329,14 +329,14 @@ func AssetNames() []string {
 
 // _bindata is a table, holding each asset generator, mapped to its name.
 var _bindata = map[string]func() (*asset, error){
-       "wski18n/resources/de_DE.all.json":   wski18nResourcesDe_deAllJson,
-       "wski18n/resources/en_US.all.json":   wski18nResourcesEn_usAllJson,
-       "wski18n/resources/es_ES.all.json":   wski18nResourcesEs_esAllJson,
-       "wski18n/resources/fr_FR.all.json":   wski18nResourcesFr_frAllJson,
-       "wski18n/resources/it_IT.all.json":   wski18nResourcesIt_itAllJson,
-       "wski18n/resources/ja_JA.all.json":   wski18nResourcesJa_jaAllJson,
-       "wski18n/resources/ko_KR.all.json":   wski18nResourcesKo_krAllJson,
-       "wski18n/resources/pt_BR.all.json":   wski18nResourcesPt_brAllJson,
+       "wski18n/resources/de_DE.all.json": wski18nResourcesDe_deAllJson,
+       "wski18n/resources/en_US.all.json": wski18nResourcesEn_usAllJson,
+       "wski18n/resources/es_ES.all.json": wski18nResourcesEs_esAllJson,
+       "wski18n/resources/fr_FR.all.json": wski18nResourcesFr_frAllJson,
+       "wski18n/resources/it_IT.all.json": wski18nResourcesIt_itAllJson,
+       "wski18n/resources/ja_JA.all.json": wski18nResourcesJa_jaAllJson,
+       "wski18n/resources/ko_KR.all.json": wski18nResourcesKo_krAllJson,
+       "wski18n/resources/pt_BR.all.json": wski18nResourcesPt_brAllJson,
        "wski18n/resources/zh_Hans.all.json": wski18nResourcesZh_hansAllJson,
        "wski18n/resources/zh_Hant.all.json": wski18nResourcesZh_hantAllJson,
 }
@@ -380,18 +380,17 @@ type bintree struct {
        Func     func() (*asset, error)
        Children map[string]*bintree
 }
-
 var _bintree = &bintree{nil, map[string]*bintree{
        "wski18n": &bintree{nil, map[string]*bintree{
                "resources": &bintree{nil, map[string]*bintree{
-                       "de_DE.all.json":   
&bintree{wski18nResourcesDe_deAllJson, map[string]*bintree{}},
-                       "en_US.all.json":   
&bintree{wski18nResourcesEn_usAllJson, map[string]*bintree{}},
-                       "es_ES.all.json":   
&bintree{wski18nResourcesEs_esAllJson, map[string]*bintree{}},
-                       "fr_FR.all.json":   
&bintree{wski18nResourcesFr_frAllJson, map[string]*bintree{}},
-                       "it_IT.all.json":   
&bintree{wski18nResourcesIt_itAllJson, map[string]*bintree{}},
-                       "ja_JA.all.json":   
&bintree{wski18nResourcesJa_jaAllJson, map[string]*bintree{}},
-                       "ko_KR.all.json":   
&bintree{wski18nResourcesKo_krAllJson, map[string]*bintree{}},
-                       "pt_BR.all.json":   
&bintree{wski18nResourcesPt_brAllJson, map[string]*bintree{}},
+                       "de_DE.all.json": 
&bintree{wski18nResourcesDe_deAllJson, map[string]*bintree{}},
+                       "en_US.all.json": 
&bintree{wski18nResourcesEn_usAllJson, map[string]*bintree{}},
+                       "es_ES.all.json": 
&bintree{wski18nResourcesEs_esAllJson, map[string]*bintree{}},
+                       "fr_FR.all.json": 
&bintree{wski18nResourcesFr_frAllJson, map[string]*bintree{}},
+                       "it_IT.all.json": 
&bintree{wski18nResourcesIt_itAllJson, map[string]*bintree{}},
+                       "ja_JA.all.json": 
&bintree{wski18nResourcesJa_jaAllJson, map[string]*bintree{}},
+                       "ko_KR.all.json": 
&bintree{wski18nResourcesKo_krAllJson, map[string]*bintree{}},
+                       "pt_BR.all.json": 
&bintree{wski18nResourcesPt_brAllJson, map[string]*bintree{}},
                        "zh_Hans.all.json": 
&bintree{wski18nResourcesZh_hansAllJson, map[string]*bintree{}},
                        "zh_Hant.all.json": 
&bintree{wski18nResourcesZh_hantAllJson, map[string]*bintree{}},
                }},
@@ -444,3 +443,4 @@ func _filePath(dir, name string) string {
        cannonicalName := strings.Replace(name, "\\", "/", -1)
        return filepath.Join(append([]string{dir}, 
strings.Split(cannonicalName, "/")...)...)
 }
+
diff --git a/wski18n/resources/en_US.all.json b/wski18n/resources/en_US.all.json
index d6283a9..35978ee 100644
--- a/wski18n/resources/en_US.all.json
+++ b/wski18n/resources/en_US.all.json
@@ -21,11 +21,11 @@
   },
   {
     "id": "msg_cmd_desc_long_root",
-    "translation": "A tool to deploy, undeploy and sync openwhisk packages 
using a manifest and optional deployment files using YAML."
+    "translation": "The OpenWhisk Deployment Tool\n\nTo begin working with 
wskdeploy, run the 'wskdeploy' command:\n\n\t$ wskdeploy\n\nThis will deploy 
OpenWhisk assets specified in manifest.yaml or manifest.yml\nIf current 
directory doesnt have any manifest file, wskdeploy prints this help 
message.\n\nThe most common ways of using wskdeploy to deploy and/or undeploy 
OpenWhisk assets are:\n\n$ wskdeploy\n$ wskdeploy -m path/to/manifest.yaml\n$ 
wskdeploy -m path/to/manifest.yaml -d path/t [...]
   },
   {
     "id": "msg_cmd_desc_short_report",
-    "translation": "Provides a summary report of what's been deployed in the 
specified namespace."
+    "translation": "Provides a summary report of OpenWhisk assets being 
deployed/undeployed based on manifest/deployment YAML."
   },
   {
     "id": "msg_cmd_desc_short_root",
@@ -41,7 +41,23 @@
   },
   {
     "id": "msg_cmd_desc_long_sync",
-    "translation": "A tool to sync deployment and undeployment of openwhisk 
packages using a manifest and optional deployment files using YAML."
+    "translation": "A tool to sync deployment and undeployment of OpenWhisk 
packages using a manifest and optional deployment files using 
YAML.\n\nDifferent ways of running sync:\n$ wskdeploy sync\n$ wskdeploy sync -m 
path/to/manifest.yaml\n$ wskdeploy sync -m path/to/manifest.yaml -d 
path/to/manifest.yaml\n$ wskdeploy sync -m path/to/manifest.yaml --projectname 
PROJECT"
+  },
+  {
+    "id": "msg_cmd_desc_short_undeploy",
+    "translation": "Undeploy OpenWhisk assets from server"
+  },
+  {
+    "id": "msg_cmd_desc_long_undeploy",
+    "translation": "Undeploy removes OpenWhisk assets which were deployed from 
the manifest and deployment YAML.\n\nTo begin deleting OpenWhisk assets from 
the manifest file, run:\n$ wskdeploy undeploy\n$ wskdeploy undeploy -m 
path/to/manifest.yaml\n$ wskdeploy undeploy -m path/to/manifest.yaml -d 
path/to/deployment.yaml\n$ wskdeploy undeploy --projectname PROJECT (only works 
for deployments in sync mode)"
+  },
+  {
+    "id": "msg_cmd_desc_short_export",
+    "translation": "Export project assets from OpenWhisk"
+  },
+  {
+    "id": "msg_cmd_desc_long_export",
+    "translation": "Exports managed project assets from OpenWhisk to manifest 
and function files\n\nThe most common way to run export:\n$ wskdeploy export 
--projectname PROJECT -m path/to/exported-manifest.yaml"
   },
   {
     "id": "msg_cmd_flag_api_host",

Reply via email to