Comment 6 for bug 1461040

Revision history for this message
Aaron Wells (u-aaronw) wrote :

To clarify (because I think it wasn't spelled out in Robert's or my earlier comments), the cause of the problem here is that the code that generates those layout thumbnails is parsing some lang strings that describe the percentage of width of columns.

In the core en-utf8 langpack, these strings look like this:

$string['100'] = '100';
$string['50,50'] = '50-50';
$string['33,33,33'] = '33-33-33';
$string['25,25,25,25'] = '25-25-25-25';
$string['20,20,20,20,20'] = '20-20-20-20-20';
$string['67,33'] = '67-33';
$string['33,67'] = '33-67';
$string['25,25,50'] = '25-25-50';
$string['50,25,25'] = '50-25-25';
$string['25,50,25'] = '25-50-25';
$string['15,70,15'] = '15-70-15';
$string['20,30,30,20'] = '20-30-30-20';

In the German langpack, they have been changed to this:

$string['100'] = 'Gleiche Spaltenbreite';
$string['15,70,15'] = 'Viel größere mittlere Spalte';
$string['20,20,20,20,20'] = 'Gleiche Spaltenbreite';
$string['20,30,30,20'] = 'Größere Mittelspalten';
$string['25,25,25,25'] = 'Gleiche Spaltenbreite';
$string['25,25,50'] = '25-25-50';
$string['25,50,25'] = 'Größere mittlere Spalte';
$string['33,33,33'] = 'Gleiche Spaltenbreite';
$string['33,67'] = 'Größere rechte Spalte';
$string['50,25,25'] = '50-25-25';
$string['50,50'] = 'Gleiche Spaltenbreite';
$string['67,33'] = 'Größere linke Spalte';

This is a bug in Mahara. We should not be parsing the values of language strings. Robert's fix is to change the code so that instead it parses the string *identifiers* (e.g., "100", "15,70,15", etc).