Page MenuHomeWildfire Games

Update plural_forms.cpp by tinygettext to reflect needs of translators
ClosedPublic

Authored by Angen on Tue, May 19, 8:35 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23690: Update plural_forms.cpp by tinygettext to reflect needs of translators
Summary

Some languages like sk in rP21907 have changed crucial line with information about how many plurals language uses and how to calculate correct one. However in plural_forms this line could not be matched with implemented functions so as result object with default settings have been returned what resulted in using only singular for translatePlural calls. (see https://code.wildfiregames.com/rP14951#inline-4907).

Affected languages (12):
sk, lt, uk, cs, pl, ro, mk, he, ga, cy, be, br

When no objections will raise, this will be committed in 3 days.

Test Plan

Test that affected languages display only singular version for translatePlural without this patch what is not case with this patch applied.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Angen created this revision.Tue, May 19, 8:35 PM
Angen added a reviewer: Restricted Owners Package.Tue, May 19, 8:40 PM
Angen added a subscriber: Gallaecio.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2164/display/redirect

Angen added a comment.Fri, May 22, 8:27 PM

https://github.com/tinygettext/tinygettext/issues/21

Grumbel commented on 26 Aug 2018
Expression parser is a waste of time, just hardcode whatever language you want to add and be done with it. Languages don't change frequently enough to make a parser worth the effort.

I agree with the idea. Not familiar with this piece of code so I'll trust your judgement.

source/third_party/tinygettext/src/plural_forms.cpp
4 ↗(On Diff #11928)

Is this something standard we do in other modified files?

This revision was not accepted when it landed; it landed in state Needs Review.Fri, May 22, 10:07 PM
This revision was automatically updated to reflect the committed changes.