mw.widgets.CategoryCapsuleItemWidget: Handle non-English foreign wikis
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 9 May 2016 22:04:15 +0000 (00:04 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 9 May 2016 22:14:41 +0000 (00:14 +0200)
commit17b6317374329e8da9ae9cc8f6ad9e7972bc069c
tree2b42b65682136d6de71d2870a788ad9fc0213268
parent7864f3180797dcc6aa2efe7dac2cebe438a955c0
mw.widgets.CategoryCapsuleItemWidget: Handle non-English foreign wikis

To be precise: when the language of the foreign wiki is different than
the language of the local wiki, and it's not English, things go bad
when we're checking for page existence (to display blue/red link).

Just assume that any namespace-like prefix is the 'Category' namespace.
This is a horrible hack, but it's better than throwing exceptions.

This doesn't fix the fact that suggestions in mw.widgets.CategorySelector
are missing, but that isn't causing exceptions, so it can wait.

Change-Id: I3ed11a9d7a1d87c0f43c0a988fe4a8db5b8a907c
resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js