Bundle messages with imprecise amount of "other" not properly localizable
Closed, ResolvedPublic

Description

See discussion on https://gerrit.wikimedia.org/r/#/c/268164/8/i18n/qqq.json

It's not currently possible to properly localize "User and 99+ others have done something".

The point at which it stops displaying an exact number and when it turns into "99+" is configurable: $wgEchoMaxNotificationCount
Because it is configurable, it is not possible to use a (e.g. 99) number in i18n messages for that case.

We would either have to split messages completely, in the code, so translators know which the imprecise version is:

  • "User and 5 others have done something"
  • "Users and 99+ others have done something"

Or we would have to make the bundling cutoff not configurable; then we can reliably use '99' or '100' to mean the imprecise version.
Is there even a good reason to have it be configurable?

Or other ideas/solutions?

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 18 2016, 9:28 AM
matthiasmullie renamed this task from Bundle messages not properly localizable to Bundle messages with imprecise amount of "other" not properly localizable.Feb 18 2016, 9:28 AM

So if we made it non-configurable, we would pass in 99 for the 99+ case, and the message would use explicit plural forms (99=)?

And we could just use one message per type of bundle, and drop echo-notification-count?

That sounds fine. I don't think there is a strong reason this has to be configurable.

siebrand added a comment.EditedFeb 18 2016, 5:48 PM

@Mattflaschen's assumption is correct. You should probably pass 100, as there is a valid 99 case, I think. I think there's even something to say for dropping the "$1+" message, and making it something like this:

{{PLURAL:$1|one|$1|100=99+}}

Or whatever is most applicable. Should make the code a bit easier, too.

It's kind of weird to have two possible renderings, "User and 99 others" (if it really was 99 others) vs. "User and 99+ others" (if it was more than 99). Hence my suggestion that 99 be passed for >= 99, so 99 renders as 99+ (+ is equivalent to >=, as I understand it, just rendered differently).

In T127288#2041518, @Mattflaschen wrote:

It's kind of weird to have two possible renderings, "User and 99 others" (if it really was 99 others) vs. "User and 99+ others" (if it was more than 99). Hence my suggestion that 99 be passed for >= 99, so 99 renders as 99+ (+ is equivalent to >=, as I understand it, just rendered differently).

I went back to 99+ meaning "100 or more".

Change 276096 had a related patch set uploaded (by Mattflaschen):
WIP: Make plural support for large values (100 or more) explicit in l10n

https://gerrit.wikimedia.org/r/276096

Change 276098 had a related patch set uploaded (by Mattflaschen):
Remove reference to echo-notification-count (unused)

https://gerrit.wikimedia.org/r/276098

Change 276097 had a related patch set uploaded (by Mattflaschen):
echo-notification-count is removed; echo-badge-count opt. similarly

https://gerrit.wikimedia.org/r/276097

Change 276099 had a related patch set uploaded (by Mattflaschen):
Corresponding changes for Echo 99 refactoring

https://gerrit.wikimedia.org/r/276099

Change 276098 merged by jenkins-bot:
Remove reference to echo-notification-count (unused)

https://gerrit.wikimedia.org/r/276098

Change 276096 merged by jenkins-bot:
Make plural support for large values (100 or more) explicit in l10n

https://gerrit.wikimedia.org/r/276096

Change 276099 merged by jenkins-bot:
Corresponding changes for Echo 99 refactoring

https://gerrit.wikimedia.org/r/276099

Change 276097 merged by jenkins-bot:
echo-notification-count is removed; echo-badge-count opt. similarly

https://gerrit.wikimedia.org/r/276097

Email notifications - actual emails sent- get bundled as
"notification-edit-user-talk-email-batch-bundle-body": "$1 and {{PLURAL:$2|one other|$2 others|100=99+ others}} {{GENDER:$1|left}} a message on your talk page."

Note: Mentions are not bundled in email notification. Should we review consistency of bundling between Messages and email notifications?

@Mattflaschen
I noticed that using uselang=qqx the label says 100. That's how it's supposed to be? Just to confirm.
The notificaiton badges

with uselang=qqx

I noticed that using uselang=qqx the label says 100. That's how it's supposed to be? Just to confirm.

Yes. Thanks for testing. 99 shows as 99. 100 or more shows as 99+ (but it's passed in as 100, which explains the qqx).

jmatazzoni closed this task as Resolved.Apr 19 2016, 4:39 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 4:39 PM