Page MenuHomeWildfire Games

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

Authored by Silier on May 19 2020, 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.

Event Timeline

Silier created this revision.May 19 2020, 8:35 PM
Silier added a reviewer: Restricted Owners Package.May 19 2020, 8:40 PM
Silier 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

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

Is this something standard we do in other modified files?

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