From 2c22e2cc161d843c696894357684ac8c7edfa471 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sat, 3 Jun 2017 18:28:36 +0100 Subject: [PATCH] tools/emoji: support reading the annotationsDerived CLDR data --- tools/emoji | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/emoji b/tools/emoji index 6f2d4395..54a512bb 100755 --- a/tools/emoji +++ b/tools/emoji @@ -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):