@theia/plugin 1.37.0-next.16 → 1.37.0-next.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/theia.d.ts +76 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.37.0-next.
|
|
3
|
+
"version": "1.37.0-next.18+a9471e7af",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "a9471e7af5168f59b57bd398d715743a6c72f6ff"
|
|
36
36
|
}
|
package/src/theia.d.ts
CHANGED
|
@@ -13712,6 +13712,82 @@ export module '@theia/plugin' {
|
|
|
13712
13712
|
export function registerAuthenticationProvider(id: string, label: string, provider: AuthenticationProvider, options?: AuthenticationProviderOptions): Disposable;
|
|
13713
13713
|
}
|
|
13714
13714
|
|
|
13715
|
+
/**
|
|
13716
|
+
* Namespace for localization-related functionality in the extension API. To use this properly,
|
|
13717
|
+
* you must have `l10n` defined in your extension manifest and have bundle.l10n.<language>.json files.
|
|
13718
|
+
* For more information on how to generate bundle.l10n.<language>.json files, check out the
|
|
13719
|
+
* [vscode-l10n repo](https://github.com/microsoft/vscode-l10n).
|
|
13720
|
+
*
|
|
13721
|
+
* Note: Built-in extensions (for example, Git, TypeScript Language Features, GitHub Authentication)
|
|
13722
|
+
* are excluded from the `l10n` property requirement. In other words, they do not need to specify
|
|
13723
|
+
* a `l10n` in the extension manifest because their translated strings come from Language Packs.
|
|
13724
|
+
*/
|
|
13725
|
+
export namespace l10n {
|
|
13726
|
+
/**
|
|
13727
|
+
* Marks a string for localization. If a localized bundle is available for the language specified by
|
|
13728
|
+
* {@link env.language} and the bundle has a localized value for this message, then that localized
|
|
13729
|
+
* value will be returned (with injected {@link args} values for any templated values).
|
|
13730
|
+
* @param message - The message to localize. Supports index templating where strings like `{0}` and `{1}` are
|
|
13731
|
+
* replaced by the item at that index in the {@link args} array.
|
|
13732
|
+
* @param args - The arguments to be used in the localized string. The index of the argument is used to
|
|
13733
|
+
* match the template placeholder in the localized string.
|
|
13734
|
+
* @returns localized string with injected arguments.
|
|
13735
|
+
* @example `l10n.t('Hello {0}!', 'World');`
|
|
13736
|
+
*/
|
|
13737
|
+
export function t(message: string, ...args: Array<string | number | boolean>): string;
|
|
13738
|
+
|
|
13739
|
+
/**
|
|
13740
|
+
* Marks a string for localization. If a localized bundle is available for the language specified by
|
|
13741
|
+
* {@link env.language} and the bundle has a localized value for this message, then that localized
|
|
13742
|
+
* value will be returned (with injected {@link args} values for any templated values).
|
|
13743
|
+
* @param message The message to localize. Supports named templating where strings like `{foo}` and `{bar}` are
|
|
13744
|
+
* replaced by the value in the Record for that key (foo, bar, etc).
|
|
13745
|
+
* @param args The arguments to be used in the localized string. The name of the key in the record is used to
|
|
13746
|
+
* match the template placeholder in the localized string.
|
|
13747
|
+
* @returns localized string with injected arguments.
|
|
13748
|
+
* @example `l10n.t('Hello {name}', { name: 'Erich' });`
|
|
13749
|
+
*/
|
|
13750
|
+
export function t(message: string, args: Record<string, any>): string;
|
|
13751
|
+
/**
|
|
13752
|
+
* Marks a string for localization. If a localized bundle is available for the language specified by
|
|
13753
|
+
* {@link env.language} and the bundle has a localized value for this message, then that localized
|
|
13754
|
+
* value will be returned (with injected args values for any templated values).
|
|
13755
|
+
* @param options The options to use when localizing the message.
|
|
13756
|
+
* @returns localized string with injected arguments.
|
|
13757
|
+
*/
|
|
13758
|
+
export function t(options: {
|
|
13759
|
+
/**
|
|
13760
|
+
* The message to localize. If {@link args} is an array, this message supports index templating where strings like
|
|
13761
|
+
* `{0}` and `{1}` are replaced by the item at that index in the {@link args} array. If `args` is a `Record<string, any>`,
|
|
13762
|
+
* this supports named templating where strings like `{foo}` and `{bar}` are replaced by the value in
|
|
13763
|
+
* the Record for that key (foo, bar, etc).
|
|
13764
|
+
*/
|
|
13765
|
+
message: string;
|
|
13766
|
+
/**
|
|
13767
|
+
* The arguments to be used in the localized string. As an array, the index of the argument is used to
|
|
13768
|
+
* match the template placeholder in the localized string. As a Record, the key is used to match the template
|
|
13769
|
+
* placeholder in the localized string.
|
|
13770
|
+
*/
|
|
13771
|
+
args?: Array<string | number | boolean> | Record<string, any>;
|
|
13772
|
+
/**
|
|
13773
|
+
* A comment to help translators understand the context of the message.
|
|
13774
|
+
*/
|
|
13775
|
+
comment: string | string[];
|
|
13776
|
+
}): string;
|
|
13777
|
+
/**
|
|
13778
|
+
* The bundle of localized strings that have been loaded for the extension.
|
|
13779
|
+
* It's undefined if no bundle has been loaded. The bundle is typically not loaded if
|
|
13780
|
+
* there was no bundle found or when we are running with the default language.
|
|
13781
|
+
*/
|
|
13782
|
+
export const bundle: { [key: string]: string } | undefined;
|
|
13783
|
+
/**
|
|
13784
|
+
* The URI of the localization bundle that has been loaded for the extension.
|
|
13785
|
+
* It's undefined if no bundle has been loaded. The bundle is typically not loaded if
|
|
13786
|
+
* there was no bundle found or when we are running with the default language.
|
|
13787
|
+
*/
|
|
13788
|
+
export const uri: Uri | undefined;
|
|
13789
|
+
}
|
|
13790
|
+
|
|
13715
13791
|
/**
|
|
13716
13792
|
* The tab represents a single text based resource.
|
|
13717
13793
|
*/
|