mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-20593 Consuming ignore_xml_deprecates option in BUILDRULES.py.
The option was added in b603285
, but the option was not being used.
This commit is contained in:
parent
b772241b52
commit
06114c5108
1 changed files with 11 additions and 9 deletions
|
@ -518,15 +518,17 @@ def generate_tree(
|
|||
|
||||
# Generate res_index file
|
||||
synthetic_locales = set()
|
||||
deprecates_xml_path = os.path.join(os.path.dirname(__file__), xml_filename)
|
||||
deprecates_xml = ET.parse(deprecates_xml_path)
|
||||
for child in deprecates_xml.getroot():
|
||||
if child.tag == "alias":
|
||||
synthetic_locales.add(child.attrib["from"])
|
||||
elif child.tag == "emptyLocale":
|
||||
synthetic_locales.add(child.attrib["locale"])
|
||||
else:
|
||||
raise ValueError("Unknown tag in deprecates XML: %s" % child.tag)
|
||||
if not config.ignore_xml_deprecates:
|
||||
deprecates_xml_path = os.path.join(
|
||||
os.path.dirname(__file__), xml_filename)
|
||||
deprecates_xml = ET.parse(deprecates_xml_path)
|
||||
for child in deprecates_xml.getroot():
|
||||
if child.tag == "alias":
|
||||
synthetic_locales.add(child.attrib["from"])
|
||||
elif child.tag == "emptyLocale":
|
||||
synthetic_locales.add(child.attrib["locale"])
|
||||
else:
|
||||
raise ValueError("Unknown tag in deprecates XML: %s" % child.tag)
|
||||
index_input_files = []
|
||||
for f in input_files:
|
||||
file_stem = f.filename[f.filename.rfind("/")+1:-4]
|
||||
|
|
Loading…
Add table
Reference in a new issue