In the message store, all messages fall through to English,
but only a few languages should actually explicitly fallback
to English (English variants and dialects).
These new explicit fallbacks are used by ResourceLoaderImageModule,
and this change doesn't affect the message fall through system.
Bug: T203350
Change-Id: I6b68a17f4d69341bccdae748727b5133a600d8bc
It turns out that 'resources/lib/oojs-ui/themes/mediawiki/Moved since v0.20.1, use from the 'interactions' pack instead.'
is not usually an existing file, and doesn't have the extension '.svg'.
Not sure why this didn't break earlier.
Bonus: Add module name to exceptions to make these errors easier
to track down.
Bonus #2: Use the post-expansion, not pre-expansion, definition everywhere
to avoid confusion when debugging.
Change-Id: I0325d4dab5658fd29c3c33fd3e762834b53d1b5d
Previously, in skins using non-default OOUI theme (for example,
in MonoBook skin which uses Apex theme), when using a browser that
we don't serve SVG images to (for example, Internet Explorer 8),
the user would see the default theme's icons. This is noticeable
e.g. with the search box's icon on Special:Search.
Change-Id: I5a563c59efb267d8080161271513c0cc7d90d610
Follows-up b5e69c4ef which did the same for already for ResourceLoader.php.
There's no need to expand the hostname into these urls. If load.php
is on the same domain (e.g. set to '/w/load.php') then this can be
resolved by the browser normally.
If load.php is on a custom domain, the stylesheet would be served
from there instead of from the wiki domain. However in that case
the hostname would already be part of $script value ($wgLoadScript).
Bug: T125292
Change-Id: I7242445335d69d7ae290da5f321a59edd537d819
Some users are reporting that DomDocument::load can't read the files
on their setups, while they can be read with file_get_contents. So use
that and pass the string to DomDocument::loadXml. The advantage of
DomDocument::load is supposed to be in handling large files, and the
icons here are supposed to be small.
Bug: T107198
Change-Id: I8e4dc4642f9d0c5f01ec5e4061e83bf09d0a4900
- Removed space after casts
- Removed spaces in array index
- Added spaces around string concat
- Added space after words: switch, foreach
- else if -> elseif
- Removed parentheses around require_once, because it is not a function
- Added newline at end of file
- Removed double spaces
- Added spaces around operations
- Removed repeated newlines
Bug: T102609
Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
array( "en,de,fr" => "foo.svg" ) now means the same as
array( "en" => "foo.svg", "de" => "foo.svg", "fr" => "foo.svg" ).
Bug: T76539
Change-Id: I0bf82e06be3c5f94b6ac88bbc0437b5229ceb284
- Check $wgSVGConverter to see if it starts with rsvg, instead
of just being rsvg. Other things like rsvg-secure are also ok.
- Make sure SvgHandler::rasterize() returned sanely before attempting
to use the file it produces.
- Clean up temp SVG file if we return early
- Add some debug logging when rasterization fails
Bug: T89505
Change-Id: I9483c8c54a30e328565182b00d50dbf3b83076cd
Update $wgSVGConverters['rsvg'] to something closer to WMF production
configuration (there is a more complicated setup involving two
variants of rsvg for some reason).
Documentation is scarce, but 'rsvg-convert' appears to be the "modern"
way to call rsvg, with 'rsvg' being deprecated or not recommended.
Bug: T76476
Change-Id: I5ed877f3a5a1f1e97ae881c1d03fc977276182b6
ResourceLoaderImageModule needs a set of SVG files and some data in
the module definition, and produces styles for a set of CSS classes,
one for each image, optionally with differently colored variants,
generated in SVG and PNG, data-URI-embedded if possible, compatible
with all browsers, and generally slick.
The intended usage is to ship icon libraries with MediaWiki that can
be used throughout the pages with no additional code.
* ResourceLoaderImageModule implements all of the logic for data
parsing and CSS generation.
* ResourceLoaderImage implements the logic for SVG image colorization
(for variants) and rasterization.
* ResourceLoader and ResourceLoaderContext were extended to serve a
new kind of load.php request that delivers a single image file. This
is used for fallback PNG images served to browsers that don't
understand SVG.
See change Ic6a76bfb for a demo.
Bug: T76473
Co-Authored-By: Trevor Parscal <trevorparscal@gmail.com>
Co-Authored-By: Bartosz Dziewoński <matma.rex@gmail.com>
Change-Id: Idf6ff4eb8e94f45946f15d283d34108b881fae6e