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

Crash on Native when using a language without plural config #53

Open
jacobras opened this issue Jan 9, 2024 · 0 comments
Open

Crash on Native when using a language without plural config #53

jacobras opened this issue Jan 9, 2024 · 0 comments

Comments

@jacobras
Copy link

jacobras commented Jan 9, 2024

Libres crashes on JS when using any language that doesn't have a set of PluralRules. For example, Dutch ("nl"), even though it follows the same rules as English.

Plural rule for 'nl' not provided
IllegalStateException: Plural rule for 'nl' not provided

My current workaround:

// See also: jsMain
actual fun extendLibresPlurals() {
    // Make all Libres plurals default to the English implementation
    // Workaround until https://github.com/Skeptick/libres/issues/53 is fixed
    PluralRules["nl"] = PluralRules["en"]
    PluralRules["de"] = PluralRules["en"]
    // ... and so forth ...
}

My suggested fix: #54

@jacobras jacobras changed the title Crash on JS when using a language without plural config Crash on Native when using a language without plural config Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant