[go: up one dir, main page]

Page MenuHomePhabricator

Improve the MediaWiki:Growthexperiments-homepage-impact-scores-edit-count string and other similar strings that refer back to numbers
Open, Needs TriagePublic

Assigned To
None
Authored By
Yupik
Oct 16 2024, 10:16 PM
Referenced Files
F57640081: image.png
Oct 24 2024, 5:49 PM
F57640074: image.png
Oct 24 2024, 5:49 PM
F57640077: image.png
Oct 24 2024, 5:49 PM
F57621740: תמונה.png
Oct 17 2024, 2:45 PM
Restricted File
Oct 17 2024, 11:55 AM

Description

It is not possible to translate this string into some languages without the use of plural and the knowledge of how many edits it is counting. In addition, there may be layout issues where the number needs to be in the middle of the string or missing from it for it to be correct in other languages. The issues I list below have come up in translations into the Saami languages, but they are not unique to these languages.

Numerical issues

  • 0 edits: If a user has 0 edits, I have to be able to say "Not even one edit" without the number 0. As the string is right now, this is not possible at all and the result would be "0 Not even one edit" because of it. Using {{PLURAL}} in specific ways when translating MediaWiki Core, it is possible to bypass this issue, so assumedly using the same here would solve this.
  • 1 edit: This uses a different grammatical case than 2-6 and 7+ (for Inari and Skolt Saami etc.)
  • 2-6 edits: Different case than for 1 edit and 7+ edits.
  • 7+ edits: Yet another case.

Layout issues
The layout issue comes up with the number needing to be in between the total and edits in these languages (and Northern Saami, which uses a different plural system of 0, 1, 2+). It is unnatural to say 15 000 total edits in this exact order in these languages. As a result, the Northern Saami translators had to resort to saying 15 000 edits (total) (using the wrong grammatical case because of a lack of plural support), which sounds like Google Translate got to it instead of actual translators.

These issues affect more than just the languages I translate into. For example, even in English, if someone has 1 total edit, it shouldn't read 1 Total edits.

Event Timeline

GrowthExperiments developers should respond, too, but I am curious from the point of view of general localization: Is there no way to treat it as a generic label in a dashboard? Like, imagine a digital dashboard of a car, which says how many kilometers did you travel since the last reset. It can 0, 10, 345, etc. It's not supposed to be a sentence like "0 km", "1 km", "10 km", etc., but any number with a generic label. Is that very problematic in Saami?

Perhaps when one looks at the dashboard with the English user interface, it looks like a sentence: "0 Total edits", "345 Total edits", but I think that the intention is that it would be a generic label. For a user with 1 edit, it will probably say "1 Total edits", which is not correct English if you treat it as a sentence, but if you treat it as a box with the label "Total edits" and the value "1", then it's OK.

In Hebrew, the number comes after the word if the value is 1, but before the word if it's any other number, so it's a problem for Hebrew, too, but again—it's a problem only if you treat it as a sentence and not a box with a label and a value.

But then I don't really know Saami languages, and maybe in those languages it's a bigger problem than I think it is.

Another thought that Growth team's designers may consider: Put the label above the number and add a colon after it, like this:

Total edits:
345

This will make it look even more like a generic form or dashboard and more easily translatable.

GrowthExperiments developers should respond, too, but I am curious from the point of view of general localization: Is there no way to treat it as a generic label in a dashboard? Like, imagine a digital dashboard of a car, which says how many kilometers did you travel since the last reset. It can 0, 10, 345, etc. It's not supposed to be a sentence like "0 km", "1 km", "10 km", etc., but any number with a generic label. Is that very problematic in Saami?

Perhaps when one looks at the dashboard with the English user interface, it looks like a sentence: "0 Total edits", "345 Total edits", but I think that the intention is that it would be a generic label. For a user with 1 edit, it will probably say "1 Total edits", which is not correct English if you treat it as a sentence, but if you treat it as a box with the label "Total edits" and the value "1", then it's OK.

From the development pov I think these messages intentionally hardcode the plural form because our designer understood them as labels and not sentences, as you are mentioning.

In Hebrew, the number comes after the word if the value is 1, but before the word if it's any other number, so it's a problem for Hebrew, too, but again—it's a problem only if you treat it as a sentence and not a box with a label and a value.

But then I don't really know Saami languages, and maybe in those languages it's a bigger problem than I think it is.

I'm not linguist expert but I understand the issue, from an interface implementation side it would be great if you can share some visual examples of applications or interfaces that solve (or not) this problem in Hebrew or Saami, eg: car dashboards, train station panels, score cards, mobile apps, etc.

Another thought that Growth team's designers may consider: Put the label above the number and add a colon after it, like this:

Total edits:
345

This will make it look even more like a generic form or dashboard and more easily translatable.

The move from under to above seems appropriate, although I lack all the context to tell if the : is also appropriate or could be problematic. Tagging @JFernandez-WMF and @KStoller-WMF for support.

For context, here's a capture of the message keys, followed by : <number> when they are meant to be pluralized.
{F57621684}
In example, "growthexperiments-homepage-impact-scores-edit-count": "Total edits" is understood as a label and always plural while "growthexperiments-homepage-impact-recent-activity-streak-count-text": "$1 {{PLURAL:$1|day|days}}" is another text meant to be read as a sentence and pluralizable.
Note: the time ago text is provided by a third party library and should not be evaluated in the scope of this task.

I'm not linguist expert but I understand the issue, from an interface implementation side it would be great if you can share some visual examples of applications or interfaces that solve (or not) this problem in Hebrew or Saami, eg: car dashboards, train station panels, score cards, mobile apps, etc.

This won't be possible for the Saami languages, because none of those exist in these languages, except for maybe in some mobile app and those are few and far between too. I'll see if I can find something in Saami in a mobile app though.

In example, "growthexperiments-homepage-impact-scores-edit-count": "Total edits" is understood as a label and always plural while "growthexperiments-homepage-impact-recent-activity-streak-count-text": "$1 {{PLURAL:$1|day|days}}" is another text meant to be read as a sentence and pluralizable.

The problem is that there is not just one version of the plural in Inari and Skolt (and a number of other languages); the plural used depends on the number it is referring to. AFAIK this is a similar issue for Russian, but I'll leave that up to @Amire80 to explain if it is.

Moreover, this same plural-less issue is relevant in many of the other strings in Growth Experiments; total edits was just the one I noticed first:

Some more examples just from the homepage:

  • growthexperiments-homepage-impact-scores-thanks-count
  • growthexperiments-homepage-impact-edited-articles-trend-chart-count-label
  • growthexperiments-homepage-impact-recent-activity-contribs-count-text

I'm not linguist expert but I understand the issue, from an interface implementation side it would be great if you can share some visual examples of applications or interfaces that solve (or not) this problem in Hebrew or Saami, eg: car dashboards, train station panels, score cards, mobile apps, etc.

This won't be possible for the Saami languages, because none of those exist in these languages, except for maybe in some mobile app and those are few and far between too. I'll see if I can find something in Saami in a mobile app though.

It's a challenge for many languages with which the Wikimedia movement deals by this point: Wikipedia is the first, or one of the first sites or apps in them, so people don't have a tradition or a custom of how it should appear. I would just try asking several native speakers what do they think about it. And even though it sounds not-so-fun, perhaps copying some metaphors and customs from English or from another language in which those people are accustomed to using computers (Finnish, Norwegian, Russian?) is the most practical solution 🤷‍♂️

In example, "growthexperiments-homepage-impact-scores-edit-count": "Total edits" is understood as a label and always plural while "growthexperiments-homepage-impact-recent-activity-streak-count-text": "$1 {{PLURAL:$1|day|days}}" is another text meant to be read as a sentence and pluralizable.

The problem is that there is not just one version of the plural in Inari and Skolt (and a number of other languages); the plural used depends on the number it is referring to. AFAIK this is a similar issue for Russian, but I'll leave that up to @Amire80 to explain if it is.

Indeed:

תמונה.png (303×388 px, 18 KB)

Most of these are indeed grammatically wrong in Russian, but only if you treat them as sentences. If you treat them as boxes with a label and a number value, without making a grammatical connection between the number and the label, then it's OK. But again, I'm not saying that it necessarily works well for Saami languages.

The value label is already separated from the label by color, font size, and font weight, but it's not perfect. I'm not a real designer, but I could think of some naïve ideas to improve it further:

  • Putting the label above the value. It makes sense to me and to how I am accustomed to seeing dashboards and forms, but maybe it makes more sense in some cultures to put them below. (I think that putting the label above is good for forms and dashboards, and below is good for captions of art and photographs, but again, maybe this is just the way to which I'm accustomed.)
  • If it's above, then adding a colon, although it must be customizable by language (some languages put a space before it, some languages don't use it at all, etc.)
  • Making sure that it works well for blind and color-blind people.

The value label is already separated from the label by color, font size, and font weight, but it's not perfect. I'm not a real designer, but I could think of some naïve ideas to improve it further:

  • Putting the label above the value. It makes sense to me and to how I am accustomed to seeing dashboards and forms, but maybe it makes more sense in some cultures to put them below. (I think that putting the label above is good for forms and dashboards, and below is good for captions of art and photographs, but again, maybe this is just the way to which I'm accustomed.)
  • If it's above, then adding a colon, although it must be customizable by language (some languages put a space before it, some languages don't use it at all, etc.)
  • Making sure that it works well for blind and color-blind people.

These seem on-point suggestions, before turning them into requirements, let's loop in @RHo who was the original designer and has experience with UIs across languages. What do you think about the label flip and other suggestions?

The value label is already separated from the label by color, font size, and font weight, but it's not perfect. I'm not a real designer, but I could think of some naïve ideas to improve it further:

  • Putting the label above the value. It makes sense to me and to how I am accustomed to seeing dashboards and forms, but maybe it makes more sense in some cultures to put them below. (I think that putting the label above is good for forms and dashboards, and below is good for captions of art and photographs, but again, maybe this is just the way to which I'm accustomed.)
  • If it's above, then adding a colon, although it must be customizable by language (some languages put a space before it, some languages don't use it at all, etc.)
  • Making sure that it works well for blind and color-blind people.

These seem on-point suggestions, before turning them into requirements, let's loop in @RHo who was the original designer and has experience with UIs across languages. What do you think about the label flip and other suggestions?

Thanks for the ping @Sgs! My overall take is to @Amire80's point on T377399#10238191:

Most of these are indeed grammatically wrong in Russian, but only if you treat them as sentences. If you treat them as boxes with a label and a number value, without making a grammatical connection between the number and the label, then it's OK. But again, I'm not saying that it necessarily works well for Saami languages.

That is, that these are indeed meant to be scorecards and not meant to be read as sentences, so overall I would recommend updating the QQQs in translation advice to be more reflective of it being more like values and labels in datavis (akin to bar charts an pie charts) rather than it needing to read as a full sentence.
For the same reason, the importance is on the value, so this is why it is shown on top and as a the larger value. This design follows the general dataviz guidelines drafted as part of T280847, and is consistent with similar scorecards on mobile apps and Content translation (value on top, label secondary below):

Dataviz guideline
image.png (830×1 px, 127 KB)
Android edits screen
image.png (370×938 px, 37 KB)
Content translation stats
image.png (252×610 px, 14 KB)

Having said all that, will leave up to @JFernandez-WMF as the current designer and @KStoller-WMF to assess prio and need for updates accordingly.

Thanks for taking a look at these. While the non-plural versions might work in Russian, they don't in the Saami languages, which still requires the {{Plural}}, even when displayed as a scoreboard.

This same type of stats-scoreboard is used on the main page of TranslateWiki in the following strings:

  • MediaWiki:Twnmp-translations-per-month/en
  • MediaWiki:Twnmp-s-projects/en
  • MediaWiki:Twnmp-s-translators/en
  • MediaWiki:Twnmp-s-messages/en
  • MediaWiki:Twnmp-s-languages/en

As these use {{Plural}}, the front page of TranslateWiki shows the correct forms of the words for stats, which means that the Saami versions don't end up looking like they were machine-translated or done by someone who doesn't know how the languages work.

Change #1083785 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Impact: pluralize score card labels and stats titles

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

Since adding plural should not harm the rest of messages, I pluralized the following which hopefully improve the status quo for Saami and other languages.

  • growthexperiments-homepage-impact-edited-articles-trend-chart-count-label
  • growthexperiments-homepage-impact-edited-articles-trend-chart-count-label-third-person
  • growthexperiments-homepage-impact-scores-edit-count
  • growthexperiments-homepage-impact-scores-reverted-edit-count
  • growthexperiments-homepage-impact-scores-thanks-count

cc @Amire80 to confirm this won't cause a regression in non-affected languages

Since adding plural should not harm the rest of messages, I pluralized the following which hopefully improve the status quo for Saami and other languages.

  • growthexperiments-homepage-impact-edited-articles-trend-chart-count-label
  • growthexperiments-homepage-impact-edited-articles-trend-chart-count-label-third-person
  • growthexperiments-homepage-impact-scores-edit-count
  • growthexperiments-homepage-impact-scores-reverted-edit-count
  • growthexperiments-homepage-impact-scores-thanks-count

Thank you so much! Any idea when I can start using PLURAL with these? It is still adding FUZZY to the Northern Saami (se) translations with PLURAL.