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

[ioctl] correct Chinese usage message #3510

Merged
merged 8 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
11 changes: 4 additions & 7 deletions ioctl/cmd/account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ import (
"github.com/iotexproject/go-pkgs/crypto"
"github.com/iotexproject/go-pkgs/hash"
"github.com/iotexproject/iotex-address/address"
"github.com/iotexproject/iotex-proto/golang/iotexapi"
"github.com/iotexproject/iotex-proto/golang/iotextypes"

"github.com/iotexproject/iotex-core/ioctl/cmd/hdwallet"
"github.com/iotexproject/iotex-core/ioctl/config"
"github.com/iotexproject/iotex-core/ioctl/output"
"github.com/iotexproject/iotex-core/ioctl/util"
"github.com/iotexproject/iotex-core/ioctl/validator"
"github.com/iotexproject/iotex-proto/golang/iotexapi"
"github.com/iotexproject/iotex-proto/golang/iotextypes"
)

// Multi-language support
Expand All @@ -41,10 +42,6 @@ var (
config.English: "Manage accounts of IoTeX blockchain",
config.Chinese: "管理IoTeX区块链上的账号",
}
_accountCmdUses = map[config.Language]string{
config.English: "account",
config.Chinese: "账户",
}
_flagEndpoint = map[config.Language]string{
config.English: "set endpoint for once",
config.Chinese: "一次设置端点",
Expand All @@ -65,7 +62,7 @@ var CryptoSm2 bool

// AccountCmd represents the account command
var AccountCmd = &cobra.Command{
Use: config.TranslateInLang(_accountCmdUses, config.UILanguage),
Use: "account",
Short: config.TranslateInLang(_accountCmdShorts, config.UILanguage),
}

Expand Down
2 changes: 1 addition & 1 deletion ioctl/cmd/account/accountactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
}
_actionsCmdUses = map[config.Language]string{
config.English: "actions (ALIAS|ADDRESS) [SKIP]",
config.Chinese: "actions (ALIAS|ADDRESS) [SKIP]",
config.Chinese: "actions (别名|地址) [SKIP]",
}
)

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/account/accountcreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ var (
config.English: "Create N new accounts and print them",
config.Chinese: "创建 N 个新账户,并打印",
}
_createCmdUses = map[config.Language]string{
config.English: "create",
config.Chinese: "create 创建",
}
_flagNumUsages = map[config.Language]string{
config.English: "number of accounts to create",
config.Chinese: "指定创建账户的数量",
Expand All @@ -38,7 +34,7 @@ var (

// _accountCreateCmd represents the account create command
var _accountCreateCmd = &cobra.Command{
Use: config.TranslateInLang(_createCmdUses, config.UILanguage),
Use: "create",
Short: config.TranslateInLang(_createCmdShorts, config.UILanguage),
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/account/accountimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ var (
config.English: "Import IoTeX private key or keystore into wallet",
config.Chinese: "将IoTeX的私钥或私钥库导入钱包",
}
_importCmdUses = map[config.Language]string{
config.English: "import",
config.Chinese: "导入",
}
_importKeyCmdShorts = map[config.Language]string{
config.English: "Import IoTeX private key into wallet",
config.Chinese: "将IoTeX的私钥导入钱包",
Expand Down Expand Up @@ -57,7 +53,7 @@ var (
var (
// _accountImportCmd represents the account import command
_accountImportCmd = &cobra.Command{
Use: config.TranslateInLang(_importCmdUses, config.UILanguage),
Use: "import",
Short: config.TranslateInLang(_importCmdShorts, config.UILanguage),
}
// _accountImportKeyCmd represents the account import key command
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/account/accountlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,11 @@ var (
config.English: "List existing account for ioctl",
config.Chinese: "列出ioctl中已存在的账户",
}
_listCmdUses = map[config.Language]string{
config.English: "list",
config.Chinese: "list",
}
)

// _accountListCmd represents the account list command
var _accountListCmd = &cobra.Command{
Use: config.TranslateInLang(_listCmdUses, config.UILanguage),
Use: "list",
Short: config.TranslateInLang(_listCmdShorts, config.UILanguage),
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/account/accountverify.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@ var (
config.English: "Verify IoTeX public key and address by private key",
config.Chinese: "用私钥验证IoTeX的公钥和地址",
}
_verifyCmdUses = map[config.Language]string{
config.English: "verify",
config.Chinese: "verify 验证",
}
)
var (
// _accountVerifyCmd represents the account verify command
_accountVerifyCmd = &cobra.Command{
Use: config.TranslateInLang(_verifyCmdUses, config.UILanguage),
Use: "verify",
Short: config.TranslateInLang(_verifyCmdShorts, config.UILanguage),
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ var (
config.English: "Manage actions of IoTeX blockchain",
config.Chinese: "管理IoTex区块链的行为", // this translation
}
_actionCmdUses = map[config.Language]string{
config.English: "action",
config.Chinese: "action 行为", // this translation
}
_flagActionEndPointUsages = map[config.Language]string{
config.English: "set endpoint for once",
config.Chinese: "一次设置端点", // this translation
Expand Down Expand Up @@ -70,7 +66,7 @@ var (

// ActionCmd represents the action command
var ActionCmd = &cobra.Command{
Use: config.TranslateInLang(_actionCmdUses, config.UILanguage),
Use: "action",
Short: config.TranslateInLang(_actionCmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/action/stake2.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import (

// Multi-language support
var (
_stake2CmdUses = map[config.Language]string{
config.English: "stake2",
config.Chinese: "stake2",
}
_stake2CmdShorts = map[config.Language]string{
config.English: "Support native staking of IoTeX blockchain",
config.Chinese: "支持来自ioctl的本地质押",
Expand All @@ -44,7 +40,7 @@ var _stake2AutoStake bool

//Stake2Cmd represent stake2 command
var Stake2Cmd = &cobra.Command{
Use: config.TranslateInLang(_stake2CmdUses, config.UILanguage),
Use: "stake2",
Short: config.TranslateInLang(_stake2CmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/action/xrc20.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ var (
config.English: "Support ERC20 standard command-line",
config.Chinese: "使ioctl命令行支持ERC20标准",
}
_xrc20CmdUses = map[config.Language]string{
config.English: "xrc20",
config.Chinese: "xrc20",
}
_flagContractAddressUsages = map[config.Language]string{
config.English: "set contract address",
config.Chinese: "设定合约地址",
Expand All @@ -48,7 +44,7 @@ var (

//Xrc20Cmd represent xrc20 standard command-line
var Xrc20Cmd = &cobra.Command{
Use: config.TranslateInLang(_xrc20CmdUses, config.UILanguage),
Use: "xrc20",
Short: config.TranslateInLang(_xrc20CmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/alias/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ var (
config.English: "Manage aliases of IoTeX addresses",
config.Chinese: "管理IoTeX的地址别名",
}
_aliasCmdUses = map[config.Language]string{
config.English: "alias",
config.Chinese: "alias",
}
)

// Errors
Expand All @@ -53,7 +49,7 @@ type aliases struct {

// AliasCmd represents the alias command
var AliasCmd = &cobra.Command{
Use: config.TranslateInLang(_aliasCmdUses, config.UILanguage),
Use: "alias",
Short: config.TranslateInLang(_aliasCmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/alias/aliasexport.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ var (
config.English: "Export aliases to either json or yaml format",
config.Chinese: "以json或yaml格式导出别名",
}
_aliasExportUses = map[config.Language]string{
config.English: "export",
config.Chinese: "export",
}
_flagExportFormatUsages = map[config.Language]string{
config.English: "set format: json/yaml",
config.Chinese: "设置格式:json / yaml",
Expand All @@ -36,7 +32,7 @@ var (

// _aliasExportCmd represents the alias export command
var _aliasExportCmd = &cobra.Command{
Use: config.TranslateInLang(_aliasExportUses, config.UILanguage),
Use: "export",
Short: config.TranslateInLang(_exportCmd, config.UILanguage),
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/alias/aliaslist.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@ var (
config.English: "List aliases",
config.Chinese: "列出别名",
}
_listCmdUses = map[config.Language]string{
config.English: "list",
config.Chinese: "list",
}
)

// _aliasListCmd represents the alias list command
var _aliasListCmd = &cobra.Command{
Use: config.TranslateInLang(_listCmdUses, config.UILanguage),
Use: "list",
Short: config.TranslateInLang(_listCmdShorts, config.UILanguage),
Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/bc/bc.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ var (
config.English: "Deal with block chain of IoTeX blockchain",
config.Chinese: "处理IoTeX区块链上的区块",
}
_bcCmdUses = map[config.Language]string{
config.English: "bc",
config.Chinese: "bc",
}
_flagEndpointUsages = map[config.Language]string{
config.English: "set endpoint for once",
config.Chinese: "一次设置端点",
Expand All @@ -46,7 +42,7 @@ var (

// BCCmd represents the bc(block chain) command
var BCCmd = &cobra.Command{
Use: config.TranslateInLang(_bcCmdUses, config.UILanguage),
Use: "bc",
Short: config.TranslateInLang(_bcCmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/bc/bcinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@ var (
config.English: "Get current blockchain information",
config.Chinese: "获取当前区块链信息",
}
_bcInfoCmdUses = map[config.Language]string{
config.English: "info",
config.Chinese: "info",
}
)

// _bcInfoCmd represents the bc info command
var _bcInfoCmd = &cobra.Command{
Use: config.TranslateInLang(_bcInfoCmdUses, config.UILanguage),
Use: "info",
Short: config.TranslateInLang(_bcInfoCmdShorts, config.UILanguage),
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/contract/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ var (

// Multi-language support
var (
_contractCmdUses = map[config.Language]string{
config.English: "contract",
config.Chinese: "contract",
}
_contractCmdShorts = map[config.Language]string{
config.English: "Deal with smart contract of IoTeX blockchain",
config.Chinese: "处理IoTeX区块链的智能合约",
Expand All @@ -55,7 +51,7 @@ var (

// ContractCmd represents the contract command
var ContractCmd = &cobra.Command{
Use: config.TranslateInLang(_contractCmdUses, config.UILanguage),
Use: "contract",
Short: config.TranslateInLang(_contractCmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/contract/contractdeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import (

// Multi-language support
var (
_deployCmdUses = map[config.Language]string{
config.English: "deploy",
config.Chinese: "deploy",
}
_deployCmdShorts = map[config.Language]string{
config.English: "Deploy smart contract of IoTeX blockchain",
config.Chinese: "在IoTeX区块链部署智能合约",
Expand All @@ -27,7 +23,7 @@ var (

// _contractDeployCmd represents the contract deploy command
var _contractDeployCmd = &cobra.Command{
Use: config.TranslateInLang(_deployCmdUses, config.UILanguage),
Use: "deploy",
Short: config.TranslateInLang(_deployCmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/contract/contractinvoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import (

// Multi-language support
var (
_invokeCmdUses = map[config.Language]string{
config.English: "invoke",
config.Chinese: "invoke",
}
_invokeCmdShorts = map[config.Language]string{
config.English: "Invoke smart contract on IoTeX blockchain",
config.Chinese: "调用IoTeX区块链上的智能合约",
Expand All @@ -27,7 +23,7 @@ var (

// _contractInvokeCmd represents the contract invoke command
var _contractInvokeCmd = &cobra.Command{
Use: config.TranslateInLang(_invokeCmdUses, config.UILanguage),
Use: "invoke",
Short: config.TranslateInLang(_invokeCmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/contract/contractprepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ import (

// Multi-language support
var (
_prepareCmdUses = map[config.Language]string{
config.English: "prepare",
config.Chinese: "prepare",
}
_prepareCmdShorts = map[config.Language]string{
config.English: "Prepare solidity compiler",
config.Chinese: "准备solidity编译器",
Expand All @@ -31,7 +27,7 @@ var (

// ContractPrepareCmd represents the contract prepare command
var ContractPrepareCmd = &cobra.Command{
Use: config.TranslateInLang(_prepareCmdUses, config.UILanguage),
Use: "prepare",
Short: config.TranslateInLang(_prepareCmdShorts, config.UILanguage),
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/contract/contracttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import (

// Multi-language support
var (
_testCmdUses = map[config.Language]string{
config.English: "test",
config.Chinese: "test",
}
_testCmdShorts = map[config.Language]string{
config.English: "Test smart contract of IoTeX blockchain",
config.Chinese: "测试IoTeX区块链部署智能合约",
Expand All @@ -27,7 +23,7 @@ var (

// contractTesCmd represents the contract test command
var _contractTestCmd = &cobra.Command{
Use: config.TranslateInLang(_testCmdUses, config.UILanguage),
Use: "test",
Short: config.TranslateInLang(_testCmdShorts, config.UILanguage),
}

Expand Down
6 changes: 1 addition & 5 deletions ioctl/cmd/did/did.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ var (
config.English: "DID command",
config.Chinese: "DID command",
}
DIDCmdUses = map[config.Language]string{
config.English: "did command",
config.Chinese: "did command",
}
_flagEndpoint = map[config.Language]string{
config.English: "set endpoint for once",
config.Chinese: "一次设置端点",
Expand All @@ -34,7 +30,7 @@ var (

// DIDCmd represents the DID command
var DIDCmd = &cobra.Command{
Use: config.TranslateInLang(DIDCmdUses, config.UILanguage),
Use: "did",
Short: config.TranslateInLang(DIDCmdShorts, config.UILanguage),
}

Expand Down
Loading