Fix two-way mapping of "man" and 'MNK '
This commit is contained in:
parent
ab38cf6746
commit
1d53268dfe
|
@ -1103,8 +1103,8 @@ def verify_disambiguation_dict ():
|
|||
'%s is not a valid disambiguation for %s' % (disambiguation[ot_tag], ot_tag))
|
||||
elif ot_tag not in disambiguation:
|
||||
disambiguation[ot_tag] = macrolanguages[0]
|
||||
different_primary_tags = sorted (t for t in primary_tags if not same_tag (t, ot.from_bcp_47.get (t)))
|
||||
if different_primary_tags and disambiguation[ot_tag] == different_primary_tags[0] and '-' not in disambiguation[ot_tag]:
|
||||
different_bcp_47_tags = sorted (t for t in bcp_47_tags if not same_tag (t, ot.from_bcp_47.get (t)))
|
||||
if different_bcp_47_tags and disambiguation[ot_tag] == different_bcp_47_tags[0] and '-' not in disambiguation[ot_tag]:
|
||||
del disambiguation[ot_tag]
|
||||
for ot_tag in disambiguation.keys ():
|
||||
expect (ot_tag in ot.to_bcp_47, 'unknown OT tag: %s' % ot_tag)
|
||||
|
|
|
@ -2125,6 +2125,8 @@ hb_ot_ambiguous_tag_to_language (hb_tag_t tag)
|
|||
return hb_language_from_string ("ms", -1); /* Malay [macrolanguage] */
|
||||
case HB_TAG('M','N','G',' '): /* Mongolian */
|
||||
return hb_language_from_string ("mn", -1); /* Mongolian [macrolanguage] */
|
||||
case HB_TAG('M','N','K',' '): /* Maninka */
|
||||
return hb_language_from_string ("man", -1); /* Mandingo [macrolanguage] */
|
||||
case HB_TAG('M','O','L',' '): /* Moldavian */
|
||||
return hb_language_from_string ("ro-MD", -1); /* Romanian; Moldova */
|
||||
case HB_TAG('N','E','P',' '): /* Nepali */
|
||||
|
|
|
@ -335,6 +335,8 @@ test_ot_tag_language (void)
|
|||
test_language_two_way ("FAR", "fa");
|
||||
test_tag_from_language ("FAR", "fa_IR");
|
||||
|
||||
test_language_two_way ("MNK", "man"); /* Mandingo [macrolanguage] */
|
||||
|
||||
test_language_two_way ("SWA", "aii"); /* Swadaya Aramaic */
|
||||
|
||||
test_language_two_way ("SYR", "syr"); /* Syriac [macrolanguage] */
|
||||
|
|
Loading…
Reference in New Issue