Skip to content

Commit 526f352

Browse files
allmightyspiffGitHub Enterprise
authored andcommitted
Merge pull request #774 from Ramkishor-Chaladi/issue_719
Added a space before ":" in incorrecte, [ICT] A space is missing in French before the colon
2 parents f8b356f + f582d5e commit 526f352

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

plugin/commands/tags/delete_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ var _ = Describe("Tags Delete", func() {
6666
It("Incorrect Usage", func() {
6767
err := testhelpers.RunCobraCommand(cliCommand.Command)
6868
Expect(err).To(HaveOccurred())
69-
Expect(err.Error()).To(ContainSubstring("Incorrect Usage"))
69+
Expect(err.Error()).To(ContainSubstring("Incorrect Usage: "))
7070
})
7171
})
7272
})

plugin/commands/tags/detail_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var _ = Describe("Tags Detail", func() {
5757
It("Incorrect Usage", func() {
5858
err := testhelpers.RunCobraCommand(cliCommand.Command)
5959
Expect(err).To(HaveOccurred())
60-
Expect(err.Error()).To(ContainSubstring("Incorrect Usage"))
60+
Expect(err.Error()).To(ContainSubstring("Incorrect Usage: "))
6161
})
6262
})
6363
//sl tags list (SLAPI ERROR)

plugin/errors/invalid_usage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func NewInvalidUsageError(message string) *InvalidUsageError {
1919

2020
func (e *InvalidUsageError) Error() string {
2121
if e.Message == "" {
22-
return T("Incorrect Usage.")
22+
return T("Incorrect Usage: ")
2323
}
2424

2525
return T("Incorrect Usage: ") + e.Message

plugin/metadata/args.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func ExactArgs(n int) cobra.PositionalArgs {
9696
// Just one arg
9797
func OneArgs(cmd *cobra.Command, args []string) error {
9898
if len(args) != 1 {
99-
return fmt.Errorf("%s: %s", T("Incorrect Usage"), T("This command requires one argument."))
99+
return fmt.Errorf("%s%s", T("Incorrect Usage: "), T("This command requires one argument."))
100100
// return fmt.Errorf(T("Incorrect Usage: This command requires one argument."))
101101
}
102102
return nil
@@ -105,23 +105,23 @@ func OneArgs(cmd *cobra.Command, args []string) error {
105105
// Just two arg
106106
func TwoArgs(cmd *cobra.Command, args []string) error {
107107
if len(args) != 2 {
108-
return fmt.Errorf("%s: %s", T("Incorrect Usage"), T("This command requires two arguments."))
108+
return fmt.Errorf("%s%s", T("Incorrect Usage: "), T("This command requires two arguments."))
109109
}
110110
return nil
111111
}
112112

113113
// Just three arg
114114
func ThreeArgs(cmd *cobra.Command, args []string) error {
115115
if len(args) != 3 {
116-
return fmt.Errorf("%s: %s", T("Incorrect Usage"), T("This command requires three arguments."))
116+
return fmt.Errorf("%s%s", T("Incorrect Usage: "), T("This command requires three arguments."))
117117
}
118118
return nil
119119
}
120120

121121
// Just four arg
122122
func FourArgs(cmd *cobra.Command, args []string) error {
123123
if len(args) != 4 {
124-
return fmt.Errorf("%s: %s", T("Incorrect Usage"),T("This command requires four arguments."))
124+
return fmt.Errorf("%s%s", T("Incorrect Usage: "), T("This command requires four arguments."))
125125
}
126126
return nil
127127
}

plugin/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (sl *SoftlayerPlugin) Run(context plugin.PluginContext, args []string) {
9393
cobraErr := cobraCommand.Execute()
9494
if cobraErr != nil {
9595
// Since we surpress the help message on errors, lets show the help message if the error is 'unknown flag'
96-
helpTextTriggers := []string{"unknown flag", T("Incorrect Usage"), T("Invalid input for")}
96+
helpTextTriggers := []string{"unknown flag", T("Incorrect Usage: "), T("Invalid input for")}
9797
for _, trigger := range helpTextTriggers {
9898
if strings.Contains(fmt.Sprintf("%v", cobraErr), trigger) {
9999
realCommand, _, _ := cobraCommand.Find(args)
@@ -214,7 +214,7 @@ func cobraToCLIMeta(topCommand *cobra.Command, namespace string) []plugin.Comman
214214
func getTopCobraCommand(ui terminal.UI, session *session.Session) *cobra.Command {
215215

216216
slCommand := metadata.NewSoftlayerCommand(ui, session)
217-
helpFlag := false;
217+
helpFlag := false
218218
cobraCmd := &cobra.Command{
219219
Use: "sl",
220220
Short: T("Manage Classic infrastructure services"),

0 commit comments

Comments
 (0)