Last modified: 2014-07-18 12:07:44 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 T21891, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19891 - Allow for fallback languages in i18n map rendering
Allow for fallback languages in i18n map rendering
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
SlippyMaps (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://svn.wikimedia.org/viewvc/media...
: testme
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-23 07:52 UTC by Ævar Arnfjörð Bjarmason
Modified: 2014-07-18 12:07 UTC (History)
3 users (show)

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


Attachments

Description Ævar Arnfjörð Bjarmason 2009-07-23 07:52:18 UTC
Currently we just do:

    case when "name:$code" is not null then "name:$code" else name end as name

But some languages would like to have more complex fallbacks, e.g. "hsb" would like to fallback to "de" and then the generic name.

So we need a machine-readable list of such language fallbacks, or make one if it doesn't exist.

In the latter case it might be conductive to completeness to implement it via a extension i18n message so people can translate it via the MediaWiki namespace, e.g.:

    hsb:MediaWiki:SlippyMap-rendering-language-fallbacks: de, _generic

Then we can periodically run a script which pulls those messages down & updates our list of fallbacks.
Comment 1 Raimond Spekking 2009-07-23 08:01:01 UTC
Just a thought for a script to build such a list:

MessagesHsb.php has an entry:

$fallback = 'de';


Grep all MessagesXx.php files and follow all fallbacks.
Comment 2 Ævar Arnfjörð Bjarmason 2009-07-23 08:12:23 UTC
Yeah, sweet:

avar@aoeu:~/mw$ egrep -r '^\$fallback\s*=' languages/messages/*php | perl -pE 's/.*?Messages(.*?)\.php:.*?=\s*.(.*?).;/\l$1 = $2/g; s/_/-/g'|sort
ab = ru
ace = id
aln = sq
als = gsw
an = es
arn = es
arz = ar
as = bn
av = ru
ay = es
bar = de
ba = ru
bat-smg = lt
bcc = fa
be-x-old = be-tarask
bm = fr
bpy = bn
bqi = fa
bug = id
cbk-zam = es
ce = ru
ckb = ckb-arab
ckb-latn = ckb-arab
crh = crh-latn
crh-cyrl = ru
cv = ru
de-at = de
de-ch = de
de-formal = de
dk = da
dsb = de
eml = it
en = als
ff = fr
fiu-vro = vro
frp = fr
fur = it
gag = tr
gan = gan-hant
gan-hans = zh-hans
gan-hant = zh-hant
glk = fa
gn = es
gsw = de
hif = hif-latn
hsb = de
ht = fr
ii = zh-cn
inh = ru
iu = ike-cans
jut = da
jv = id
kaa = kk-latn
kk-arab = kk-cyrl
kk-cn = kk-arab
kk = kk-cyrl
kk-kz = kk-cyrl
kk-latn = kk-cyrl
kk-tr = kk-latn
kl = da
ksh = de
ku-arab = ckb-arab
ku = ku-latn
kv = ru
lad = es
lb = de
lbe = ru
lij = it
li = nl
lld = it
lmo = it
ln = fr
mai = hi
map-bms = jv
mg = fr
mhr = ru
mo = ro
mwl = pt
myv = ru
mzn = fa
nah = es
nap = it
nb = no
nds = de
nds-nl = nl
os = ru
pdc = de
pdt = de
pfl = de
pms = it
pt-br = pt 
qu = es
rmy = ro
ruq-cyrl = mk
ruq-grek = el
ruq-latn = ro
ruq = ruq-latn
sa = hi
sah = ru
scn = it
sg = fr
shi = ar
simple = en
sli = de
srn = nl
sr = sr-ec
stq = de
su = id
szl = pl
tcy = kn
tg = tg-cyrl
tp = tokipona
tt-cyrl = ru
tt = tt-latn
ty = fr
udm = ru
ug = ug-latn
uk = ru
vec = it
vep = et
vls = nl
vro = et
wa = fr
wo = fr
wuu = zh-hans
xmf = ka
ydd = yi
yi = he
za = zh-hans
zea = nl
zh-classical = lzh
zh-cn = zh-hans
zh-hant = zh-hans
zh-hk = zh-hant
zh-min-nan = nan
zh-mo = zh-hk
zh-my = zh-sg
zh-sg = zh-hans
zh-tw = zh-hant
zh-yue = yue
zh = zh-hans
Comment 3 Niklas Laxström 2012-09-25 23:42:52 UTC
Is this code still in use?
Comment 4 Andre Klapper 2012-10-11 13:40:55 UTC
Is this code still in use?

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


Navigation
Links