social-app icon indicating copy to clipboard operation
social-app copied to clipboard

Improve plural marks

Open quiple opened this issue 1 month ago • 2 comments

This PR combines duplicate parts of plural strings.

Before:

#: src/components/moderation/LabelsOnMe.tsx:57
msgid "{0, plural, one {# label has been placed on this account} other {# labels has been placed on this account}}"
msgstr ""

#: src/components/moderation/LabelsOnMe.tsx:63
msgid "{0, plural, one {# label has been placed on this content} other {# labels has been placed on this content}}"
msgstr ""

After:

#: src/components/moderation/LabelsOnMe.tsx:57
msgid "{0, plural, one {# label} other {# labels}} has been placed on this account"
msgstr ""

#: src/components/moderation/LabelsOnMe.tsx:63
msgid "{0, plural, one {# label} other {# labels}} has been placed on this content"
msgstr ""

quiple avatar May 10 '24 11:05 quiple

Hmm. I'm not sure this makes sense because it leaves less freedom to other languages to rearrange words (if needed for grammar).

gaearon avatar May 10 '24 14:05 gaearon

@gaearon It looks like you can freely reposition the plural string ({0, plural, one {# label has} other {# labels have}} in the example above) or put multiple of them in <Trans>.

quiple avatar May 10 '24 14:05 quiple