-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all: Switch to l10n
API
#1399
all: Switch to l10n
API
#1399
Conversation
l10n
APIl10n
API
@@ -31,12 +30,13 @@ export async function swapSlot(context: IActionContext, sourceSlot: ParsedSite, | |||
} | |||
} | |||
|
|||
const placeHolder: string = localize('selectSlotToSwap', 'Select which slot to swap with "{0}".', sourceSlot.slotName); | |||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | |||
const placeHolder: string = l10n.t('Select which slot to swap with "{0}".', sourceSlot.slotName!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I'd say we should probably use nonNullValue(), but throwing an error because of a string error seems excessive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's also partly because the Swagger definitions for these APIs suggest that some things can be optional, that never actually can be optional. The !
"operator" seems fitting in that scenario.
Closes #1359.
We'll also need to cascade up the
utils
andazure
packages to fully get rid ofvscode-nls
.