|
342 | 342 | "type": "string",
|
343 | 343 | "description": "Root of the project files."
|
344 | 344 | },
|
| 345 | + "i18n": { |
| 346 | + "$ref": "#/definitions/project/definitions/i18n" |
| 347 | + }, |
345 | 348 | "sourceRoot": {
|
346 | 349 | "type": "string",
|
347 | 350 | "description": "The root of the source files, assets and index.html file structure."
|
|
398 | 401 | "^[a-z]{1,3}-.*": {}
|
399 | 402 | },
|
400 | 403 | "definitions": {
|
| 404 | + "i18n": { |
| 405 | + "description": "Project i18n options", |
| 406 | + "type": "object", |
| 407 | + "properties": { |
| 408 | + "sourceLocale": { |
| 409 | + "type": "string", |
| 410 | + "description": "Specifies the source language of the application.", |
| 411 | + "default": "en-US" |
| 412 | + }, |
| 413 | + "locales": { |
| 414 | + "type": "object", |
| 415 | + "additionalProperties": false, |
| 416 | + "patternProperties": { |
| 417 | + "^[a-z]{2}(-[a-zA-Z]{2,})?$": { |
| 418 | + "type": "string", |
| 419 | + "description": "Localization file to use for i18n" |
| 420 | + } |
| 421 | + } |
| 422 | + } |
| 423 | + }, |
| 424 | + "additionalProperties": false |
| 425 | + }, |
401 | 426 | "target": {
|
402 | 427 | "oneOf": [
|
403 | 428 | {
|
|
756 | 781 | "description": "Log progress to the console while building.",
|
757 | 782 | "default": true
|
758 | 783 | },
|
| 784 | + "localize": { |
| 785 | + "$ref": "#/definitions/buildersOptions/localize" |
| 786 | + }, |
| 787 | + "i18nMissingTranslation": { |
| 788 | + "$ref": "#/definitions/buildersOptions/missingTranslation" |
| 789 | + }, |
759 | 790 | "i18nFile": {
|
760 | 791 | "type": "string",
|
761 |
| - "description": "Localization file to use for i18n." |
| 792 | + "description": "Localization file to use for i18n.", |
| 793 | + "x-deprecated": "Deprecated since 9.0" |
762 | 794 | },
|
763 | 795 | "i18nFormat": {
|
764 | 796 | "type": "string",
|
765 |
| - "description": "Format of the localization file specified with --i18n-file." |
| 797 | + "description": "Format of the localization file specified with --i18n-file.", |
| 798 | + "x-deprecated": "Deprecated since 9.0" |
766 | 799 | },
|
767 | 800 | "i18nLocale": {
|
768 | 801 | "type": "string",
|
769 |
| - "description": "Locale to use for i18n." |
770 |
| - }, |
771 |
| - "i18nMissingTranslation": { |
772 |
| - "type": "string", |
773 |
| - "description": "How to handle missing translations for i18n." |
| 802 | + "description": "Locale to use for i18n.", |
| 803 | + "x-deprecated": "Deprecated since 9.0" |
774 | 804 | },
|
775 | 805 | "extractCss": {
|
776 | 806 | "type": "boolean",
|
|
1281 | 1311 | "type": "string",
|
1282 | 1312 | "description": "Target to extract from."
|
1283 | 1313 | },
|
| 1314 | + "format": { |
| 1315 | + "type": "string", |
| 1316 | + "description": "Output format for the generated file.", |
| 1317 | + "default": "xlf", |
| 1318 | + "enum": [ |
| 1319 | + "xmb", |
| 1320 | + "xlf", |
| 1321 | + "xlif", |
| 1322 | + "xliff", |
| 1323 | + "xlf2", |
| 1324 | + "xliff2" |
| 1325 | + ] |
| 1326 | + }, |
1284 | 1327 | "i18nFormat": {
|
1285 | 1328 | "type": "string",
|
1286 | 1329 | "description": "Output format for the generated file.",
|
1287 | 1330 | "default": "xlf",
|
| 1331 | + "x-deprecated": "Use 'format' option instead.", |
1288 | 1332 | "enum": [
|
1289 | 1333 | "xmb",
|
1290 | 1334 | "xlf",
|
|
1296 | 1340 | },
|
1297 | 1341 | "i18nLocale": {
|
1298 | 1342 | "type": "string",
|
1299 |
| - "description": "Specifies the source language of the application." |
| 1343 | + "description": "Specifies the source language of the application.", |
| 1344 | + "x-deprecated": "Use 'i18n' project level sub-option 'sourceLocale' instead." |
1300 | 1345 | },
|
1301 | 1346 | "progress": {
|
1302 | 1347 | "type": "boolean",
|
|
1761 | 1806 | "description": "Log progress to the console while building.",
|
1762 | 1807 | "default": true
|
1763 | 1808 | },
|
| 1809 | + "localize": { |
| 1810 | + "$ref": "#/definitions/buildersOptions/localize" |
| 1811 | + }, |
1764 | 1812 | "i18nFile": {
|
1765 | 1813 | "type": "string",
|
1766 |
| - "description": "Localization file to use for i18n." |
| 1814 | + "description": "Localization file to use for i18n.", |
| 1815 | + "x-deprecated": "Deprecated since 9.0" |
1767 | 1816 | },
|
1768 | 1817 | "i18nFormat": {
|
1769 | 1818 | "type": "string",
|
1770 |
| - "description": "Format of the localization file specified with --i18n-file." |
| 1819 | + "description": "Format of the localization file specified with --i18n-file.", |
| 1820 | + "x-deprecated": "Deprecated since 9.0" |
1771 | 1821 | },
|
1772 | 1822 | "i18nLocale": {
|
1773 | 1823 | "type": "string",
|
1774 |
| - "description": "Locale to use for i18n." |
| 1824 | + "description": "Locale to use for i18n.", |
| 1825 | + "x-deprecated": "Deprecated since 9.0" |
1775 | 1826 | },
|
1776 | 1827 | "i18nMissingTranslation": {
|
1777 |
| - "type": "string", |
1778 |
| - "description": "How to handle missing translations for i18n." |
| 1828 | + "$ref": "#/definitions/buildersOptions/missingTranslation" |
1779 | 1829 | },
|
1780 | 1830 | "outputHashing": {
|
1781 | 1831 | "type": "string",
|
|
1965 | 2015 | "additionalProperties": false
|
1966 | 2016 | }
|
1967 | 2017 | }
|
| 2018 | + }, |
| 2019 | + "buildersOptions": { |
| 2020 | + "missingTranslation": { |
| 2021 | + "type": "string", |
| 2022 | + "description": "How to handle missing translations for i18n.", |
| 2023 | + "enum": ["warning", "error", "ignore"], |
| 2024 | + "default": "warning" |
| 2025 | + }, |
| 2026 | + "localize": { |
| 2027 | + "oneOf": [ |
| 2028 | + { |
| 2029 | + "type": "boolean", |
| 2030 | + "description": "Translate all locales." |
| 2031 | + }, |
| 2032 | + { |
| 2033 | + "type": "array", |
| 2034 | + "description": "List of locales ID's to translate.", |
| 2035 | + "minItems": 1, |
| 2036 | + "items": { |
| 2037 | + "type": "string", |
| 2038 | + "pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$" |
| 2039 | + } |
| 2040 | + } |
| 2041 | + ] |
| 2042 | + } |
1968 | 2043 | }
|
1969 | 2044 | }
|
1970 | 2045 | }
|
0 commit comments