Skip to content

Commit 734ef2c

Browse files
author
Craig Cornelius
authored
Remove root locale from tests for locale names and plural rules (#341)
1 parent f1094c3 commit 734ef2c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

testgen/generators/localeDisplayNames.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ def generateLanguageNameTestDataObjects(self, rawtestdata):
9999
)
100100
continue
101101
else:
102+
# Ignore the root locale
103+
if locale_label == 'root':
104+
logging.info('root locale ignored for %s, %s, %s',
105+
test_data[0], locale_label, language_display)
106+
continue
102107
label = str(count).rjust(max_digits, "0")
103108
test_json = {
104109
"label": label,

testgen/generators/plurals.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ def process_xml_file(self, filename, num_type):
135135
# Parse this text to get samples
136136
for locale in tags:
137137
for sample in samples:
138+
# Ignore "root" locale.
139+
if locale == 'root':
140+
logging.info('Plural rules: root locale ignored for %s, %s, %s',
141+
locale, num_type, sample)
142+
continue
138143
test = {
139144
'locale': locale,
140145
'label': str(self.label_num),

0 commit comments

Comments
 (0)