-
Notifications
You must be signed in to change notification settings - Fork 577
Expand file tree
/
Copy pathlocConstants.ts
More file actions
3401 lines (3267 loc) · 151 KB
/
locConstants.ts
File metadata and controls
3401 lines (3267 loc) · 151 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { l10n } from "vscode";
import * as os from "os";
// Warning: Only update these strings if you are sure you want to affect _all_ locations they're shared between.
export class Common {
public static remindMeLater = l10n.t("Remind Me Later");
public static dontShowAgain = l10n.t("Don't Show Again");
public static learnMore = l10n.t("Learn More");
public static delete = l10n.t("Delete");
public static cancel = l10n.t("Cancel");
public static areYouSure = l10n.t("Are you sure?");
public static areYouSureYouWantTo = (action: string) =>
l10n.t({
message: "Are you sure you want to {0}?",
args: [action],
comment: ["{0} is the action being confirmed"],
});
public static accept = l10n.t("Accept");
public static error = l10n.t("Error");
public static publicString = l10n.t("Public");
public static privateString = l10n.t("Private");
public static remove = l10n.t("Remove");
}
export let createDatabaseDialogTitle = l10n.t("Create Database (Preview)");
export let dropDatabaseDialogTitle = l10n.t("Drop Database (Preview)");
export let renameDatabaseDialogTitle = l10n.t("Rename Database (Preview)");
export let createDatabaseWebviewTitle = l10n.t("Create Database (Preview)");
export let dropDatabaseWebviewTitle = l10n.t("Drop Database (Preview)");
export let renameDatabaseInputPlaceholder = l10n.t("Enter the new database name");
export let databaseNameRequired = l10n.t("Database name is required");
export let msgSelectServerNodeToCreateDatabase = l10n.t(
"Please select a server node in Object Explorer to create a database.",
);
export let msgSelectDatabaseNodeToDrop = l10n.t(
"Please select a database node in Object Explorer to drop.",
);
export let msgSelectDatabaseNodeToRename = l10n.t(
"Please select a database node in Object Explorer to rename.",
);
export function createDatabaseError(databaseName: string, errorMessage: string) {
return l10n.t({
message: "Failed to create database '{0}'. {1}",
args: [databaseName, errorMessage],
comment: ["{0} is the database name", "{1} is the error message"],
});
}
export function dropDatabaseError(databaseName: string, errorMessage: string) {
return l10n.t({
message: "Failed to drop database '{0}'. {1}",
args: [databaseName, errorMessage],
comment: ["{0} is the database name", "{1} is the error message"],
});
}
export function renameDatabaseError(
databaseName: string,
newDatabaseName: string,
errorMessage: string,
) {
return l10n.t({
message: "Failed to rename database '{0}' to '{1}'. {2}",
args: [databaseName, newDatabaseName, errorMessage],
comment: [
"{0} is the current database name",
"{1} is the new database name",
"{2} is the error message",
],
});
}
export function renamingDatabase(databaseName: string, newDatabaseName: string) {
return l10n.t({
message: "Renaming database '{0}' to '{1}'...",
args: [databaseName, newDatabaseName],
comment: ["{0} is the current database name", "{1} is the new database name"],
});
}
export let viewMore = l10n.t("View More");
export let releaseNotesPromptDescription = l10n.t(
"View mssql for Visual Studio Code release notes?",
);
export function msgStartedExecute(documentName: string) {
return l10n.t({
message: 'Started query execution for document "{0}"',
args: [documentName],
comment: ["{0} is the document name"],
});
}
export function msgFinishedExecute(documentName: string) {
return l10n.t({
message: 'Finished query execution for document "{0}"',
args: [documentName],
comment: ["{0} is the document name"],
});
}
export let msgRunQueryInProgress = l10n.t(
"A query is already running for this editor session. Please cancel this query or wait for its completion.",
);
export let runQueryBatchStartMessage = l10n.t("Started executing query at ");
export function runQueryBatchStartLine(lineNumber: number) {
return l10n.t({
message: "Line {0}",
args: [lineNumber],
comment: ["{0} is the line number"],
});
}
export function msgCancelQueryFailed(error: string) {
return l10n.t({
message: "Canceling the query failed: {0}",
args: [error],
comment: ["{0} is the error message"],
});
}
export let msgCancelQueryNotRunning = l10n.t("Cannot cancel query as no query is running.");
export let msgChooseDatabaseNotConnected = l10n.t(
"No connection was found. Please connect to a server first.",
);
export let msgChooseDatabasePlaceholder = l10n.t("Choose a database from the list below");
export function msgConnectionError(errorNumber: number, errorMessage: string) {
return l10n.t({
message: "Error {0}: {1}",
args: [errorNumber, errorMessage],
comment: ["{0} is the error number", "{1} is the error message"],
});
}
export function msgConnectionError2(errorMessage: string) {
return l10n.t({
message: "Failed to connect: {0}",
args: [errorMessage],
comment: ["{0} is the error message"],
});
}
export let serverNameMissing = l10n.t("Server name not set.");
export function msgConnectionErrorPasswordExpired(errorNumber: number, errorMessage: string) {
return l10n.t({
message:
"Error {0}: {1} Please login as a different user and change the password using ALTER LOGIN.",
args: [errorNumber, errorMessage],
comment: ["{0} is the error number", "{1} is the error message"],
});
}
export let msgPromptCancelConnect = l10n.t("Server connection in progress. Do you want to cancel?");
export let msgConnectionInProgress = l10n.t(
"A connection is already being established. Please wait for it to complete before running a query.",
);
export let msgPromptClearRecentConnections = l10n.t("Confirm to clear recent connections list");
export let msgOpenSqlFile = l10n.t(
'To use this command, Open a .sql file -or- Change editor language to "SQL" -or- Select T-SQL text in the active SQL editor.',
);
export let recentConnectionsPlaceholder = l10n.t("Choose a connection profile from the list below");
export let CreateProfileFromConnectionsListLabel = l10n.t("Create Connection Profile");
export let CreateProfileLabel = l10n.t("Create a new connection profile");
export let ClearRecentlyUsedLabel = l10n.t("Clear Recent Connections List");
export let EditProfilesLabel = l10n.t("Edit an existing connection profile");
export let RemoveProfileLabel = l10n.t("Remove a connection profile");
export let ManageProfilesPrompt = l10n.t("Manage Connection Profiles");
export let SampleServerName = l10n.t("{{put-server-name-here}}");
export let serverPrompt = l10n.t("Server name or ADO.NET connection string");
export let serverPlaceholder = l10n.t(
"hostname\\instance or <server>.database.windows.net or ADO.NET connection string",
);
export let databasePrompt = l10n.t("Database name");
export let startIpAddressPrompt = l10n.t("Start IP Address");
export let endIpAddressPrompt = l10n.t("End IP Address");
export let firewallRuleNamePrompt = l10n.t("Firewall rule name");
export let databasePlaceholder = l10n.t(
"[Optional] Database to connect (press Enter to connect to <default> database)",
);
export let authTypePrompt = l10n.t("Authentication Type");
export let authTypeName = l10n.t("authenticationType");
export let authTypeIntegrated = l10n.t("Integrated");
export let authTypeSql = l10n.t("SQL Login");
export let authTypeAzureActiveDirectory = l10n.t("Microsoft Entra Id - Universal w/ MFA Support");
export let authTypeAzureActiveDirectoryDefault = l10n.t("Microsoft Entra Id - Default");
export let azureAuthTypeCodeGrant = l10n.t("Azure Code Grant");
export let azureAuthTypeDeviceCode = l10n.t("Azure Device Code");
export let azureLogChannelName = l10n.t("MSSQL - Azure Auth Logs");
export let azureConsentDialogOpen = l10n.t("Open");
export let azureConsentDialogIgnore = l10n.t("Ignore Tenant");
export function azureConsentDialogBody(tenantName: string, tenantId: string, resource: string) {
return l10n.t({
message:
"Your tenant '{0} ({1})' requires you to re-authenticate again to access {2} resources. Press Open to start the authentication process.",
args: [tenantName, tenantId, resource],
comment: ["{0} is the tenant name", "{1} is the tenant id", "{2} is the resource"],
});
}
export function azureConsentDialogBodyAccount(resource: string) {
return l10n.t({
message:
"Your account needs re-authentication to access {0} resources. Press Open to start the authentication process.",
args: [resource],
comment: ["{0} is the resource"],
});
}
export let azureMicrosoftCorpAccount = l10n.t("Microsoft Corp");
export let azureMicrosoftAccount = l10n.t("Microsoft Entra Account");
export function azureNoMicrosoftResource(provider: string) {
return l10n.t({
message: "Provider '{0}' does not have a Microsoft resource endpoint defined.",
args: [provider],
comment: ["{0} is the provider"],
});
}
export let azureServerCouldNotStart = l10n.t(
"Server could not start. This could be a permissions error or an incompatibility on your system. You can try enabling device code authentication from settings.",
);
export let azureAuthNonceError = l10n.t(
"Authentication failed due to a nonce mismatch, please close Azure Data Studio and try again.",
);
export let azureAuthStateError = l10n.t(
"Authentication failed due to a state mismatch, please close ADS and try again.",
);
export let encryptPrompt = l10n.t("Encrypt");
export let encryptName = l10n.t("encrypt");
export let encryptOptional = l10n.t("Optional (False)");
export let encryptMandatory = l10n.t("Mandatory (True)");
export let encryptMandatoryRecommended = l10n.t("Mandatory (Recommended)");
export let enableTrustServerCertificate = l10n.t("Enable Trust Server Certificate");
export let readMore = l10n.t("Read more");
export let msgCopyAndOpenWebpage = l10n.t("Copy code and open webpage");
export let azureChooseAccount = l10n.t("Choose a Microsoft Entra account");
export let azureAddAccount = l10n.t("Add a Microsoft Entra account...");
export function accountAddedSuccessfully(account: string) {
return l10n.t({
message: "Microsoft Entra account {0} successfully added.",
args: [account],
comment: ["{0} is the account name"],
});
}
export let accountCouldNotBeAdded = l10n.t("New Microsoft Entra account could not be added.");
export let accountRemovedSuccessfully = l10n.t(
"Selected Microsoft Entra account removed successfully.",
);
export function accountRemovalFailed(error: string) {
return l10n.t({
message: "An error occurred while removing Microsoft Entra account: {0}",
args: [error],
comment: ["{0} is the error message"],
});
}
export let noAzureAccountForRemoval = l10n.t(
"No Microsoft Entra account can be found for removal.",
);
export let cannotConnect = l10n.t(
"Cannot connect due to expired tokens. Please re-authenticate and try again.",
);
export let aad = l10n.t("Microsoft Entra Id");
export let azureChooseTenant = l10n.t("Choose a Microsoft Entra tenant");
export let tenant = l10n.t("Tenant");
export let usernamePrompt = l10n.t("User name");
export let usernamePlaceholder = l10n.t("User name (SQL Login)");
export let passwordPrompt = l10n.t("Password");
export let passwordPlaceholder = l10n.t("Password (SQL Login)");
export let msgSavePassword = l10n.t(
"Save Password? If 'No', password will be required each time you connect",
);
export let profileNamePrompt = l10n.t("Profile Name");
export let msgCannotOpenContent = l10n.t("Error occurred opening content in editor.");
export let msgSaveStarted = l10n.t("Started saving results to ");
export let msgSaveFailed = l10n.t("Failed to save results. ");
export let msgSaveSucceeded = l10n.t("Successfully saved results to ");
export let msgSelectProfileToRemove = l10n.t("Select profile to remove");
export let msgSelectProfileToEdit = l10n.t("Select profile to edit");
export let confirmRemoveProfilePrompt = l10n.t("Confirm to remove this profile.");
export let msgNoProfilesToRemove = l10n.t("No connection profiles to remove.");
export let msgNoProfilesToEdit = l10n.t("No connection profiles to edit.");
export let msgProfileRemoved = l10n.t("Profile removed successfully");
export let msgProfileCreated = l10n.t("Profile created successfully");
export let msgProfileCreatedAndConnected = l10n.t("Profile created and connected");
export let msgClearedRecentConnections = l10n.t("Recent connections list cleared");
export let msgIsRequired = l10n.t(" is required.");
export let msgError = l10n.t("Error: ");
export let msgYes = l10n.t("Yes");
export let msgNo = l10n.t("No");
export let defaultDatabaseLabel = l10n.t("<default>");
export let connectingTooltip = l10n.t("Connecting to: ");
export let connectErrorTooltip = l10n.t("Error connecting to: ");
export let connectErrorCode = l10n.t("Error code: ");
export let connectErrorMessage = l10n.t("Error Message: ");
export let cancelingQueryLabel = l10n.t("Canceling query ");
export let updatingIntelliSenseLabel = l10n.t("Updating IntelliSense...");
export let extensionNotInitializedError = l10n.t(
"Unable to execute the command while the extension is initializing. Please try again later.",
);
export let untitledScheme = l10n.t("untitled");
export let msgChangeLanguageMode = l10n.t(
'To use this command, you must set the language to "SQL". Confirm to change language mode.',
);
export function msgChangedDatabaseContext(databaseName: string, documentName: string) {
return l10n.t({
message: 'Changed database context to "{0}" for document "{1}"',
args: [databaseName, documentName],
comment: ["{0} is the database name", "{1} is the document name"],
});
}
export let msgPromptRetryCreateProfile = l10n.t(
"Error: Unable to connect using the connection information provided. Retry profile creation?",
);
export let refreshTokenLabel = l10n.t("Refresh Credentials");
export let msgGetTokenFail = l10n.t("Failed to fetch user tokens.");
export let msgPromptRetryConnectionDifferentCredentials = l10n.t(
"Error: Login failed. Retry using different credentials?",
);
export let msgPromptSSLCertificateValidationFailed = l10n.t(
"Encryption was enabled on this connection; review your SSL and certificate configuration for the target SQL Server, or set 'Trust server certificate' to 'true' in the settings file. Note: A self-signed certificate offers only limited protection and is not a recommended practice for production environments. Do you want to enable 'Trust server certificate' on this connection and retry?",
);
export let msgPromptRetryFirewallRuleNotSignedIn = l10n.t(
"Your client IP address does not have access to the server. Add a Microsoft Entra account and create a new firewall rule to enable access.",
);
export function msgPromptRetryFirewallRuleSignedIn(clientIp: string, serverName: string) {
return l10n.t({
message:
"Your client IP Address '{0}' does not have access to the server '{1}' you're attempting to connect to. Would you like to create new firewall rule?",
args: [clientIp, serverName],
comment: ["{0} is the client IP address", "{1} is the server name"],
});
}
export let msgPromptRetryFirewallRuleAdded = l10n.t(
"Firewall rule successfully added. Retry profile creation? ",
);
export function msgAccountRefreshFailed(error?: string) {
if (!error) {
return l10n.t(
"Credential Error: An error occurred while attempting to refresh account credentials. Please re-authenticate.",
);
} else {
return l10n.t({
message:
"Credential Error: An error occurred while attempting to refresh account credentials. Please re-authenticate. Error: {0}",
args: [error],
comment: ["{0} is the error message"],
});
}
}
export let msgPromptProfileUpdateFailed = l10n.t(
"Connection Profile could not be updated. Please modify the connection details manually in settings.json and try again.",
);
export let msgUnableToExpand = l10n.t("Unable to expand. Please check logs for more information.");
export let msgPromptFirewallRuleCreated = l10n.t("Firewall rule successfully created.");
export let msgAuthTypeNotFound = l10n.t(
"Failed to get authentication method, please remove and re-add the account.",
);
export let msgAccountNotFound = l10n.t("Account not found");
export let msgChooseQueryHistory = l10n.t("Choose Query History");
export let msgChooseQueryHistoryAction = l10n.t("Choose An Action");
export let msgOpenQueryHistory = l10n.t("Open Query History");
export let msgRunQueryHistory = l10n.t("Run Query History");
export let msgInvalidIpAddress = l10n.t("Invalid IP Address");
export let msgInvalidRuleName = l10n.t("Invalid Firewall rule name");
export let msgNoQueriesAvailable = l10n.t("No Queries Available");
export let retryLabel = l10n.t("Retry");
export let createFirewallRuleLabel = l10n.t("Create Firewall Rule");
export function msgConnecting(serverName: string, documentName: string) {
return l10n.t({
message: 'Connecting to server "{0}" on document "{1}".',
args: [serverName, documentName],
comment: ["{0} is the server name", "{1} is the document name"],
});
}
export function msgConnectionNotFound(uri: string) {
return l10n.t({
message: 'Connection not found for uri "{0}".',
args: [uri],
comment: ["{0} is the uri"],
});
}
export function msgFoundPendingReconnect(uri: string) {
return l10n.t({
message: "Found pending reconnect promise for uri {0}, waiting.",
args: [uri],
comment: ["{0} is the uri"],
});
}
export function msgPendingReconnectSuccess(uri: string) {
return l10n.t({
message: "Previous pending reconnection for uri {0}, succeeded.",
args: [uri],
comment: ["{0} is the uri"],
});
}
export function msgFoundPendingReconnectFailed(uri: string) {
return l10n.t({
message: "Found pending reconnect promise for uri {0}, failed.",
args: [uri],
comment: ["{0} is the uri"],
});
}
export function msgFoundPendingReconnectError(uri: string, error: string) {
return l10n.t({
message:
"Previous pending reconnect promise for uri {0} is rejected with error {1}, will attempt to reconnect if necessary.",
args: [uri, error],
comment: ["{0} is the uri", "{1} is the error"],
});
}
export function msgAcessTokenExpired(connectionId: string, uri: string) {
return l10n.t({
message: "Access token expired for connection {0} with uri {1}",
args: [connectionId, uri],
comment: ["{0} is the connection id", "{1} is the uri"],
});
}
export let msgRefreshTokenError = l10n.t("Error when refreshing token");
export let msgAzureCredStoreSaveFailedError = l10n.t(
'Keys for token cache could not be saved in credential store, this may cause Microsoft Entra Id access token persistence issues and connection instabilities. It\'s likely that SqlTools has reached credential storage limit on Windows, please clear at least 2 credentials that start with "Microsoft.SqlTools|" in Windows Credential Manager and reload.',
);
export function msgRefreshConnection(connectionId: string, uri: string) {
return l10n.t({
message: "Failed to refresh connection ${0} with uri {1}, invalid connection result.",
args: [connectionId, uri],
comment: ["{0} is the connection id", "{1} is the uri"],
});
}
export function msgRefreshTokenSuccess(connectionId: string, uri: string, message: string) {
return l10n.t({
message: "Successfully refreshed token for connection {0} with uri {1}, {2}",
args: [connectionId, uri, message],
comment: ["{0} is the connection id", "{1} is the uri", "{2} is the message"],
});
}
export function msgRefreshTokenNotNeeded(connectionId: string, uri: string) {
return l10n.t({
message:
"No need to refresh Microsoft Entra acccount token for connection {0} with uri {1}",
args: [connectionId, uri],
comment: ["{0} is the connection id", "{1} is the uri"],
});
}
export function msgConnectedServerInfo(
serverName: string,
documentName: string,
serverInfo: string,
) {
return l10n.t({
message: 'Connected to server "{0}" on document "{1}". Server information: {2}',
args: [serverName, documentName, serverInfo],
comment: ["{0} is the server name", "{1} is the document name", "{2} is the server info"],
});
}
export function msgConnectionFailed(serverName: string, errorMessage: string) {
return l10n.t({
message: 'Error connecting to server "{0}". Details: {1}',
args: [serverName, errorMessage],
comment: ["{0} is the server name", "{1} is the error message"],
});
}
export function msgChangingDatabase(
databaseName: string,
serverName: string,
documentName: string,
) {
return l10n.t({
message: 'Changing database context to "{0}" on server "{1}" on document "{2}".',
args: [databaseName, serverName, documentName],
comment: ["{0} is the database name", "{1} is the server name", "{2} is the document name"],
});
}
export function msgChangedDatabase(databaseName: string, serverName: string, documentName: string) {
return l10n.t({
message: 'Changed database context to "{0}" on server "{1}" on document "{2}".',
args: [databaseName, serverName, documentName],
comment: ["{0} is the database name", "{1} is the server name", "{2} is the document name"],
});
}
export function msgDisconnected(documentName: string) {
return l10n.t({
message: 'Disconnected on document "{0}"',
args: [documentName],
comment: ["{0} is the document name"],
});
}
export let help = l10n.t("Help");
export let macSierraRequiredErrorMessage = l10n.t(
"macOS Sierra or newer is required to use this feature.",
);
export let gettingDefinitionMessage = l10n.t("Getting definition ...");
export let definitionRequestedStatus = l10n.t("DefinitionRequested");
export let definitionRequestCompletedStatus = l10n.t("DefinitionRequestCompleted");
export let updatingIntelliSenseStatus = l10n.t("updatingIntelliSense");
export let intelliSenseUpdatedStatus = l10n.t("intelliSenseUpdated");
export let testLocalizationConstant = l10n.t("test");
export let disconnectOptionLabel = l10n.t("Disconnect");
export let disconnectOptionDescription = l10n.t("Close the current connection");
export let disconnectConfirmationMsg = l10n.t("Are you sure you want to disconnect?");
export function elapsedBatchTime(batchTime: string) {
return l10n.t({
message: "Batch execution time: {0}",
args: [batchTime],
comment: ["{0} is the batch time"],
});
}
export let noActiveEditorMsg = l10n.t("A SQL editor must have focus before executing this command");
export let maximizeLabel = l10n.t("Maximize");
export let restoreLabel = l10n.t("Restore");
export let saveCSVLabel = l10n.t("Save as CSV");
export let saveJSONLabel = l10n.t("Save as JSON");
export let saveExcelLabel = l10n.t("Save as Excel");
export let fileTypeCSVLabel = l10n.t("CSV");
export let fileTypeJSONLabel = l10n.t("JSON");
export let fileTypeExcelLabel = l10n.t("Excel");
export let resultPaneLabel = l10n.t("Results");
export let selectAll = l10n.t("Select all");
export let copyLabel = l10n.t("Copy");
export let copyWithHeadersLabel = l10n.t("Copy with Headers");
export let executeQueryLabel = l10n.t("Executing query...");
export let QueryExecutedLabel = l10n.t("Query executed");
export let messagePaneLabel = l10n.t("Messages");
export let messagesTableTimeStampColumn = l10n.t("Timestamp");
export let messagesTableMessageColumn = l10n.t("Message");
export function lineSelectorFormatted(lineNumber: number) {
return l10n.t({
message: "Line {0}",
args: [lineNumber],
comment: ["{0} is the line number"],
});
}
export function elapsedTimeLabel(elapsedTime: string) {
return l10n.t({
message: "Total execution time: {0}",
args: [elapsedTime],
comment: ["{0} is the elapsed time"],
});
}
export let msgCannotSaveMultipleSelections = l10n.t(
"Save results command cannot be used with multiple selections.",
);
export let mssqlProviderName = l10n.t("MSSQL");
export let noneProviderName = l10n.t("None");
export let flavorChooseLanguage = l10n.t("Choose SQL Language");
export let flavorDescriptionMssql = l10n.t(
"Use T-SQL intellisense and syntax error checking on current document",
);
export let flavorDescriptionNone = l10n.t(
"Disable intellisense and syntax error checking on current document",
);
export let autoDisableNonTSqlLanguageServicePrompt = l10n.t(
"Non-SQL Server SQL file detected. Disable IntelliSense for such files?",
);
export let msgAddConnection = l10n.t("Add Connection");
export let msgConnect = l10n.t("Connect");
export let azureSignIn = l10n.t("Azure: Sign In");
export let azureSignInDescription = l10n.t("Sign in to your Azure subscription");
export let azureSignInWithDeviceCode = l10n.t("Azure: Sign In with Device Code");
export let azureSignInWithDeviceCodeDescription = l10n.t(
"Sign in to your Azure subscription with a device code. Use this in setups where the Sign In command does not work",
);
export let azureSignInToAzureCloud = l10n.t("Azure: Sign In to Azure Cloud");
export let azureSignInToAzureCloudDescription = l10n.t(
"Sign in to your Azure subscription in one of the sovereign clouds.",
);
export function taskStatusWithName(taskName: string, status: string) {
return l10n.t({
message: "{0}: {1}",
args: [taskName, status],
comment: ["{0} is the task name", "{1} is the status"],
});
}
export function taskStatusWithMessage(status: string, message: string) {
return l10n.t({
message: "{0}. {1}",
args: [status, message],
comment: ["{0} is the status", "{1} is the message"],
});
}
export function taskStatusWithNameAndMessage(taskName: string, status: string, message: string) {
return l10n.t({
message: "{0}: {1}. {2}",
args: [taskName, status, message],
comment: ["{0} is the task name", "{1} is the status", "{2} is the message"],
});
}
export let failed = l10n.t("Failed");
export let succeeded = l10n.t("Succeeded");
export let succeededWithWarning = l10n.t("Succeeded with warning");
export let canceled = l10n.t("Canceled");
export let inProgress = l10n.t("In progress");
export let canceling = l10n.t("Canceling");
export let notStarted = l10n.t("Not started");
export let nodeErrorMessage = l10n.t("Parent node was not TreeNodeInfo.");
export function deleteCredentialError(id: string, error: string) {
return l10n.t({
message: "Failed to delete credential with id: {0}. {1}",
args: [id, error],
comment: ["{0} is the id", "{1} is the error"],
});
}
export let msgClearedRecentConnectionsWithErrors = l10n.t(
"The recent connections list has been cleared but there were errors while deleting some associated credentials. View the errors in the MSSQL output channel.",
);
export let connectProgressNoticationTitle = l10n.t("Testing connection profile...");
export let msgMultipleSelectionModeNotSupported = l10n.t(
"Running query is not supported when the editor is in multiple selection mode.",
);
export let msgSelectNodeToScript = l10n.t("Please select a node from Object Explorer to script.");
export let msgSelectSingleNodeToScript = l10n.t(
"Please select only one node to script. Multiple node scripting is not supported.",
);
export function msgScriptingObjectNotFound(nodeType: string, nodeLabel: string): string {
return l10n.t({
message: "Could not find scripting metadata for {0} '{1}'.",
args: [nodeType, nodeLabel],
comment: ["{0} is the node type", "{1} is the node label"],
});
}
export let msgScriptingFailed = l10n.t(
"Failed to generate script. Please check the logs for more details.",
);
export let msgScriptingEditorFailed = l10n.t("Failed to open script in editor.");
export let msgNoScriptGenerated = l10n.t("No script generated.");
export let msgObjectManagementUnknownDialog = l10n.t("Unknown object management dialog.");
export function msgScriptingOperationFailed(error: string): string {
return l10n.t({
message: "Failed to generate script: {0}",
args: [error],
comment: ["{0} is the error message"],
});
}
export let newColumnWidthPrompt = l10n.t("Enter new column width");
export let columnWidthInvalidNumberError = l10n.t("Invalid column width");
export let columnWidthMustBePositiveError = l10n.t("Width cannot be 0 or negative");
export let objectExplorerNodeRefreshError = l10n.t(
"An error occurred refreshing nodes. See the MSSQL output channel for more details.",
);
export let showOutputChannelActionButtonText = l10n.t("Show MSSQL output");
export let reloadPrompt = l10n.t(
"Authentication Library has changed, please reload Visual Studio Code.",
);
export let reloadPromptGeneric = l10n.t(
"Visual Studio Code must be relaunched for this setting to come into effect. Please reload Visual Studio Code.",
);
export let reloadChoice = l10n.t("Reload Visual Studio Code");
export let switchToMsal = l10n.t("Switch to MSAL");
export let dismiss = l10n.t("Dismiss");
export let querySuccess = l10n.t("Query succeeded");
export let queryFailed = l10n.t("Query failed");
export let parameters = l10n.t("Parameters");
export let loading = l10n.t("Loading");
export let executionPlan = l10n.t("Execution Plan");
export let executionPlanFileFilter = l10n.t("SQL Plan Files");
export let scriptCopiedToClipboard = l10n.t("Script copied to clipboard");
export let copied = l10n.t("Copied");
export let copyingResults = l10n.t("Copying results...");
export let resultsCopiedToClipboard = l10n.t("Results copied to clipboard");
export let openQueryResultsInTabByDefaultPrompt = l10n.t(
"Do you want to always display query results in a new tab instead of the query pane?",
);
export let alwaysShowInNewTab = l10n.t("Always show in new tab");
export let keepInQueryPane = l10n.t("Keep in query pane");
export let inMemoryDataProcessingThresholdExceeded = l10n.t(
"Max row count for filtering/sorting has been exceeded. To update it, navigate to User Settings and change the setting: mssql.resultsGrid.inMemoryDataProcessingThreshold",
);
export let newDeployment = l10n.t("New Deployment");
export class Notebooks {
// Status bar
public static statusBarClickToChangeConnection = l10n.t("MSSQL: Click to change connection");
public static statusBarClickToChangeDatabase = l10n.t("MSSQL: Click to change database");
// Errors
public static connectionFailed = l10n.t("Connection failed");
public static queryExecutionFailed = l10n.t("Query execution failed");
public static noActiveNotebook = l10n.t("No active notebook.");
public static noActiveConnection = l10n.t("No active connection.");
public static noConnectionSelected = l10n.t("No connection selected.");
// Execution results
public static rowsAffected(count: number) {
return l10n.t({
message: "({0} row(s) affected)",
args: [count],
comment: ["{0} is the number of rows affected"],
});
}
public static commandCompletedSuccessfully = l10n.t("(Command completed successfully)");
public static zeroRows = l10n.t("(0 rows)");
public static resultSetTruncated(actual: number, expected: number) {
return l10n.t({
message:
"Warning: Result set is incomplete. Showing {0} of {1} rows. The full result set could not be loaded.",
args: [actual, expected],
comment: [
"{0} is the number of rows actually returned",
"{1} is the total number of rows expected",
],
});
}
public static rowCountPlain(count: number) {
if (count === 1) {
return l10n.t({
message: "({0} row)",
args: [count],
comment: ["{0} is the number of rows (singular)"],
});
}
return l10n.t({
message: "({0} rows)",
args: [count],
comment: ["{0} is the number of rows (plural)"],
});
}
// Magic commands
public static disconnected = l10n.t("Disconnected.");
public static connectedTo(label: string) {
return l10n.t({
message: "Connected to {0}",
args: [label],
comment: ["{0} is the connection label"],
});
}
public static switchedTo(label: string) {
return l10n.t({
message: "Switched to {0}",
args: [label],
comment: ["{0} is the connection label"],
});
}
public static noDatabaseSelected = l10n.t("No database selected.");
public static unknownMagicCommand(cmd: string) {
return l10n.t({
message: "Unknown magic command: %%{0}",
args: [cmd],
comment: ["{0} is the magic command name"],
});
}
// UI
public static selectDatabase = l10n.t("Select Database");
public static chooseDatabasePlaceholder = l10n.t("Choose a database");
public static currentDatabaseLabel = l10n.t("(current)");
// Code lens
public static codeLensClickToChangeConnection = l10n.t("Click to change connection");
public static codeLensClickToChangeDatabase = l10n.t("Click to change database");
public static codeLensConnectToSqlServer = l10n.t("Connect to SQL Server");
// Info
public static notebookConnectedTo(label: string) {
return l10n.t({
message: "MSSQL Notebook connected to {0}",
args: [label],
comment: ["{0} is the connection label"],
});
}
public static errorPrefix(msg: string) {
return l10n.t({
message: "Error: {0}",
args: [msg],
comment: ["{0} is the error message"],
});
}
// Cancellation
public static executionCanceled = l10n.t("Query execution was canceled.");
// Controller
public static controllerDescription = l10n.t("Execute SQL against SQL Server / Azure SQL");
// General
public static notConnected = l10n.t("Not connected");
// Renderer
public static parseError = l10n.t("Error: Failed to parse query result data.");
}
export class ObjectExplorer {
public static ErrorLoadingRefreshToTryAgain = l10n.t("Error loading; refresh to try again");
public static NoItems = l10n.t("No items");
public static FailedOEConnectionError = l10n.t(
"We couldn't connect using the current connection information. Would you like to retry the connection or edit the connection profile?",
);
public static FailedOEConnectionErrorRetry = l10n.t("Retry");
public static FailedOEConnectionErrorUpdate = l10n.t("Edit connection profile");
public static FailedOEConnectionErrorSignIn = l10n.t("Sign in and retry");
public static Connecting = l10n.t("Connecting...");
public static NodeDeletionConfirmation(nodeLabel: string) {
return l10n.t({
message: "Are you sure you want to remove {0}?",
args: [nodeLabel],
comment: ["{0} is the node label"],
});
}
public static NodeDeletionConfirmationYes = l10n.t("Yes");
public static NodeDeletionConfirmationNo = l10n.t("No");
public static LoadingNodeLabel = l10n.t("Loading...");
public static GeneratingScript = l10n.t("Generating script...");
public static FetchingScriptLabel(scriptType: string) {
return l10n.t({
message: "Fetching {0} script...",
args: [scriptType],
comment: ["{0} is the script type"],
});
}
public static ScriptSelectLabel = l10n.t("Select");
public static ScriptCreateLabel = l10n.t("Create");
public static ScriptInsertLabel = l10n.t("Insert");
public static ScriptUpdateLabel = l10n.t("Update");
public static ScriptDeleteLabel = l10n.t("Delete");
public static ScriptExecuteLabel = l10n.t("Execute");
public static ScriptAlterLabel = l10n.t("Alter");
public static AzureSignInMessage(accountName: string) {
return l10n.t({
message: "Signing in to Azure as {0}...",
args: [accountName],
comment: ["{0} is the account name"],
});
}
public static ConnectionGroupDeletionConfirmationWithContents(groupName: string) {
return l10n.t({
message:
"Are you sure you want to delete {0}? You can delete its connections as well, or move them to the root folder.",
args: [groupName],
comment: ["{0} is the group name"],
});
}
public static ConnectionGroupDeleteContents = l10n.t("Delete Contents");
public static ConnectionGroupMoveContents = l10n.t("Move to Root");
public static ConnectionGroupDeletionConfirmationWithoutContents(groupName: string) {
return l10n.t({
message: "Are you sure you want to delete {0}?",
args: [groupName],
comment: ["{0} is the group name"],
});
}
public static ConnectionStringCopied = l10n.t("Connection string copied to clipboard");
}
export class ConnectionDialog {
public static connectionDialog = l10n.t("Connection Dialog");
public static microsoftAccount = l10n.t("Microsoft Account");
public static microsoftAccountIsRequired = l10n.t("Microsoft Account is required");
public static selectAnAccount = l10n.t("Select an account");
public static addAccount = l10n.t("Add account");
public static savePassword = l10n.t("Save Password");
public static tenantId = l10n.t("Tenant ID");
public static selectATenant = l10n.t("Select a tenant");
public static tenantIdIsRequired = l10n.t("Tenant ID is required");
public static profileName = l10n.t("Profile Name");
public static profileNamePlaceholder = l10n.t("Enter profile name");
public static profileNameTooltip = l10n.t(
"[Optional] Enter a display name for this connection profile",
);
public static connectionGroup = l10n.t("Connection Group");
public static serverIsRequired = l10n.t("Server is required");
public static usernameIsRequired = l10n.t("User name is required");
public static connectionString = l10n.t("Connection String");
public static connectionStringIsRequired = l10n.t("Connection string is required");
public static signIn = l10n.t("Sign in");
public static additionalParameters = l10n.t("Additional parameters");
public static connect = l10n.t("Connect");
public static default = l10n.t("<Default>");
public static createConnectionGroup = l10n.t("+ Create Connection Group");
public static selectConnectionGroup = l10n.t("Select a connection group");
public static searchConnectionGroups = l10n.t("Search connection groups");
public static errorLoadingAzureDatabases(subscriptionName: string, subscriptionId: string) {
return l10n.t({
message:
"Error loading Azure databases for subscription {0} ({1}). Confirm that you have permission.",
args: [subscriptionName, subscriptionId],
comment: ["{0} is the subscription name", "{1} is the subscription id"],
});
}
public static deleteTheSavedConnection = (connectionName: string) => {
return l10n.t({
message: "delete the saved connection: {0}?",
args: [connectionName],
comment: ["{0} is the connection name"],
});
};
public static multipleMatchingTokensError(accountDisplayName?: string, tenantId?: string) {
if (!accountDisplayName || !tenantId) {
return l10n.t(
"Authentication error for account. Resolving this requires clearing your token cache, which will sign you out of all connected accounts.",
);
}
return l10n.t({
message:
"Authentication error for account '{0}' (tenant '{1}'). Resolving this requires clearing your token cache, which will sign you out of all connected accounts.",
args: [accountDisplayName, tenantId],
comment: ["{0} is the account display name", "{1} is the tenant id"],
});
}
public static clearCacheAndRefreshToken = l10n.t("Clear cache and refresh token");
public static clearTokenCache = l10n.t("Clear token cache");
public static noWorkspacesFound = l10n.t(
"No workspaces found. Please change Fabric account or tenant to view available workspaces.",
);
public static unsupportedAuthType(authenticationType: string) {
return l10n.t({
message:
"Unsupported authentication type in connection string: {0}. Only SQL Login, Integrated, Azure MFA, and Active Directory Default authentication are supported.",
args: [authenticationType],
comment: ["{0} is the authentication type"],
});
}
}
export class FirewallRule {
public static addFirewallRule = l10n.t("Add Firewall Rule");
public static addFirewallRuleToServer = (serverName: string) => {
return l10n.t({
message: "Add Firewall Rule to {0}",
args: [serverName],
comment: ["{0} is the server name"],
});
};
}
export class Azure {
public static unableToAcquireEntraTokenFromVsCode(accountDisplayName: string): string {
return l10n.t({
message:
"Unable to acquire a Microsoft Entra token from VS Code for the selected account: {0}",
args: [accountDisplayName],
comment: ["{0} is the account label or ID"],
});
}
public static noSqlResourceConfiguredForCurrentCloud(cloudName: string): string {
return l10n.t({
message:
"No SQL resource is configured for the current cloud '{0}'. Please update your Azure account settings.",
args: [cloudName],
comment: ["{0} is the display name of the current cloud"],
});
}
public static errorSigningIntoAzure(errorMessage: string): string {
return l10n.t({
message: "Error signing into Azure: {0}",
args: [errorMessage],
comment: ["{0} is the error message"],
});
}
public static errorLoadingAzureAccountInfoForTenantId = (tenantId: string) => {
return l10n.t({
message: "Error loading Azure account information for tenant ID '{0}'",
args: [tenantId],
comment: ["{0} is the tenant ID"],
});
};
public static errorCreatingFirewallRule = (ruleInfo: string, error: string) => {
return l10n.t({
message:
"Error creating firewall rule {0}. Check your Azure account settings and try again. Error: {1}",
args: [ruleInfo, error],
comment: [
"{0} is the rule info in format 'name (startIp - endIp)'",
"{1} is the error message",
],
});
};
public static failedToGetTenantForAccount = (tenantId: string, accountName: string) => {
return l10n.t({
message: "Failed to get tenant '{0}' for account '{1}'.",
args: [tenantId, accountName],
comment: ["{0} is the tenant id", "{1} is the account name"],
});
};
public static PublicCloud = l10n.t("Azure (Public)");
public static USGovernmentCloud = l10n.t("Azure (US Government)");
public static ChinaCloud = l10n.t("Azure (China)");
public static customCloudNotConfigured = (missingSetting: string) => {
return l10n.t(
"The custom cloud choice is not configured. Please configure the setting `{0}`.",
missingSetting,
);
};
}
export class Fabric {
public static failedToGetWorkspacesForTenant = (
tenantName: string,
tenantId: string,
errorMessage?: string,
) => {
if (errorMessage) {
return l10n.t({
message: "Failed to get Fabric workspaces for tenant '{0} ({1})': {2}",
args: [tenantName, tenantId, errorMessage],