From 7dc92154af01c6772b1a773e1e9fcb706b863de0 Mon Sep 17 00:00:00 2001
From: Rick Waldron <waldron.rick@gmail.com>
Date: Tue, 19 Jun 2018 14:56:30 -0400
Subject: [PATCH] Frontmatter: Adds top level "locale" attribute. Fixes gh-1515
 (#1561)

---
 INTERPRETING.md                      | 24 ++++++++++++++++++++++++
 tools/lint/lib/checks/frontmatter.py |  2 +-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/INTERPRETING.md b/INTERPRETING.md
index d2a5113ae9..4cb7e0cfa6 100644
--- a/INTERPRETING.md
+++ b/INTERPRETING.md
@@ -353,3 +353,27 @@ following strings:
 - **`generated`** The test file was created procedurally using the project's
   test generation tool. This flag is specified for informational purposes only
   and has no bearing on how the test should be interpreted.
+
+### `locale`
+
+The `locale` attribute allows tests to declare explicit information regarding locale specificity. Its value is an array of one or more valid language tags or subtags.
+
+  *Example*
+
+  ```js
+  /*---
+  locale: [en, en-US, ar]
+  ---*/
+  
+  var en = new Intl.PluralRules('en');
+  assert.sameValue(en.select(1), 'one', 'en.select(1) returns "one"');
+  assert.sameValue(en.select(2), 'other', 'en.select(2) returns "other"');  
+
+  var enUS = new Intl.PluralRules('en-US');
+  assert.sameValue(enUS.select(1), 'one', 'enUS.select(1) returns "one"');
+  assert.sameValue(enUS.select(2), 'other', 'enUS.select(2) returns "other"');
+
+  var ar = new Intl.PluralRules('ar');
+  assert.sameValue(ar.select(1), 'one', 'ar.select(1) returns "one"');
+  assert.sameValue(ar.select(2), 'other', 'ar.select(2) returns "two"');
+  ```
diff --git a/tools/lint/lib/checks/frontmatter.py b/tools/lint/lib/checks/frontmatter.py
index b62f419350..4f0a5bff31 100644
--- a/tools/lint/lib/checks/frontmatter.py
+++ b/tools/lint/lib/checks/frontmatter.py
@@ -3,7 +3,7 @@ from ..check import Check
 _REQUIRED_FIELDS = set(['description'])
 _OPTIONAL_FIELDS = set([
     'author', 'es5id', 'es6id', 'esid', 'features', 'flags', 'includes',
-    'info', 'negative', 'timeout'
+    'info', 'locale', 'negative', 'timeout'
 ])
 _VALID_FIELDS = _REQUIRED_FIELDS | _OPTIONAL_FIELDS
 
-- 
GitLab