Skip to content

Commit 250f0c9

Browse files
committed
fix(@angular/cli): expand locale pattern in workspace schema
Fixes: #16935
1 parent e5061ef commit 250f0c9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/angular/cli/lib/config/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@
387387
"type": "string",
388388
"description": "Specifies the source locale of the application.",
389389
"default": "en-US",
390-
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
390+
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
391391
},
392392
{
393393
"type": "object",
@@ -396,7 +396,7 @@
396396
"code": {
397397
"type": "string",
398398
"description": "Specifies the locale code of the source locale",
399-
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
399+
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
400400
},
401401
"baseHref": {
402402
"type": "string",

packages/angular_devkit/core/src/experimental/workspace/workspace-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"type": "string",
137137
"description": "Specifies the source locale of the application.",
138138
"default": "en-US",
139-
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
139+
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
140140
},
141141
{
142142
"type": "object",
@@ -145,7 +145,7 @@
145145
"code": {
146146
"type": "string",
147147
"description": "Specifies the locale code of the source locale",
148-
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
148+
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
149149
},
150150
"baseHref": {
151151
"type": "string",

0 commit comments

Comments
 (0)