You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usage: "Display name for the user (this is not the username)",
73
+
Usage: localizer.Sprintf("Display name for the user (this is not the username)"),
72
74
})
73
75
74
76
c.AddFlag(cmdparser.FlagOptions{
75
77
String: &c.authType,
76
78
Name: "auth-type",
77
79
DefaultString: "basic",
78
-
Usage: "Authentication type this user will use (basic | other)",
80
+
Usage: localizer.Sprintf("Authentication type this user will use (basic | other)"),
79
81
})
80
82
81
83
c.AddFlag(cmdparser.FlagOptions{
82
84
String: &c.username,
83
85
Name: "username",
84
-
Usage: "The username (provide password in SQLCMD_PASSWORD or SQLCMDPASSWORD environment variable)",
86
+
Usage: localizer.Sprintf("The username (provide password in %s or %s environment variable)", localizer.PasswordEnvVar, localizer.PasswordEnvVar2),
85
87
})
86
88
87
89
c.AddFlag(cmdparser.FlagOptions{
88
90
String: &c.passwordEncryption,
89
91
Name: "password-encryption",
90
-
Usage: fmt.Sprintf("Password encryption method (%s) in sqlconfig file",
91
-
secret.EncryptionMethodsForUsage()),
92
+
Usage: localizer.Sprintf("Password encryption method (%s) in sqlconfig file", secret.EncryptionMethodsForUsage()),
92
93
})
93
94
}
94
95
@@ -105,21 +106,21 @@ func (c *AddUser) run() {
105
106
106
107
ifc.authType!="basic"&&
107
108
c.authType!="other" {
108
-
output.FatalfWithHints([]string{"Authentication type must be 'basic' or 'other'"},
109
-
"Authentication type '' is not valid %v'", c.authType)
109
+
output.FatalfWithHints([]string{localizer.Sprintf("Authentication type must be '%s' or '%s'", localizer.ModernAuthTypeBasic, localizer.ModernAuthTypeOther)},
110
+
localizer.Sprintf("Authentication type '' is not valid %v'", c.authType))
110
111
}
111
112
112
113
ifc.authType!="basic"&&c.passwordEncryption!="" {
113
114
output.FatalWithHints([]string{
114
-
"Remove the --password-encryption flag",
115
-
"Pass in the --auth-type basic"},
116
-
"The --password-encryption flag can only be used when authentication type is 'basic'")
115
+
localizer.Sprintf("Remove the %s flag", localizer.PasswordEncryptFlag),
116
+
localizer.Sprintf("Pass in the %s %s", localizer.AuthTypeFlag, localizer.ModernAuthTypeBasic)},
117
+
localizer.Sprintf("The %s flag can only be used when authentication type is '%s'", localizer.PasswordEncryptFlag, localizer.ModernAuthTypeBasic))
117
118
}
118
119
119
120
ifc.authType=="basic"&&c.passwordEncryption=="" {
120
121
output.FatalWithHints([]string{
121
-
"Add the --password-encryption flag"},
122
-
"The --password-encryption flag must be set when authentication type is 'basic'")
122
+
localizer.Sprintf("Add the %s flag", localizer.PasswordEncryptFlag)},
123
+
localizer.Sprintf("The %s flag must be set when authentication type is '%s'", localizer.PasswordEncryptFlag, localizer.ModernAuthTypeBasic))
0 commit comments