Skip to content

Commit

Permalink
fix(@angular/cli): expand locale pattern in workspace schema
Browse files Browse the repository at this point in the history
Fixes: #16935
(cherry picked from commit 7b54164)
  • Loading branch information
clydin authored and dgp1130 committed Feb 11, 2020
1 parent 267c103 commit ae58a65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/angular/cli/lib/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@
"type": "string",
"description": "Specifies the source locale of the application.",
"default": "en-US",
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
"$comment": "IETF BCP 47 language tag (simplified)",
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
},
{
"type": "object",
Expand All @@ -390,7 +391,7 @@
"code": {
"type": "string",
"description": "Specifies the locale code of the source locale",
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
},
"baseHref": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"type": "string",
"description": "Specifies the source locale of the application.",
"default": "en-US",
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
},
{
"type": "object",
Expand All @@ -145,7 +145,7 @@
"code": {
"type": "string",
"description": "Specifies the locale code of the source locale",
"pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$"
"pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?$"
},
"baseHref": {
"type": "string",
Expand Down

0 comments on commit ae58a65

Please sign in to comment.