Oh, I see! I understand more now. We didn't test this case but the
problem is not that the On switch is larger than the no one since the
server use only the larger one.

See in htdocs/lib/form/elements/switchbox.php:
$strlength = max(strlen($onlabel), strlen($offlabel));
$width = floor((57 + (($strlength - 2) * 3.5) + pow(1.4, ($strlength - 2)))) . 
'px';

My educated guess is that this formula is incorrect. I admit to do not
understand it but if someone is able to explain it I'll be interested :)

I'm already into rewrite it and I'm pretty sure this will fix this.

-- 
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/1467252

Title:
  Display problem with Switchbox when label strings aren't the same
  length as "On" & "Off"

Status in Mahara:
  In Progress
Status in Mahara 15.10 series:
  Incomplete
Status in Mahara 16.04 series:
  Incomplete
Status in Mahara 16.10 series:
  Incomplete

Bug description:
  It was ok in 15.04 but the the new interface of 15.10dev, the
  translated text for the "switch" options are not displayed correctly.

  1/ When "On", the translated text for "on" is displayed, with the text for 
"off" partially 
  2/ When "Off", the translated text for "off" is displayed centered below the 
the red bullet

  (see inclosed picture)

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1467252/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to