Wrong mapping for portuguese
language
#72
Labels
1-bug 🐛
Issue type: Bug report (something isn't working as expected)
2-confirmed
Issue status: Confirmed, reproducible bug in LTeX
3-fixed
Issue resolution: Issue has been fixed on the develop branch
Milestone
Hey there!
First off, great extension, I love it, awesome stuff with LATEX support.
I've seemed to have identified what looks to be an issue when trying to enclose portuguese text using babel commands. I've tried them all:
foreignlanguage
,selectlanguage
, theotherlanguage
environment. Magic comments work fine with the language tag, but that had me thinking.I resorted, as documented, to use the
babeltags
command in my document's preamble like so\babeltags{pt=portuguese}
To my surprise, and confusion, when using
textpt
or the now availablept
environment, checking worked wonderfully.I tracked down when support for babel commands were introduced and noticed this line over here when initializing the
babelLanguageMap
ltex-ls/ltexls/src/main/java/org/bsplines/ltexls/parsing/latex/LatexFragmentizer.java
Line 157 in 5832d4d
The language
portugese
is not made available by babel, only making available the codenamesportuguese
(spelled correctly) and the historically shortportuges
. I'm not sure this is either a typo or that babel used to supportportugese
as well in the past. If it was a typo, I suggest its removal, keeping it otherwise.Regardless, I would recommend adding the proper mappings. While I'm at it, I'd also suggest adding the historical aliases for compatibility reasons, if those are interesting to support as well. Some java pseudo-code follows:
Quick disclaimer: I'm not sure this is enough to fix the whole problem, but from what little I've looked at, it seems to be enough. If it is, I can gladly submit a PR adding the missing mappings. Removing the
portugese
mapping is up for debate. I honestly don't recall if that language codename was supported once, but it doesn't appear to be documented in the most recent version of the documentation.The text was updated successfully, but these errors were encountered: