Skip to content

Commit 5f4a284

Browse files
committed
localize errors in snowflake config
1 parent ffdb5ac commit 5f4a284

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { inject, injectable } from 'inversify';
2-
import { CancellationToken, Event, EventEmitter, NotebookDocument, workspace } from 'vscode';
2+
import { CancellationToken, Event, EventEmitter, l10n, NotebookDocument, workspace } from 'vscode';
33

44
import { IDisposableRegistry, Resource } from '../../common/types';
55
import { EnvironmentVariables } from '../../common/variables/types';
@@ -99,7 +99,10 @@ function convertIntegrationConfigToJson(config: IntegrationConfig): string {
9999
if (config.authMethod !== SnowflakeAuthMethods.SERVICE_ACCOUNT_KEY_PAIR) {
100100
// This should never happen due to the type guard above, but TypeScript needs this
101101
throw new UnsupportedIntegrationError(
102-
`Snowflake integration with auth method '${config.authMethod}' is not supported in VSCode`
102+
l10n.t(
103+
"Snowflake integration with auth method '{0}' is not supported in VSCode",
104+
config.authMethod
105+
)
103106
);
104107
}
105108

@@ -138,7 +141,7 @@ function convertIntegrationConfigToJson(config: IntegrationConfig): string {
138141

139142
default:
140143
throw new UnsupportedIntegrationError(
141-
`Unsupported integration type: ${(config as IntegrationConfig).type}`
144+
l10n.t('Unsupported integration type: {0}', (config as IntegrationConfig).type)
142145
);
143146
}
144147
}

0 commit comments

Comments
 (0)