mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #27465
[Bug 1468144] Re: Page layout thumbnails are broken if you use a locale that does commas for decimals
To replicate the gallery block issues:
0. Set your locale to Dutch as described in my previous comment.
1. Log in to Mahara
2. Go to Content -> Files. Create a folder. Put some images in there. Make sure at least one of them is wider than it is tall (i.e., landscape)
3. Go to Portfolio -> Pages. Create a page. Put an "Image gallery" block on the page. Select the folder that you uploaded your images into.
4. Set the "style" for the gallery block to "Thumbnails (square)"
5. View the page
Expected result: The landscape-ratio pictures should show up as
thumbnails inside a square box. They should be vertically centered in
the middle of the square box.
Actual result: The landscape-ratio thumbnails are floating up against
the top of their surrounding box.
In my testing, this bug only affected landscape images, not portrait
images.
** Changed in: mahara
Status: New => In Progress
** Also affects: mahara/15.04
Importance: Undecided
Status: New
** Also affects: mahara/15.10
Importance: Undecided
Status: In Progress
** Changed in: mahara/15.10
Milestone: None => 15.10.0
** Changed in: mahara/15.04
Milestone: None => 15.04.2
** Changed in: mahara/15.04
Status: New => In Progress
** Changed in: mahara/15.10
Importance: Undecided => Medium
** Changed in: mahara/15.04
Importance: Undecided => Medium
** Changed in: mahara/15.10
Assignee: (unassigned) => Robert Lyon (robertl-9)
** Changed in: mahara/15.04
Assignee: (unassigned) => Robert Lyon (robertl-9)
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1468144
Title:
Page layout thumbnails are broken if you use a locale that does commas
for decimals
Status in Mahara ePortfolio:
In Progress
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
In Progress
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 layoutpreviewimage.php and it has "solved" the problem. I
am open for better solutions.
I hope this helps a bit.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1468144/+subscriptions
References