tools/emoji: support reading the annotationsDerived CLDR data

This commit is contained in:
Reece H. Dunn
2017-06-03 18:28:36 +01:00
parent ef25dae11a
commit 2c22e2cc16
+8 -3
View File
@@ -54,10 +54,15 @@ emoji_dict = sys.argv[1]
lang = sys.argv[2]
cldr_path = sys.argv[3]
filenames = [
os.path.join(cldr_path, "common", "annotations", "{0}.xml".format(lang)),
os.path.join(cldr_path, "common", "annotationsDerived", "{0}.xml".format(lang))
]
annotations = {}
filename = os.path.join(cldr_path, "common", "annotations", "{0}.xml".format(lang))
for cp, name in read_annotations(filename):
annotations[cp] = name
for filename in filenames:
for cp, name in read_annotations(filename):
annotations[cp] = name
for entry in read_emoji(emoji_dict):
if isinstance(entry, Emoji):