Make sure CMD doesn't overwrite itself

This fixes some issues when CMD is installed both on the repo and on
the local wiki, and repo data is overwritten with inferior local data.

Change-Id: I9d5ad481cc04c1d43d1b512586c0284094d00455
Use standard multilang arrays

When the iiextmetadatamultilang parameter is used, return an
array with the matching part for fields which contain multiple
languages (e.g. description) instead of returning it all as a
single string.

Change-Id: I15cf0eefe9ae58e9e72735bb82589029920b6e0f
Merge "Use standard multilang arrays"
Consistency tweak in preparation for adding extension to translatewiki.net

* Remove . from end of description

Change-Id: I366d3c3f2cd738db7afda7fcbba5c550ed7e462d
Unbreak translatewiki.net scripts

Change-Id: I60ca7ce80d09bee35d4ae33bfdbc74fdf45786fb
Localisation updates from http://translatewiki.net.

Change-Id: I3fc582a5bbbafd313e6269179c47197887024483
Localisation updates from http://translatewiki.net.

Change-Id: I4857de6b781202e972ea753746746d7a87c2876a
Localisation updates from http://translatewiki.net.

Change-Id: I31fe29bd3cb2d6ddac9783b6f44ad0f35fe046c7
Make category-related code more readable

Change-Id: I73801d23e53eb822421c430d2dd094ce82a9c646
Use description HTML structure instead of categories to identify license

Categories do not always work due to bug 56598.

Bug: 56143
Change-Id: Ibaf09360041408e9bf9692056572f5b23b7f7c08
Trim license shortnames

Apparently some templates put a \n to the end.

Change-Id: I6a8733bfb2e63a1284422bd9da7efadc26c26bae
Handle multiple license templates

Allows CMD properties to be defined as multivalued, in which case
values will be collected in an array instead of overwriting each
other. On output it will still throw away all but the last value,
but until then internal functions can access all of them.

The license matcher uses this feature to look through multiple
short names so multi-licensed images will be handled correctly if
any one of the licenses can be recongized.

Bug: 56687
Change-Id: If2732dd2eb7150c9ccfc4e82f4dcbf9a479a0fa9
Localisation updates from http://translatewiki.net.

Change-Id: I76993c29397f08b95966b02ecd8454526cd94115
Localisation updates from http://translatewiki.net.

Change-Id: I79e7dea0fa5c8a50afb9716814e49624fda272f5
Localisation updates from http://translatewiki.net.

Change-Id: I556eebe4c1698278a1d99b0bc9879e51c1e09bd2
Return assessment level

Tries to guess image assessment level (quality, featured etc) from Commons categories.

Change-Id: I137607bb38ee4ceba23b738fd86cc8c713290874
Merge "Handle multiple license templates"
Localisation updates from http://translatewiki.net.

Change-Id: I0c44fb4f2e4923c6c0721eba94337684497be157
Handle remote categories in a ForeignDBRepo setup

Depends on core patch Ice972f023c676b5857707ccf58ee108585a7f021

Bug: 56598
Change-Id: Icbffecfa4d3679c1a5a3560ac085dd3775290a6d
Add generic CC license parsing

All the possible combinations of license type / version / country
was getting awkward to handle by a fixed whitelist, so it is now
replaced by splitting to license name to parts, and trying to
recognize them.

The disadvantage is that some invalid license names are accepted
(like CC-SA-BY-1.0 or CC-BY-SA-3.0-XX) - this should be of no
practical consequence.

Change-Id: I85af37607db3752b58e577d7ba2a53e91c49113a