Page MenuHomePhabricator

Investigation: Plan fallbacks for Cite when lacking Community Configuration or cldr
Closed, ResolvedPublic

Description

Many third-party sites use Cite, and we want to make it possible for these to still benefit from any improvements we make, eg. to backlink numbering.

no-CLDR and no-CommunityConfiguration

  • Default fallback will be the English alphabet a-z.
  • Allow that to be overridden by a PHP config var in the LocalSettings.php, $wgCiteDefaultBacklinkAlphabet. This is a literal sequence like "a b c d... z" because that gives the most flexible support for all languages.

CLDR but no-CommunityConfiguration

  • Default will be the content language locale index alphabet, if known to CLDR.
  • Override still available via PHP config variable.

CommunityConfiguration but no-CLDR

  • Alphabet sequence can be set literally in the configuration panel.
  • No CLDR popup dialog to assist.
  • Precedence is: built-in defaults < PHP configuration variable < CommunityConfiguration setting, if not empty

CommunityConfiguration and CLDR present

  • Same as above, but a nice popup dialog to assist with picking from known alphabets.

Event Timeline

After some dev discussion, we're thinking that the nicest balance would be a PHP variable like "community configuration defaults", which could be set up for eg. an entire project (wikinews, etc.) or for a third-party site, and would be respected as the default values for Community Configuration dialogs, or it would be used directly in the case the the extension is unavailable. Let's check with the Growth team about this.

After some dev discussion, we're thinking that the nicest balance would be a PHP variable like "community configuration defaults", which could be set up for eg. an entire project (wikinews, etc.) or for a third-party site, and would be respected as the default values for Community Configuration dialogs, or it would be used directly in the case the the extension is unavailable. Let's check with the Growth team about this.

I guess we need to answer two questions here:

  1. What to do if CommunityConfiguration is not installed.
  2. What to default to when CLDR is not installed.
  1. Is the simpler one IMO. In general we always fallback on a default locale an most sense makes the content language. It would make sense if this at least could be overwritten by a config var in the LocalSettings.php. - I'm not sure if the CommunityConfiguration should take precedence over that one or if it also is like a "kill switch".
  2. That's more tricky. The default fallback will be generating a list out of a-z.

Should that be customizable? Maybe at least via $wg setting? In the form of

$wgCite.... = [ 'a', 'b', 'c', ... ];

A hidden backdoor for the numeric system then?