Extract list of languages svg is translated into.
authorBrian Wolff <bawolff+wn@gmail.com>
Thu, 24 Oct 2013 22:11:59 +0000 (19:11 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Fri, 6 Dec 2013 23:24:22 +0000 (19:24 -0400)
commit960b23861890f2721a0a0f5fb6cbd5885684efa7
tree16d0781b5669242379542c929c324a923b2f6c4e
parent37bc4ec3ddf5e3065ea3b22998e7f9b2db4ba1c7
Extract list of languages svg is translated into.

SVG files support having different renderings based on language.
We support changing the rendering language, but we offer no
discoverability of what languages are available.

Long term Jarry's TranslateSVG will hopefully be used and have
all the associated awesomeness. In the mean time, we should
probably have some indication on the image page what languages
are available for the SVG. This is step 1 (extract the language).
I expect to follow this up with a commit adding some sort of
simple selector on the image page.

As an aside, it should be noted, this only detects languages
if its in the first $wgSVGMetadataCutoff (256 kb). This is a
compromise to avoid OOM on huge SVG files.

Change-Id: I2a462270fe63eb3e3023419eddc8b06f5a617ab5
includes/media/SVGMetadataExtractor.php
tests/phpunit/data/media/README
tests/phpunit/data/media/Speech_bubbles.svg [new file with mode: 0644]
tests/phpunit/includes/media/SVGMetadataExtractorTest.php