vscode-nls

  • Version 5.2.0
  • Published
  • 85.3 kB
  • No dependencies
  • MIT license

Install

npm i vscode-nls
yarn add vscode-nls
pnpm add vscode-nls

Overview

NPM module to externalize and localize VSCode extensions

Index

Variables

variable isPseudo

let isPseudo: boolean;

    Functions

    function config

    config: (opts?: Options) => LoadFunc;

      function format

      format: (message: string, args: any[]) => string;

        function isDefined

        isDefined: (value: any) => boolean;

          function loadMessageBundle

          loadMessageBundle: (file?: string) => LocalizeFunc;

            function localize

            localize: (
            _key: string | LocalizeInfo,
            message: string,
            ...args: any[]
            ) => string;

              function setPseudo

              setPseudo: (pseudo: boolean) => void;

                Interfaces

                interface I18nBundle

                interface I18nBundle {}

                  property contents

                  contents: {
                  [module: string]: {
                  [messageKey: string]: string;
                  };
                  };

                    property version

                    version: string;

                      interface LanguageBundle

                      interface LanguageBundle {}

                        property header

                        header: MetadataHeader;

                          property nlsBundle

                          nlsBundle: NlsBundle;

                            interface LoadFunc

                            interface LoadFunc {}

                              call signature

                              (file?: string): LocalizeFunc;

                                interface LocalizeFunc

                                interface LocalizeFunc {}

                                  call signature

                                  (
                                  info: LocalizeInfo,
                                  message: string,
                                  ...args: (string | number | boolean | undefined | null)[]
                                  ): string;

                                    call signature

                                    (
                                    key: string,
                                    message: string,
                                    ...args: (string | number | boolean | undefined | null)[]
                                    ): string;

                                      interface LocalizeInfo

                                      interface LocalizeInfo {}

                                        property comment

                                        comment: string[];

                                          property key

                                          key: string;

                                            interface MetaDataEntry

                                            interface MetaDataEntry {}

                                              property keys

                                              keys: KeyInfo[];

                                                property messages

                                                messages: string[];

                                                  interface MetaDataFile

                                                  interface MetaDataFile {}

                                                    index signature

                                                    [key: string]: MetaDataEntry;

                                                      interface MetadataHeader

                                                      interface MetadataHeader {}

                                                        property hash

                                                        hash: string;

                                                          property id

                                                          id: string;

                                                            property outDir

                                                            outDir: string;

                                                              property type

                                                              type: string;

                                                                interface NlsBundle

                                                                interface NlsBundle {}

                                                                  index signature

                                                                  [key: string]: string[];

                                                                    interface Options

                                                                    interface Options {}

                                                                      property bundleFormat

                                                                      bundleFormat?: BundleFormat;

                                                                        property cacheLanguageResolution

                                                                        cacheLanguageResolution?: boolean;

                                                                          property locale

                                                                          locale?: string;

                                                                            property messageFormat

                                                                            messageFormat?: MessageFormat;

                                                                              interface TranslationConfig

                                                                              interface TranslationConfig {}

                                                                                index signature

                                                                                [extension: string]: string;

                                                                                  Enums

                                                                                  enum BundleFormat

                                                                                  enum BundleFormat {
                                                                                  standalone = 'standalone',
                                                                                  languagePack = 'languagePack',
                                                                                  }

                                                                                    member languagePack

                                                                                    languagePack = 'languagePack'

                                                                                      member standalone

                                                                                      standalone = 'standalone'

                                                                                        enum MessageFormat

                                                                                        enum MessageFormat {
                                                                                        file = 'file',
                                                                                        bundle = 'bundle',
                                                                                        both = 'both',
                                                                                        }

                                                                                          member both

                                                                                          both = 'both'

                                                                                            member bundle

                                                                                            bundle = 'bundle'

                                                                                              member file

                                                                                              file = 'file'

                                                                                                Type Aliases

                                                                                                type KeyInfo

                                                                                                type KeyInfo = string | LocalizeInfo;

                                                                                                  type SingleFileJsonFormat

                                                                                                  type SingleFileJsonFormat =
                                                                                                  | string[]
                                                                                                  | {
                                                                                                  messages: string[];
                                                                                                  keys: string[];
                                                                                                  };

                                                                                                    Package Files (1)

                                                                                                    Dependencies (0)

                                                                                                    No dependencies.

                                                                                                    Dev Dependencies (7)

                                                                                                    Peer Dependencies (0)

                                                                                                    No peer dependencies.

                                                                                                    Badge

                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/vscode-nls.

                                                                                                    • Markdown
                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/vscode-nls)
                                                                                                    • HTML
                                                                                                      <a href="https://www.jsdocs.io/package/vscode-nls"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>