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

Broken Arabic plurals #5516

Closed
Frenzie opened this issue Oct 21, 2019 · 1 comment · Fixed by #5517
Closed

Broken Arabic plurals #5516

Frenzie opened this issue Oct 21, 2019 · 1 comment · Fixed by #5517
Assignees
Labels
bug
Milestone

Comments

@Frenzie
Copy link
Member

@Frenzie Frenzie commented Oct 21, 2019

  • KOReader version: post-#5515
  • Device: all

Issue

Apparently Arabic has plurals that manage to break my plurals parsing.

"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
@Frenzie Frenzie added this to the 2019.11 milestone Oct 21, 2019
@Frenzie Frenzie self-assigned this Oct 21, 2019
@Frenzie Frenzie added the bug label Oct 21, 2019
Frenzie added a commit to Frenzie/koreader that referenced this issue Oct 21, 2019
Fixes <koreader#5516>.

Cf. <koreader#5515>.
Frenzie added a commit to Frenzie/koreader that referenced this issue Oct 21, 2019
Fixes <koreader#5516>.

Cf. <koreader#5515>.
Frenzie added a commit that referenced this issue Oct 21, 2019
Fixes <#5516>.

Cf. <#5515>.
@poire-z

This comment has been minimized.

Copy link
Contributor

@poire-z poire-z commented Nov 17, 2019

Another plural issue: KOReader crashes when I select Language > Čeština:

11/17/19-10:49:35 DEBUG gettext: plural function return function(n) if n == 1 and n % 1 == 0)  then return 0  elseif  (n >= 2 and n <= 4 and n % 1 == 0)  then return 1 elseif  (n % 1 ~= 0  end end
./luajit: frontend/gettext.lua:126: attempt to call a nil value
stack traceback:
 frontend/gettext.lua:126: in function 'getPluralFunc'
 frontend/gettext.lua:223: in function 'changeLang'
 frontend/ui/language.lua:86: in function 'changeLanguage'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.