Skip to content

Commit c9cffe4

Browse files
Copilotnturinski
andcommitted
Add localization and fix linting issues for app setting visibility toggle
Co-authored-by: nturinski <[email protected]>
1 parent ade4936 commit c9cffe4

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,13 @@
369369
},
370370
{
371371
"command": "azureFunctions.showAppSettingValue",
372-
"title": "Show App Setting Value",
372+
"title": "%azureFunctions.showAppSettingValue%",
373373
"category": "Azure Functions",
374374
"icon": "$(eye)"
375375
},
376376
{
377377
"command": "azureFunctions.hideAppSettingValue",
378-
"title": "Hide App Setting Value",
378+
"title": "%azureFunctions.hideAppSettingValue%",
379379
"category": "Azure Functions",
380380
"icon": "$(eye-closed)"
381381
},
@@ -916,6 +916,14 @@
916916
"command": "azureFunctions.toggleAppSettingVisibility",
917917
"when": "never"
918918
},
919+
{
920+
"command": "azureFunctions.showAppSettingValue",
921+
"when": "never"
922+
},
923+
{
924+
"command": "azureFunctions.hideAppSettingValue",
925+
"when": "never"
926+
},
919927
{
920928
"command": "azureFunctions.viewProperties",
921929
"when": "never"

package.nls.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
"azureFunctions.templateSource.staging": "Use the very latest templates from the staging template source.",
110110
"azureFunctions.templateVersion": "A runtime release version (any runtime) that species which templates will be used rather than the latest templates. This version will be used for ALL runtimes. (Requires a restart of VS Code to take effect)",
111111
"azureFunctions.toggleAppSettingVisibility": "Toggle App Setting Visibility.",
112+
"azureFunctions.showAppSettingValue": "Show App Setting Value",
113+
"azureFunctions.hideAppSettingValue": "Hide App Setting Value",
112114
"azureFunctions.uninstallFuncCoreTools": "Uninstall Azure Functions Core Tools",
113115
"azureFunctions.validateFuncCoreTools": "Validate the Azure Functions Core Tools is installed before debugging.",
114116
"azureFunctions.viewCommitInGitHub": "View Commit in GitHub",

src/commands/registerCommands.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ export function registerCommands(
175175
const originalContextValueGetter = Object.getOwnPropertyDescriptor(AppSettingTreeItem.prototype, 'contextValue')?.get;
176176
if (originalContextValueGetter) {
177177
Object.defineProperty(AppSettingTreeItem.prototype, 'contextValue', {
178-
get: function () {
179-
const originalValue = originalContextValueGetter.call(this);
180-
const isHidden = this.label.includes('Hidden value');
178+
get: function (this: AppSettingTreeItem) {
179+
const originalValue = originalContextValueGetter.call(this) as string;
180+
const isHidden = (this.label as string).includes('Hidden value');
181181
return isHidden ? `${originalValue};hidden` : `${originalValue};visible`;
182182
},
183183
configurable: true

0 commit comments

Comments
 (0)