@@ -129,14 +129,14 @@ export class GitHubServer implements IGitHubServer {
129
129
let userCancelled : boolean | undefined ;
130
130
const yes = vscode . l10n . t ( 'Yes' ) ;
131
131
const no = vscode . l10n . t ( 'No' ) ;
132
- const promptToContinue = async ( ) => {
132
+ const promptToContinue = async ( mode : string ) => {
133
133
if ( userCancelled === undefined ) {
134
134
// We haven't had a failure yet so wait to prompt
135
135
return ;
136
136
}
137
137
const message = userCancelled
138
- ? vscode . l10n . t ( 'Having trouble logging in? Would you like to try a different way?' )
139
- : vscode . l10n . t ( 'You have not yet finished authorizing this extension to use GitHub. Would you like to keep trying?' ) ;
138
+ ? vscode . l10n . t ( 'Having trouble logging in? Would you like to try a different way? ({0})' , mode )
139
+ : vscode . l10n . t ( 'You have not yet finished authorizing this extension to use GitHub. Would you like to try a different way? ({0})' , mode ) ;
140
140
const result = await vscode . window . showWarningMessage ( message , yes , no ) ;
141
141
if ( result !== yes ) {
142
142
throw new Error ( CANCELLATION_ERROR ) ;
@@ -167,7 +167,7 @@ export class GitHubServer implements IGitHubServer {
167
167
supportedTarget
168
168
) {
169
169
try {
170
- await promptToContinue ( ) ;
170
+ await promptToContinue ( vscode . l10n . t ( 'local server' ) ) ;
171
171
return await this . doLoginWithLocalServer ( scopes ) ;
172
172
} catch ( e ) {
173
173
userCancelled = this . processLoginError ( e ) ;
@@ -177,7 +177,7 @@ export class GitHubServer implements IGitHubServer {
177
177
// We only can use the Device Code flow when we have a full node environment because of CORS.
178
178
if ( typeof navigator === 'undefined' ) {
179
179
try {
180
- await promptToContinue ( ) ;
180
+ await promptToContinue ( vscode . l10n . t ( 'device code' ) ) ;
181
181
return await this . doLoginDeviceCodeFlow ( scopes ) ;
182
182
} catch ( e ) {
183
183
userCancelled = this . processLoginError ( e ) ;
@@ -188,7 +188,7 @@ export class GitHubServer implements IGitHubServer {
188
188
// With that said, GitHub Enterprise isn't used by Settings Sync so we can use PATs for that.
189
189
if ( ! supportedClient || this . _type === AuthProviderType . githubEnterprise ) {
190
190
try {
191
- await promptToContinue ( ) ;
191
+ await promptToContinue ( vscode . l10n . t ( 'personal access token' ) ) ;
192
192
return await this . doLoginWithPat ( scopes ) ;
193
193
} catch ( e ) {
194
194
userCancelled = this . processLoginError ( e ) ;
0 commit comments