mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #19411
[Bug 1328760] A change has been merged
Reviewed: https://reviews.mahara.org/3439
Committed: http://gitorious.org/mahara/mahara/commit/a6ebd6beee38476b2ae297783a5079f2bcd8344f
Submitter: Yuliya Bozhko (yuliya.bozhko@xxxxxxxxx)
Branch: master
commit a6ebd6beee38476b2ae297783a5079f2bcd8344f
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Fri Jun 13 13:40:45 2014 +1200
Pluralize this string even though it's not currently used (Bug 1328760)
The way the code is written, the count passed to "participantsmany" will
always be 2 or more. Therefore, the singular version of this string will
never be used, the way the code is currently written.
However, I think it's a good idea to store it as a proper pluralizable string
anyway, because having it as an array may be necessary in order for it to get
detected as a pluralizable string by the software translators are using. And
it's also possible that future code development could result in the number 1
getting passed to this string.
Change-Id: I87487e2cb64de53b144b19162392b3c0adda860c
--
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/1328760
Title:
Improvements to activity stream body helper
Status in Mahara ePortfolio:
New
Bug description:
Aaron reported the following when reviewing the activity stream block
patch:
1. There are some strings with counts in them that need to be changed
to the flexible plural format.
2. There's a big chain of if-elses in lib/activity.php starting on
line 1055, which are for sending different sets of parameters to
get_string depending on what was passed in. I suspect we may be able
to reduce that by using sprintf positional parameters.
The patch will fix the above and more. The changes include the
following:
- Removed the big if-then-else statement. Now, all params are passed to all activity stream strings and the string specifies which params to use where, using parameter position notation (e.g. "%1$d"). As a result of this there was a lot of simplification of the code (not just the big "if").
- Made several strings pluralized where applicable.
- The 'viewer' can be passed in to the helper function. All strings in the helper now user the specified user's language, rather than defaulting to $USER.
- In ActivityTypeArtefactCommentFeedback, the object type name is now being calculated using ActivityType::get_object_type_name, which simplifies the code.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1328760/+subscriptions
References