Page MenuHomePhabricator

Mediawiki. Html::srcSet(...). Invalid srcset creation depending on $wgShellLocale setting.
Closed, DuplicatePublic


  • Mediawiki 1.31.1.
  • tested with current FireFox 64.0/64-bit.
  • In LocalSettings.php set
$wgShellLocale = "de_DE.utf8";
$wgResponsiveImages = true;
  • Upload an image, e.g. 'Osmbanner2.png'.
  • In a page (editing) insert


  • Save the page.
  • Result: First image is displayed.

Second one not. One see only the ALT-Text.

  • Reason: Output of the image contains an invalid comma (1,5x) instead of a dot (1.5x) in srcset part
<div class="thumb tnone">
 <div class="thumbinner" style="width:302px;">
  <a href="/index.php?title=Datei:Osmbanner2.png" class="image">

   <img alt="Osmbanner2.png" src="/images/thumb/9/92/Osmbanner2.png/300px-Osmbanner2.png" class="thumbimage"
    srcset="/images/thumb/9/92/Osmbanner2.png/450px-Osmbanner2.png 1,5x
    ... and so on ...
  • In file includes/Html.php line 1044:
$density = (string)(float)$density;

The float function is processed with german locale.