Page MenuHomePhabricator

GettextFFS should implement isContentEqual
Open, Needs TriagePublic


FFS::isContentEqual is used to implement string equality comparison for translations. This is important because translation string might differ even though the contents are equal. Example:

Translator writes:

The bunnies stole {{PLURAL:GETTEXT|one carrot|%{count} carrots}}.

This might be exported as:

0: The bunnies stole one carrot.
1: The bunnies stole %{count} carrots.

When the system then flattens then again, it produces:

{{PLURAL:GETTEXT|The bunnies stole one carrot.|The bunnies stole %{count} carrots.}}

isContentEqual should return true for this string and what the translator wrote, to avoid FuzzyBot replacing the first form with the latter form after export-import roundtrip. That's easy to implement with GettextPlural::unFlatten.

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptFri, Sep 20, 12:47 PM