Skip to content

Conversation

@tunetheweb
Copy link
Member

Fixes #1968 using plural-ru function. Note this is not available as an importable function so added code directly to our code base (checked the licence first).

Home page intro:
Home page intro

Methodology text:
Methodology text

Contributors:
Contributors

@dtikhonov can you confirm I've used the right words?

English word ends in 1 (except 11) ends in 2,3 and 4 (except 12, 13, 14) else
chapters глава главы глав
contributors участник участника участников
people человек человека человек

It does look like we used "главах" below but Google Translate didn't come up with that at all so I guess double check that?

@tymosh does Ukrainian follow the same rules? Should we do the same for those templates?

@tunetheweb tunetheweb added development Building the Almanac tech stack translation world wide web labels Feb 3, 2021
@tunetheweb tunetheweb added this to the 2020 Content Translation milestone Feb 3, 2021
@tymosh
Copy link
Contributor

tymosh commented Feb 4, 2021

Hi @bazzadp. Yes, the same mechanism works for Ukrainian:

English word ends in 1 (except 11) ends in 2,3 and 4 (except 12, 13, 14) else
chapters розділ розділи розділів
contributors контриб'ютор контриб'ютори контриб'юторів
people людина людини людей

I will also need to check sentences for correct words endings in context.

@tunetheweb
Copy link
Member Author

Thanks @tymosh . Added those in the last commit if you wanna double check.

Also added test site here: https://20210204t112250-dot-webalmanac.uk.r.appspot.com

@tymosh tymosh changed the title Handle Russian plurals Handle Russian and Ukrainian plurals Feb 4, 2021
Copy link
Contributor

@tymosh tymosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Here's another thing: there are different word endings for "contributors" in constructions "124 contributors" and "5 of 124 contributors" in Ukrainian. Is there any way to do that?

@tunetheweb
Copy link
Member Author

Thanks! Here's another thing: there are different word endings for "contributors" in constructions "124 contributors" and "5 of 124 contributors" in Ukrainian. Is there any way to do that?

Yes and have this working now. Take a look at the latest code. Can also view it here: https://20210204t153224-dot-webalmanac.uk.r.appspot.com

@dtikhonov I presume this is the same in Russian? Can you review the latest code?

Copy link
Contributor

@tymosh tymosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@tunetheweb tunetheweb merged commit 9bb6b37 into main Feb 4, 2021
@tunetheweb tunetheweb deleted the slavic-numbers branch February 4, 2021 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development Building the Almanac tech stack translation world wide web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translations: support number-driven declension

4 participants