Skip to content

Commit

Permalink
Remove root locale from tests for locale names and plural rules (unic…
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-oly authored Nov 12, 2024
1 parent f1094c3 commit 734ef2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testgen/generators/localeDisplayNames.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ def generateLanguageNameTestDataObjects(self, rawtestdata):
)
continue
else:
# Ignore the root locale
if locale_label == 'root':
logging.info('root locale ignored for %s, %s, %s',
test_data[0], locale_label, language_display)
continue
label = str(count).rjust(max_digits, "0")
test_json = {
"label": label,
Expand Down
5 changes: 5 additions & 0 deletions testgen/generators/plurals.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ def process_xml_file(self, filename, num_type):
# Parse this text to get samples
for locale in tags:
for sample in samples:
# Ignore "root" locale.
if locale == 'root':
logging.info('Plural rules: root locale ignored for %s, %s, %s',
locale, num_type, sample)
continue
test = {
'locale': locale,
'label': str(self.label_num),
Expand Down

0 comments on commit 734ef2c

Please sign in to comment.