Page MenuHomePhabricator

Change wgContentLanguage on Simple Wikipedia from en to simple
Closed, InvalidPublic

Description

See bug 25519. Targeting by content language currently makes Simple Wikipedia show up as English and if it does not harm anything it would be preferable to change this. It appears Simple Wiktionary is already set to 'simple' so I don't believe it will, happy to make a post on the project to see if anyone has a concern.


Version: unspecified
Severity: enhancement

Details

Reference
bz25591

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport set Reference to bz25591.
bzimport added a subscriber: Unknown Object (MLST).

But simple is not a language....
Personally, I think changing things like this is a bad idea.

if simple isn't a language, why do we have a language code for it? What is the purpose of that language code?

(In reply to comment #1)

But simple is not a language....
Personally, I think changing things like this is a bad idea.

+1. If we must do this it should be something like en-simple so that things that look at language codes can at least fall back to knowing its some sort of english (although the folks involved in i18n probably know much better then i do if this is true or not) . Setting $wgContLang to simple leads to ugliness like:

<html xmlns="http://www.w3.org/1999/xhtml" lang="simple" dir="ltr">

(Seen on simple wiktionary) in the html, which seems quite wrong. imho

If Simple English Wikipedia wants to report as 'en' that's fine with me. The only issue is that they will receive CentralNotice banners targeted to English Wikipedia(s), and there will be no way to target banners to only Simple English Wikipedia.

As an admin (and former CU) on Simple I'm happy to ask the rest of the community. My guess is that THEY either won't care or would prefer being set as simple (like the other Simple English project is set) but this sounds more like the preference is for it not to be set that way for separate reasons.

en-simple sounds like a an interesting alternative if we want to do that.

(In reply to comment #5)

As an admin (and former CU) on Simple I'm happy to ask the rest of the
community. My guess is that THEY either won't care or would prefer being set as
simple (like the other Simple English project is set) but this sounds more like
the preference is for it not to be set that way for separate reasons.

en-simple sounds like a an interesting alternative if we want to do that.

If a new language tag was to be chosen, in order to be compliant with RFC 5646 it probably should be something like en-x-simple (I don't know if our lang codes are generally valid lang tags or not, but it'd be more logical if they were...). programs that deal with language tags should be able to recognize en-x-simple as being english even if they have no idea what the -x-simple part means, where they have no way of knowing what 'simple' would mean.

(In reply to comment #6)

it probably should be something like en-x-simple

Backing that in all contexts, where technical language tagging is concerned.

We could make a move to have the subtag "-simple" officially registered for "en", which would nicely fit with other "dialect/variety" subtags of English, such as "-scouse" or "-scottisch". We're possibly not alone with this proposal.
Once it was registered, we could start using "en-simple" instead of "en-x-simple".

I don't know if our lang codes are generally valid lang tags or not

We are using about 15 lang tags which are either not in the standards or assigned another meaning in the wmf context than in the standards. We are gradually reducing their use and transitting to standard ones as they become available.

Currently 'simple' is classified by MediaWiki as a 'dummy language'. A dummy language is defined as a language code that doesn't have a corresponding set of translated system messages and never will (usually because it is deprecated and now mapped to another language code, for example, bat-smg -> sgs). It doesn't make sense to use a dummy language as a content language since it will never actually affect the content or interface (CentralNotice not withstanding). The two possible solutions are:

  1. Make 'simple' (or 'en-simple') a fully supported language code in MediaWiki (like de-formal or nl-informal) and switch simple.wikipedia to use it. This means that 'simple' will get its own translated system messages as well.
  1. Remove 'simple' (and hopefully the 7 other dummy languages) from the CentralNotice interface and switch simple.wiktionary and simple.wikiquote to use 'en'.

Actually it looks like 'en-x-simple' would be the proper language code per Best Current Practice 47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt).

My suggestion for fixing this bug would be 2 part:

For the short term, change Simple English Wikipedia's language code from 'en' to 'simple' so that it matches the other Simple English projects and be can targeted separately from the English Wikipedia for things like CentralNotice and interlanguage links.

For the long term, change the 'simple' language code to 'en-x-simple' and switch all the Simple English projects to that.

AFAIK we're going in the opposite direction with "simple" wikis, after https://gerrit.wikimedia.org/r/#/c/35383/
Wizardist, could you please update this bug and close it if necessary?

Simple Wiktionary uses now en.

When a separate language code for the Simple projects gets added, this language code must be conform to BCP 47.

I do not see an use case for separate language code for the simple projects. Is there a separate user interface language like de-formal or nl-informal? @Jalexander Can you give use cases for a separate language code for the Simple projects? If there are no use cases close this task as invalid.

Nemo_bis claimed this task.

Per above. All open "simple" wikis are now correctly marked as being in "en" locale:

'wgLanguageCode' => array(
	'default' => '$lang',

	# Non-ISO language codes
	'crhwiki' => 'crh-latn',
	'nowiki' => 'nb',
	'simplewiki' => 'en',
	'simplewiktionary' => 'en',

We are not going to add wikis to invalid locales.