Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error about missing language #407

Closed
alerque opened this issue Nov 10, 2016 · 7 comments
Closed

Strange error about missing language #407

alerque opened this issue Nov 10, 2016 · 7 comments
Labels
bug Software bug issue needs MWE Minimum working example needed for investigation
Milestone

Comments

@alerque
Copy link
Member

alerque commented Nov 10, 2016

Sometime last week —and I can't correlate this with any change I'm aware of— SILE started throwing this warning pretty much any time I use it:

[1] [2] [3]
! Error loading language en-u-va-posix: /home/caleb/projects/sile//core/sile.lua:62: module 'languages/en-u-va-posix' not found: 
        no field package.preload['languages/en-u-va-posix'] 
...
<the usual list of search paths tried>

What page it falls on varies from document to document, but if nothing else it seems to give this at the end of a document if it hasn't happened before then. Sometimes it gets thrown many times per document.

I can't find anything in my environment, document or libraries where the string en-u-va-posix could be coming from.

@simoncozens
Copy link
Member

You know, I would be debugging this the dumb-stupid way. At the top of core/languages.lua:loadLanguage, add if language == "en-u-va-posix" then SU.error("WHAT",1) end.

@alerque
Copy link
Member Author

alerque commented Nov 11, 2016

So this gets triggered any time I tag content as not having a language using \font[language=und]{...} or similar. Using xx or some other bogus value value produces the usual error about there being no language support file for xx, but passing und results in en-u-va-posix (which doesn't even match my system's locale setting).

@simoncozens
Copy link
Member

The culprit is icu.canonicalize_language.

@simoncozens
Copy link
Member

I think the warning will make this obvious now.

@Darkyenus
Copy link
Contributor

This seems to be still happening:

\begin{document}

\font[language=und]{Hello.}

\end{document}

Leads to:

This is SILE 0.9.5.1
<bug.sil>

! Error loading language en-u-va-posix: no support for this language
[1] 

However, the file seems to be generated correctly.

@alerque alerque reopened this Apr 18, 2019
@alerque
Copy link
Member Author

alerque commented Apr 18, 2019

I routinely tag text in my books such as transliterations and pseudo-language words with und and the typesetting works fine. I've become blind to this error. As much as it makes more sense than the old error, I do think we should figure out a way to stop throwing it at all for text that is specifically tagged as being undefined. It's counter intuitive to have a language code you didn't specify showing up as an error.

@Omikhleia Omikhleia added the bug Software bug issue label Mar 25, 2023
@Omikhleia Omikhleia added the needs MWE Minimum working example needed for investigation label Oct 6, 2023
@alerque alerque added this to the v0.15.0 milestone May 28, 2024
@alerque
Copy link
Member Author

alerque commented May 28, 2024

This has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue needs MWE Minimum working example needed for investigation
Projects
Development

No branches or pull requests

4 participants