-
Notifications
You must be signed in to change notification settings - Fork 118
Developer Reference
Use this page for cross-cutting development references that do not fit setup, contribution policy, or test execution workflows.
- Localization (v2)
- Localization (v3 and next)
- Logging
- Keybinding reference chart
- Related developer references
All localized strings must be string literals. Avoid variables and template literals in the localization call argument.
- Create a key name for the string.
- Localize either
package.jsonvalues or TypeScript code.
For package.json strings:
- Replace literal text with
%key%, for example"This is a string"becomes"%exampleProperty.exDescription%". - Add the key/value to
package.nls.json.
For TypeScript strings:
- Ensure
vscode-nlsis imported:
import * as nls from "vscode-nls";- Set up localization:
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();- Wrap strings with
localize("key", "string").
After adding/updating/removing strings, run:
yarn workspace vscode-extension-for-zowe packageThis updates sample files in i18n.
- In root
i18n, duplicatesampleand rename to an ISO-639-3 language code. - Download translated
.jsonfiles from Zanata and replace files in your new language folder. - Update
gulpfile.jslanguagesarray with{ folderName: '<ISO-639-3-Code>', id: '<vscode-locale-id>' }. - Install the target VS Code language pack and package again to validate output.
- Sign up at Zanata.
- Email maintainers with subject
ZANATA TRANSLATOR REQUESTand include:- Zanata username
- Language(s)
- Affiliation with Zowe
- See Zanata translator guide for details.
Localized strings can use placeholders like {0}, {1} with values supplied at call time.
- Navigate to
packages/zowe-explorer/l10n. - Create
package.nls.<my-language>.json. - Add translated content based on
package.nls.json.
For more information, see the vscode-l10n documentation.
- Create a key for your string.
- Update
package.jsonand/or TypeScript as needed.
For package.json strings, use %key% and update package.nls.json.
In TypeScript, one localization approach is:
vscode.l10n.t({
message: "My {0} localized string",
args: ["First"],
comments: ["The amount of times a string was localized"]
});After adding/updating/removing strings, run:
pnpm --filter vscode-extension-for-zowe vscode:prepublishThis updates sample files under l10n.
Use the same Zanata process described in the v2 section.
Use this chart when assessing new keybinding choices across platforms and common tools:
Logging is essential for troubleshooting and debugging. Use ZoweLogger to write logs to both the Zowe Explorer log file and the VS Code output channel (Zowe Explorer) in one call.
-
ZoweLogger.trace: Fine-grained application behavior details. -
ZoweLogger.debug: Diagnostic information for troubleshooting. -
ZoweLogger.info: Routine application operation messages. -
ZoweLogger.warn: Potentially harmful occurrence messages. -
ZoweLogger.error: Serious problem occurrence messages. -
ZoweLogger.fatal: Catastrophic error event messages.
The extension log level setting is zowe.logger and defaults to INFO. To read this setting in code, use ZoweLogger.getLogSetting().
zowe/vscode-extension-for-zowe
Welcome
Using Zowe Explorer
Roadmaps
- 2025 Zowe Explorer Roadmap
- 2024 Zowe Explorer Roadmap
- 2023 Zowe Explorer Roadmap
- 2022 Zowe Explorer Roadmap
Development Process
- Contributor Guidance
- Developer Setup
- Developer Reference
- Developing for Theia
- File Save Flow
- Menu Commands
Testing Process
Release Process
Backlog Grooming Process
How to Extend Zowe Explorer
- Extending Zowe Explorer
- Using Zowe Explorer Local Storage
- Error Handling for Extenders
- Secure Credentials for Extenders
- Sample Extender Repositories
Conformance Criteria
v3 Features and Information