Page MenuHomePhabricator

Watchlist Expiry: Some languages may see misleading expiry time
Open, Needs TriagePublic1 Estimated Story PointsBUG REPORT

Description

What is the problem?

Due to T268492, languages like Belarusian may see "1 day left..." in the watch star tooltip even if there are more days left.

This affects anywhere the watchlist-expiring-days-full-text translation message is used, including the tooltip (watch star and Special:Watchlist) and Special:EditWatchlist.

This happens when the number of days left is 21, 31, 41. etc. (because these numbers are singular in Belarusian). This might be quite common as, depending on the current month, 1 month = 31 days, 3 months = 91 days and 6 months = 181 days.

There are a few other languages like Belarusian in this regard[1]. This bug will affect them if they also do not have a translation for watchlist-expiring-days-full-text.

Potential solutions
  1. Write translation for the watchlist-expiring-days-full-text message in Belarusian (and similar languages[1] if the translation is missing).
  2. Change the watchlist-expiring-days-full-text message in the English translation from {{PLURAL:$1|1 day|$1 days}} left in your watchlist to something like {{PLURAL:$1|$1 day|$1 days}} left in your watchlist (using the actual $1 variable for both singular and plural variant).
    • The message users will then see is 21 day left... which is still not correct grammatically, but at least the number of days is correct.
Steps to reproduce problem
  1. Watch a page for 21 days (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:ApiSandbox#action=watch&format=json&expiry=21%20days&titles=Foobar)
  2. Go to Special:Preferences and change your language to be - беларуская
  3. Visit the page you just watched and hover over the watch star

Expected behavior: Tooltip says "21 days left..."
Observed behavior: Tooltip says "1 day left..."

Environment

Browser: Firefox 78 and Chrome 87
Wiki(s): https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (77e1b24) 10:00, 23 November 2020

References
  1. I don't have a complete list but see, for example, https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals and https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.html.