LaTeX reader: avoid trailing hyphen in translating languages.
Previously `\foreignlanguage{english}` turned into `<span lang="en-">`. The same issue affected Arabic. Closes #7447.
This commit is contained in:
parent
46099e79de
commit
31a5bccd57
1 changed files with 2 additions and 2 deletions
|
@ -105,7 +105,7 @@ polyglossiaLangToBCP47 = M.fromList
|
|||
"locale=morocco" -> Lang "ar" Nothing (Just "MA") [] [] []
|
||||
"locale=mauritania" -> Lang "ar" Nothing (Just "MR") [] [] []
|
||||
"locale=tunisia" -> Lang "ar" Nothing (Just "TN") [] [] []
|
||||
_ -> Lang "ar" Nothing (Just "") [] [] [])
|
||||
_ -> Lang "ar" Nothing Nothing [] [] [])
|
||||
, ("german", \o -> case T.filter (/=' ') o of
|
||||
"spelling=old" -> Lang "de" Nothing (Just "DE") ["1901"] [] []
|
||||
"variant=austrian,spelling=old"
|
||||
|
@ -126,7 +126,7 @@ polyglossiaLangToBCP47 = M.fromList
|
|||
"variant=british" -> Lang "en" Nothing (Just "GB") [] [] []
|
||||
"variant=newzealand" -> Lang "en" Nothing (Just "NZ") [] [] []
|
||||
"variant=american" -> Lang "en" Nothing (Just "US") [] [] []
|
||||
_ -> Lang "en" Nothing (Just "") [] [] [])
|
||||
_ -> Lang "en" Nothing Nothing [] [] [])
|
||||
, ("usorbian", \_ -> Lang "hsb" Nothing Nothing [] [] [])
|
||||
, ("latin", \o -> case T.filter (/=' ') o of
|
||||
"variant=classic" -> Lang "la" Nothing Nothing ["x-classic"] [] []
|
||||
|
|
Loading…
Reference in a new issue