Skip to content

Commit

Permalink
translation clarifications #98576
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed May 26, 2020
1 parent d52ca79 commit 9a2062f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/debugHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class DebugHoverAccessibilityProvider implements IListAccessibilityProvider<IExp
}

getAriaLabel(element: IExpression): string {
return nls.localize('variableAriaLabel', "{0}, value {1}, variables, debug", element.name, element.value);
return nls.localize({ key: 'variableAriaLabel', comment: ['Do not translate placholders. Placeholders are name and value of a variable.'] }, "{0}, value {1}, variables, debug", element.name, element.value);
}
}

Expand Down
9 changes: 7 additions & 2 deletions src/vs/workbench/contrib/debug/browser/debugQuickAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,18 @@ export class StartDebugQuickAccessProvider extends PickerQuickAccessProvider<IPi
// Entries detected configurations
const dynamicProviders = await configManager.getDynamicProviders();
if (dynamicProviders.length > 0) {
picks.push({ type: 'separator', label: localize('contributed', "contributed") });
picks.push({
type: 'separator', label: localize({
key: 'contributed',
comment: ['contributed is lower case because it looks better like that in UI. Nothing preceeds it. It is a name of the grouping of debug configurations.']
}, "contributed")
});
}

dynamicProviders.forEach(provider => {
picks.push({
label: `$(folder) ${provider.label}...`,
ariaLabel: localize('providerAriaLabel', "{0} contributed configurations", provider.label),
ariaLabel: localize({ key: 'providerAriaLabel', comment: ['Placeholder stands for the provider label. For example "NodeJS".'] }, "{0} contributed configurations", provider.label),
accept: async () => {
const pick = await provider.pick();
if (pick) {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/variablesView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class VariablesAccessibilityProvider implements IListAccessibilityProvider<IExpr
return nls.localize('variableScopeAriaLabel', "Scope {0}", element.name);
}
if (element instanceof Variable) {
return nls.localize('variableAriaLabel', "{0}, value {1}", element.name, element.value);
return nls.localize({ key: 'variableAriaLabel', comment: ['Placeholders are variable name and variable value respectivly. They should not be translated.'] }, "{0}, value {1}", element.name, element.value);
}

return null;
Expand Down

0 comments on commit 9a2062f

Please sign in to comment.