Page layout thumbnails are broken if you use a locale that does commas for decimals
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Robert Lyon | ||
15.04 |
Fix Released
|
Medium
|
Robert Lyon | ||
15.10 |
Fix Released
|
Medium
|
Robert Lyon |
Bug Description
This bug is a follow-up to Bug 1461040. The code in Mahara that generates SVG files for page layouts, breaks if you are using a locale that does commas for decimals, instead of periods. e.g. one half is "0,5" rather than "0.5".
Here's a quote from the other bug:
I also encountered this after beginning with translation of Mahara 15.04 into Estonian. As the locale setting have also been changed the values returned by PHP (please correct me if I am wrong) will be comma separated and not separated with decimal point (due to Estonian representation of float numbers). So Peter probably sees only the SVG images which are not returned with float values. Small output of false return values which are not rendered by browser: <rect x="52,2" y="18"..></rect>. (should be x="52.2")
This also affects gallery where the images should be centered but due to false float values are not.
The fix provided at the moment helps, but does not solve the float number representation. I have chosen to replace "," in returned values with "." in layoutpreviewim
I hope this helps a bit.
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/4838