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

Attempt to support plural forms in the matches counter of the findbar (issue 10067) #10070

Merged
merged 1 commit into from
Sep 13, 2018

Conversation

Snuffleupagus
Copy link
Collaborator

Based on a quick look at https://github.com/fabi1cazenave/webL10n/#pluralization, it seems that supporting plural forms shouldn't be as difficult as I first thought it might be.

Fixes #10067

… (issue 10067)

Based on a quick look at https://github.com/fabi1cazenave/webL10n/#pluralization, it seems that supporting plural forms shouldn't be as difficult as I first thought it might be.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/2648c6fe15560f3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2648c6fe15560f3/output.txt

Total script time: 7.31 mins

Published

@timvandermeij timvandermeij merged commit d0b5aa0 into mozilla:master Sep 13, 2018
@timvandermeij
Copy link
Contributor

Looks good. Thank you!

@flodolo
Copy link
Contributor

flodolo commented Sep 13, 2018

CC @Pike @zbraniecki

Unfortunately this is not a complete fix. In order to allow locales to translate, you need to provide all forms in your .properties (one, two, few, many, other), not just the ones needed by English.

webl10n is a relic from the past (Firefox OS), and had a very hacky plural support.

It would be nice to take a look at Fluent, and see if PDF.js could be ported to that system (which is maintained, unlike webl10n).

@timvandermeij
Copy link
Contributor

I'll create follow-up issues for both points.

@Snuffleupagus
Copy link
Collaborator Author

Unfortunately this is not a complete fix. In order to allow locales to translate, you need to provide all forms in your .properties (one, two, few, many, other), not just the ones needed by English.

I don't understand this comment, since there shouldn't be anything preventing a non-English locale from adding whichever of the one, two, few, many, other plural forms needed for a particular locale (regardless of what forms are required for English)!?
@flodolo Since I don't claim to understand the details of the localization process, could you please clarify what you mean here?

Also, keep in mind that as outlined in https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md, the translations are imported from Firefox rather than maintained in this GitHub repo.

@flodolo
Copy link
Contributor

flodolo commented Sep 13, 2018

I don't understand this comment, since there shouldn't be anything preventing a non-English locale from adding whichever of the one, two, few, many, other plural forms needed for a particular locale (regardless of what forms are required for English)!?

Locales don't work in editors. They work in tools that let you translate a string only if it exists in the original source (en-US). If en-US doesn't have [other], it simply won't be possible to translate (add) it.

P.S. I manage localization for Firefox ;-)

@flodolo
Copy link
Contributor

flodolo commented Sep 15, 2018

BTW, just realized that this should have landed with a new ID :-\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants