valentjn / ltex-ls

LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
764 stars 33 forks source link

babel naustrian is not detected as austrian german #213

Closed 456Xander closed 1 year ago

456Xander commented 1 year ago

Describe the bug When using LaTeX and babel, the language should be detected automatically. Using babel with ngerman, the language is correctly detected as de-DE. However, when writing documents in austrian German (babel naustrian), the language gets wrongly detected as en-US. The detected language should be de-AT.

Steps to reproduce Create a Latex document and use

\usepackage[naustrian]{babel}

Expected behavior Language gets detected as de-AT.

Sample document

```latex \usepackage[naustrian]{babel} \documentclass[a4paper]{scrartcl} \begin{document} Das ist ein korrekter Satz. \end{document} ```

LTeX configuration

Using ltex with neovim and nvim-lspconfig. Configuration is provided by Spacevim.

LTeX LS log Paste the log (output) of LTeX LS here:

``` [ERROR][2023-01-06 12:27:53] .../vim/lsp/rpc.lua:733 "rpc" "ltex-ls" "stderr" "Jan 06, 2023 12:27:53 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \" Das ist ein korrekter Satz. \"\n" [ERROR][2023-01-06 12:27:53] .../vim/lsp/rpc.lua:733 "rpc" "ltex-ls" "stderr" "Jan 06, 2023 12:27:53 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 5 rule matches\n" ```

Version information List here the version information of the relevant software.

valentjn commented 1 year ago

Fixed in 1a903cdb8e63f74616a1fc8db4c9821a2ed73644.

github-actions[bot] commented 1 year ago

This issue is now fixed on develop. The fix will be included in the next release of LTEX.

If you don't want to wait, you can try out the nightly pre-release tomorrow. Nightly pre-releases are published every morning at around 4am UTC.