mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #09057
[Bug 996987] A change has been merged
Reviewed: https://reviews.mahara.org/1204
Committed: http://gitorious.org/mahara/mahara/commit/21e485836870940a9b0435038995c6caec862401
Submitter: Hugh Davenport (hugh@xxxxxxxxxxxxxxx)
Branch: 1.5_STABLE
commit 21e485836870940a9b0435038995c6caec862401
Author: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
Date: Thu May 10 11:04:39 2012 +1200
Don't run pluralrule string through sprintf (bug #996987)
The pluralrule string is used to generate plural forms in javascript,
so % signs should not be replaced. Using get_raw_string rather than
get_string reads the string as-is, without running it through sprintf.
Change-Id: I709b8ef623cdc4df24828866dc62dd229107ef60
Signed-off-by: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/996987
Title:
sprintf function problems with pluralrule
Status in Mahara ePortfolio:
Fix Committed
Bug description:
sprintf function, used by smarty has problems with pluralrule which
contains percent (%) sign.
I've used quite some time to find out that I need to use double
percent sign to make this work.
If pluralrule string is translated via launchpad Mahara Translations,
than there should be note, warning people of that, but if it is
created programmatically than single percent signs in pluralrule
string should be replaced with dobule percent signs.
This musn't be confused with the string that appears in plural
function though!!!
'Original' string (for Slovenian) as it appears in Launchpad Slovenian Language Details page (https://translations.launchpad.net/mahara-lang/trunk/+pots/mahara/sl/+details)
$string['pluralrule'] = '(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0)';
'Corrected' string (single % replaced with double %% - which sprintf can "digest")
$string['pluralrule'] = '(n%%100==1 ? 1 : n%%100==2 ? 2 : n%%100==3 || n%%100==4 ? 3 : 0)';
AFAIK the affected languages could be:
- Arabic
- Croatian
- Romanian
- Russian
- Slovenian
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/996987/+subscriptions
References