Last modified: 2014-03-26 01:48:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60792, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58792 - Tool Labs: Provide a meta database table to replace "toolserver.language"
Tool Labs: Provide a meta database table to replace "toolserver.language"
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks: tool-missing-ts-feat
  Show dependency treegraph
 
Reported: 2013-12-21 13:05 UTC by Merlijn van Deen (test)
Modified: 2014-03-26 01:48 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Merlijn van Deen (test) 2013-12-21 13:05:12 UTC
The toolserver provides the following table:

mysql> describe language;
+--------------+--------------+------+-----+---------+-------+
| Field        | Type         | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| lang         | varchar(16)  | NO   | PRI | NULL    |       |
| english_name | varchar(255) | YES  |     | NULL    |       |
| native_name  | varchar(255) | YES  |     | NULL    |       |
+--------------+--------------+------+-----+---------+-------+

mysql> select * from language order by rand() limit 10;
+------+--------------+------------------+
| lang | english_name | native_name      |
+------+--------------+------------------+
| cjp  | Cabécar     | NULL             |
| kks  | Giiwo        | NULL             |
| mqc  | Mangole      | NULL             |
| gby  | Gbari        | NULL             |
| kw   | Cornish      | Kernewek         |
| na   | Nauruan      | Ekakairũ Naoero |
| ymd  | Muda         | NULL             |
| npa  | Nar Phu      | NULL             |
| waa  | Walla Walla  | NULL             |
| hss  | Harsusi      | NULL             |
+------+--------------+------------------+
10 rows in set (0.00 sec)



This could also be integrated with meta_p.wiki, by providing a 'language' and 'native_language' column.
Comment 1 MZMcBride 2013-12-24 12:56:11 UTC
What's the use case?
Comment 2 Merlijn van Deen (test) 2013-12-24 13:35:15 UTC
To be able to present a choice 'English/Dutch/German' or 'English/Nederlands/Duits' instead of 'en/nl/de' (for instance, having two select boxes, one for project and one for language, to select the site to run a query on).
Comment 3 Marc A. Pelletier 2013-12-24 14:31:39 UTC
I'm in general hesitant to include tables of data in the replicas which are simply static copies of data found elsewhere (joins in the database are much, /much/ less efficient than simply looking the data up through a hash/associative array in the application).

In this particular case, a database table would almost certainly not suffice anyways: showing a language name /in that language/ is a hard problem that also necessitates fonts, RTL support, and a number of other tricks to get right.

What I'd be in favour of is to find a good way to make the ULS available to tools as a reusable component instead:

https://www.mediawiki.org/wiki/Universal_Language_Selector

This would solve the problem neatly.
Comment 4 MZMcBride 2013-12-28 16:26:43 UTC
(In reply to comment #3)
> What I'd be in favour of is to find a good way to make the ULS available to
> tools as a reusable component instead:
> 
> https://www.mediawiki.org/wiki/Universal_Language_Selector

This seems reasonable to me. Is there a bug about making ULS reusable?
Comment 5 Marc A. Pelletier 2013-12-28 17:03:52 UTC
I don't think there is, but it seems to me to be valuable enough a component that spinning it off would be worthwhile in itself.  I'll bring the matter up with the Language Engineering team, and try to get a better idea of what work would be needed to do that.
Comment 6 Marc A. Pelletier 2013-12-28 17:11:42 UTC
Adding Santhosh to Cc per Siebrand's suggestion.  He also pointed me at:

http://thottingal.in/projects/js/jquery.uls/examples/

So I expect the answer is "should be simple enough" or even "only needs documentation."  :-)
Comment 7 Siebrand Mazeland 2013-12-28 17:12:43 UTC
(In reply to comment #4)
> This seems reasonable to me. Is there a bug about making ULS reusable?

There doesn't have to be. See https://github.com/wikimedia/jquery.uls
Comment 8 Diederik van Liere 2014-02-05 02:02:46 UTC
@Merlijn: is this a satisfactorily alternative solution?
Comment 9 Marc A. Pelletier 2014-03-26 01:48:29 UTC
We don't have a reasonable 'there is already a better solution available' resolution, so marking fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links