Documentation

    Class JsonSchemaExtractor

    Extracts strings from JSON files using the I18n schema.

    Index

    Constructors

    Properties

    blockJsonFallback: __module = blocki18n
    blockJsonSource: string = "http://develop.svn.wordpress.org/trunk/src/wp-includes/block-i18n.json"

    Block

    themeJsonFallback: __module = themei18n
    themeJsonSource: string = "http://develop.svn.wordpress.org/trunk/src/wp-includes/theme-i18n.json"

    Theme

    Methods

    • Parses a string and extracts translations using the specified schema.

      Parameters

      • text: string

        the input string to be parsed

      • options: { schema?: string; schemaFallback?: I18nSchema }

        the options for parsing the input string

      Returns Promise<undefined | I18nSchema>

      a promise that resolves with the extracted schema

    MMNEPVFCICPMFPCPTTAAATR