UNPKG

ng-extract-i18n-merge

Version:

Extract and merge i18n xliff translation files for angular projects.

147 lines (146 loc) 5.72 kB
{ "$schema": "http://json-schema.org/schema", "title": "Translation extraction and merge for Angular.", "description": "Extraction and merge options", "type": "object", "properties": { "format": { "enum": [ "xlf", "xlif", "xliff", "xlf2", "xliff2" ], "description": "Format for translation files. If unset default config from extract-i18n target is used." }, "outputPath": { "type": "string", "description": "The file path where translation files are placed. If unset default config from extract-i18n target is used." }, "sourceFile": { "type": "string", "description": "Translation source file. Path is assumed to be relative to 'outputPath'.", "default": "messages.xlf" }, "targetFiles": { "type": "array", "items": { "type": "string" }, "description": "Translation files for each target language. Paths are assumed to be relative to 'outputPath'." }, "sourceLanguageTargetFile": { "type": "string", "description": "If this is set (to one of the `targetFiles`), new translations in that target file will be set to `state=\"final\"` (instead of default `state=\"new\"`)." }, "removeIdsWithPrefix": { "type": "array", "items": { "type": "string" }, "description": "Remove translation units where the ID matches any of the given prefixes." }, "includeIdsWithPrefix": { "type": "array", "items": { "type": "string" }, "description": "Include only translation units where the ID starts with given prefixes." }, "fuzzyMatch": { "type": "boolean", "default": true, "description": "Whether translation units without matching IDs are fuzzy matched by source text." }, "resetTranslationState": { "type": "boolean", "default": true, "description": "Reset the translation state to new/initial for new/changed units." }, "newTranslationTargetsBlank": { "anyOf": [ { "type": "boolean" }, { "enum": [ "omit" ] } ], "default": false, "description": "Set target for new translation units to empty string (instead of original source). 'omit' will omit the target element for new units." }, "sort": { "enum": [ "idAsc", "stableAppendNew", "stableAlphabetNew" ], "default": "stableAlphabetNew", "description": "Sorting of all translation units in source and target translation files." }, "prettyNestedTags": { "type": "boolean", "default": false, "description": "If source/target only contains xml nodes (interpolations, nested html), `true` formats these with line breaks and indentation. `false` keeps the original angular single line format. Note: while `true` was the historic implementation, it is _not_ recommended, as it adds whitespace between tags that had no whitespace in between and increases bundle sizes." }, "selfClosingEmptyTargets": { "type": "boolean", "default": true, "description": "If `false` empty target nodes are non self-closing." }, "sortNestedTagAttributes": { "type": "boolean", "default": false, "description": "Attributes of xml nodes (interpolations, nested html) in source/target/meaning/description can be sorted for normalization." }, "collapseWhitespace": { "type": "boolean", "default": true, "description": "Collapsing of multiple whitespaces/line breaks in translation sources and targets. This handles changed leading/trailing whitespaces intelligently - i.e. updates the target accordingly _without_ resetting the translation state when only leading/trailing whitespace was changed." }, "trim": { "type": "boolean", "default": false, "description": "Trim translation sources and targets." }, "includeContext": { "anyOf": [ { "type": "boolean" }, { "enum": [ "sourceFileOnly" ] } ], "default": false, "description": "Whether to include the context information (like notes) in the translation files. This is useful for sending the target translation files to translation agencies/services. When `sourceFileOnly` the context is retained only in the `sourceFile`." }, "includeMeaningAndDescription": { "type": "boolean", "default": true, "description": "Whether to include the meaning and description information in the translation files." }, "buildTarget": { "type": "string", "description": "A build builder target use for rendering the app shell in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.", "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" }, "builderI18n": { "type": "string", "default": "@angular/build:extract-i18n", "description": "The builder to use for i18n extraction. Any custom builder should handle the same options as the default builder (buildTarget, outputPath, outFile, format, progress)." }, "verbose": { "type": "boolean", "default": false, "description": "Whether to log extended output to the console." } }, "additionalProperties": false, "required": ["buildTarget", "targetFiles"] }