Page MenuHomePhabricator

It should be possible to add a label in any eligible language
Closed, ResolvedPublic

Description

Author: Gerard.meijssen

Description:
I am expecting a list of languages from India and Indonesia where a request will be made for Wikidata only. They are living languages and they are eligible.

What is needed for these languages is that it is possible to select them. They may have fonts and input methods associated with them as well.

It will be really helpful is we get assurances that such languages can be made operational in a minimum time frame. This is because it will help with planned conferences and workshops in both India and Indonesia.
Thanks,

GerardM

Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0

Details

Reference
bz59905

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:35 AM
bzimport set Reference to bz59905.
bzimport added a subscriber: Unknown Object (MLST).

It's unclear to me what exactly is requested and what is the scope here (plus the current bug summary might miss a verb?)
Please describe

  • What were you trying to do (and why)?
  • What did you do? (Steps to reproduce)
  • What happened?
  • What were your expectations instead?

as also listed on https://bugzilla.wikimedia.org/enter_bug.cgi?format=guided

Gerard.meijssen wrote:

Andre .. ULS functionality is needed for languages that will be used on Wikidata only. These languages will not have any localisations. They will have an autonym, a script and possibly it may be that fonts and input methods are indicated.

An example of a language could be Ahirani (ISO 639-3 ahr). This is a language that requested a Wikipedia and never got included in twn as far as I know.

Thanks,

GerardM

Gerard, if I understand correctly, this became a usual practice to add languages as needed for Wikidata. I'm closing this as resolved. Please reopen if I misunderstand something.

Reopening as a Wikibase repo bug.

After talking to Gerard I found the following: ULS and CLDR already support the languages in which Gerard is interested (for example ota and rwr). To test I did this:

  • I added rwr to my Babel template.
  • I opened an item page.
  • I saw a place to add a label and a description in this language, and the language name was loaded (I guess that it was loaded from CLDR or from ULS's langdb).
  • When I actually tried to save the label, I got an error:

Unrecognized value for parameter 'language': rwr

My understanding is that this is a Wikibase repo issue. Please let me know if there is anything else that we can do on the ULS side.

A little addition: For Maithili (mai) it does work. My guess is that it's because it's recognized in Names.php or because it has a MessagesMai.php file.

In principle it should be possible to add a label in any language without much limitation and it shouldn't depend on Names.php or MessagesMai.php.

I am changing the title to make the bug more focused: It is not about the selection, which is a very generic term, but about adding labels.

Gerard.meijssen wrote:

At this time we are waiting for three months for rwr (a living language from India) and ota (no longer in use since the nineteen hundreds).

Once rwr is fully functional in Wikidata, other living languages will be added. They do NOT need localisation as a prerequisite. These languages will be fully eligible for a Wikipedia (or any other project) when they conform to the requirements as per the language policy.

I changed the title as it is exclusively about eligible languages. Consequently we are talking about less than 5 languages that apply at this moment.

From IRC:

aharoni DanielK_WMDE: do you have any idea about https://bugzilla.wikimedia.org/show_bug.cgi?id=59905 ?
aharoni I tried to add a label in rwr and got the error: "Unrecognized value for parameter 'language': rwr"
aharoni The question is: where do the valid values for this parameter come from?
DanielK_WMDE
aharoni: Language::fetchLanguageNames()
DanielK_WMDE__ that's where we get the valid language codes from
aharoni DanielK_WMDE: Thanks. How hard would it be to enhance it to include more eligible languages?
aharoni maybe an array constant?
DanielK_WMDE
aharoni: the only constraint we have is that we need to be able to instantiate a Language object.
aharoni aha. ok.
DanielK_WMDE__ so, we only support languages that work as interfrace languages
aharoni hmm. problem.
DanielK_WMDE__ aharoni: it might be sufficient to add it to wgExtraLanguages. but i'm not sure that makes it work as an interface language.
DanielK_WMDE__ aharoni: Language::fetchLanguageNames actually considers $wgExtraLanguageNames. I have no idea how that works with Language::factory.
DanielK_WMDE__ aharoni: maybe adding to code to $wgDummyLanguageCodes too would fix it.

(In reply to Amir E. Aharoni from comment #7)

DanielK_WMDE__ aharoni: the only constraint we have is that we need to be
able to instantiate a Language object.

Perhaps use Language::isKnownLanguageTag() which guarantees that we know the name of the language at least.

Adding $wgExtraLanguageNames = array( 'rwr' => 'मारवाड़ी' ); to my local settings made rwr usable and it worked like a charm (couldn't identify anything broken). Question now is whether we want to configure these extra languages for Wikidata via WMF's configuration or go another way.

(In reply to Marius Hoch from comment #9)

Adding $wgExtraLanguageNames = array( 'rwr' => 'मारवाड़ी' ); to my local
settings made rwr usable and it worked like a charm (couldn't identify
anything broken).

Thanks for testing!

Question now is whether we want to configure these extra
languages for Wikidata via WMF's configuration or go another way.

Adding to WMF configuration sounds like the right thing to me. Users of Wikibase on other sites can configure their own languages.

Change 129408 had a related patch set uploaded by Hoo man:
Add two languages not supported by MediaWiki to testwikidata

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

Change 129408 merged by Hoo man:
Add two languages not supported by MediaWiki to testwikidata

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

This is live on testwikidata now (for ota and rwr), so please go ahead and test it.

If this works out fine, we can probably go for the real Wikidata soon.

Change 129708 had a related patch set uploaded by Hoo man:
Add two languages not supported by MediaWiki to wikidata

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

the only issues I see (i suppose not a blocker) are:

  1. seems I can't choose ota in ULS, though uselang works. It's needed to select a language in order to enter labels, etc. (or alternatively append uselang to the url)
  1. ota is a RTL language, so it would be helpful to have that knowledge (I think provided by ULS?) to handle that more properly.

Change 129708 merged by Mwalker:
Add two languages not supported by MediaWiki to wikidata

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

Patch has been deployed... needs follow-up bugs (see comment 15).

(In reply to Aude from comment #15)

the only issues I see (i suppose not a blocker) are:

  1. seems I can't choose ota in ULS, though uselang works. It's needed to

select a language in order to enter labels, etc. (or alternatively append
uselang to the url)

Another option is to add these codes to your Babel template.

  1. ota is a RTL language, so it would be helpful to have that knowledge (I

think provided by ULS?) to handle that more properly.

ota was defined as LTR in ULS by mistake. I fixed this already and it should be deployed soon.