From 50346ba0cc0ae68d3093256dcf66fce6d4ec587f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 12 Jun 2021 20:51:44 +0200 Subject: Fix update-language-subtags to include all descriptions for a particular code. This avoids, e.g. "nl" being labelled as only Flemish and not also Dutch. --- scripts/update-language-subtags | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/update-language-subtags b/scripts/update-language-subtags index 874a6dc7..3ea53572 100755 --- a/scripts/update-language-subtags +++ b/scripts/update-language-subtags @@ -25,7 +25,12 @@ with urllib.request.urlopen('https://www.iana.org/assignments/language-subtag-re else: p = l.strip().decode('utf-8').split(':') if len(p) > 1: - block[p[0]] = p[1][1:] + key = p[0] + value = p[1][1:] + if key == 'Description' and key in block: + block[key] = '/'.join([block[key], value]) + else: + block[key] = value for k, v in lists.items(): with open(os.path.join('tags', k), 'w') as f: -- cgit v1.2.3