Page MenuHomePhabricator

Reply Links do not appear if language of signature date appears in a script different from the project's native one
Open, Needs TriagePublic

Description

Behavior

  1. Visit a page on a wiki that contains a comment with a signature whose date is written in a script different from the wiki's native one (e.g.Thank you Nitesh (CIS-A2K) (talk) 07:54, 9 January 2021 (UTC) on https://w.wiki/wbr)

Actual

  1. ❗️No [ reply ] link appears after Thank you Nitesh (CIS-A2K) (talk) 07:54, 9 January 2021 (UTC)

Expected

  1. [ reply ] link appears regardless of the script/language in which the signature is written in

Done

  • Expected behavior is implemented

@Ryasmeen noted this in T272204#6763934.

Event Timeline

I'm not sure if it's worth it to try to handle this case. Signatures don't normally appear in other languages (in this case, it looks like a mistake made when posting with the MassMessage tool).

If we wanted to support it anyway, it would take a lot of effort:

  • The main problem here is that in order to parse signatures in other languages, we would need to load MediaWiki's localization data for every language (to know the date formats and required translations, like month names), and this is slow (several seconds) because MediaWiki supports 300+ languages. Using the localization data for the wiki's native language is "free" because it's already loaded.

    We could figure out some way to only load the small subset of localization data we need, or to maintain our own data, but this would be a significant amount of work.

    Or we could limit the supported languages to a small number, perhaps just English, but I'm not sure that supporting 2 languages instead of 1 is worthwhile (and it seems vaguely inappropriate to develop features that would only be available in English, anyway).
  • Our discussion parser can't handle signatures in multiple languages on a single page (although this would probably be possible, since we've done something similar to handle multiple language variants in T259818).

If we wanted to support it anyway, it would take a lot of effort:

  • The main problem here is that in order to parse signatures in other languages, we would need to load MediaWiki's localization data for every language (to know the date formats and required translations, like month names), and this is slow (several seconds) because MediaWiki supports 300+ languages.

Ah, I see. Increasing page load times substantially to avoid rare cases where [ reply ] links do not appear on some comments does not seem worthwhile.

We could figure out some way to only load the small subset of localization data we need, or to maintain our own data, but this would be a significant amount of work.

Considering, what I currently understand to be, the rarity of this issue, I agree with the conclusion you came to above about it not being worthwhile to invest the effort into doing what you are describing above.

Or we could limit the supported languages to a small number, perhaps just English, but I'm not sure that supporting 2 languages instead of 1 is worthwhile (and it seems vaguely inappropriate to develop features that would only be available in English, anyway).

I share a reluctance similar to the one you are expressing above about developing features only available in English.