Skip to content

Commit f799d79

Browse files
Copilotedvilme
andcommitted
refactor: localize env file notification message using l10n.t()
Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode-python-environments/sessions/32215d3b-54dd-4074-a6f7-4906d013f21c
1 parent 39f7531 commit f799d79

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/common/localize.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ export namespace ActivationStrings {
216216
Commands.viewLogs,
217217
);
218218
export const activatingEnvironment = l10n.t('Activating environment');
219+
export const envFileInjectionDisabled = l10n.t(
220+
'An environment file is configured but terminal environment injection is disabled. Enable "python.terminal.useEnvFile" to use environment variables from .env files in terminals.',
221+
);
219222
}
220223

221224
export namespace UvInstallStrings {

src/features/terminal/terminalEnvVarInjector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
workspace,
1111
WorkspaceFolder,
1212
} from 'vscode';
13-
import { Common } from '../../common/localize';
13+
import { ActivationStrings, Common } from '../../common/localize';
1414
import { traceError, traceLog, traceVerbose } from '../../common/logging';
1515
import { getGlobalPersistentState } from '../../common/persistentState';
1616
import { resolveVariables } from '../../common/utils/internalVariables';
@@ -223,7 +223,7 @@ export class TerminalEnvVarInjector implements Disposable {
223223
}
224224

225225
const result = await showInformationMessage(
226-
'An environment file is configured but terminal environment injection is disabled. Enable "python.terminal.useEnvFile" to use environment variables from .env files in terminals.',
226+
ActivationStrings.envFileInjectionDisabled,
227227
Common.dontShowAgain,
228228
);
229229
if (result === Common.dontShowAgain) {

0 commit comments

Comments
 (0)