Commit d10b1993 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic

Bug 1053308: export section - plural strings format fix

behatnotneeded

Change-Id: Ie98a2f97da4db41565bc5a72ae7f270e0020d8b0
parent e785dd1b
......@@ -47,10 +47,7 @@ class HtmlExportBlog extends HtmlExportArtefactPlugin {
}
if ($blogs) {
$smarty->assign('blogs', $blogs);
$stryouhaveblogs = (count($blogs) == 1)
? get_string('youhaveoneblog', 'artefact.blog')
: get_string('youhaveblogs', 'artefact.blog', count($blogs));
$stryouhaveblogs = get_string('youhavenblog', 'artefact.blog', count($blogs), count($blogs));
}
else {
$stryouhaveblogs = get_string('youhavenoblogs', 'artefact.blog');
......
......@@ -161,8 +161,10 @@ $string['youhavenoblogs'] = 'You have no journals.';
$string['youhavenogroupblogs'] = 'There are no journals in this group.';
$string['youhavenoinstitutionblogs'] = 'There are no journals in this institution.';
$string['youhavenositeblogs'] = 'There are no site journals.';
$string['youhaveoneblog'] = 'You have 1 journal.';
$string['youhaveblogs'] = 'You have %s journals.';
$string['youhavenblog'] = array(
'You have 1 journal.',
'You have %d journals.'
);
$string['feedsnotavailable'] = 'Feeds are not available for this artefact type.';
$string['feedrights'] = 'Copyright %s.';
......
......@@ -44,8 +44,12 @@ class HtmlExportPlans extends HtmlExportArtefactPlugin {
}
$smarty->assign('plans', $plans);
if (count($plans)) {
$smarty->assign('stryouhaveplans', get_string('youhavenplan', 'artefact.plans', count($plans), count($plans)));
}
return array(
'title' => get_string('plans', 'artefact.plans'),
'title' => get_string('Plans', 'artefact.plans'),
'description' => $smarty->fetch('export:html/plans:summary.tpl'),
);
}
......
......@@ -39,6 +39,10 @@ $string['planstasksdescription'] = 'Add tasks below or use the "%s" button to be
$string['saveplan'] = 'Save plan';
$string['title'] = 'Title';
$string['titledesc'] = 'The title will be used to display each task in the plans blocktype.';
$string['youhavenplan'] = array(
'You have 1 plan.',
'You have %d plans.'
);
/* Tasks */
$string['alltasks'] = 'All tasks';
......
......@@ -476,10 +476,7 @@ class PluginExportHtml extends PluginExport {
if (!empty($list['views'])
&& ($this->viewexportmode == self::EXPORT_ALL_VIEWS_COLLECTIONS
|| $this->viewexportmode == self::EXPORT_LIST_OF_VIEWS)) {
$stryouhaveviews = ($nviews == 1)
? get_string('youhaveoneview', 'view')
: get_string('youhaveviews', 'view', $nviews);
$smarty->assign('stryouhaveviews', $stryouhaveviews);
$smarty->assign('stryouhaveviews', get_string('youhavenviews', 'view', $nviews, $nviews));
$smarty->assign('list', $list['views']);
$summary['view'] = array(
'title' => get_string('Views', 'view'),
......@@ -493,10 +490,7 @@ class PluginExportHtml extends PluginExport {
if (!empty($list['collections'])
&& ($this->viewexportmode == self::EXPORT_ALL_VIEWS_COLLECTIONS
|| $this->viewexportmode == self::EXPORT_LIST_OF_COLLECTIONS)) {
$stryouhavecollections = ($ncollections == 1)
? get_string('youhaveonecollection', 'collection')
: get_string('youhavecollections', 'collection', $ncollections);
$smarty->assign('stryouhavecollections', $stryouhavecollections);
$smarty->assign('stryouhavecollections', get_string('youhavencollections', 'collection', $ncollections, $ncollections));
$smarty->assign('list', $list['collections']);
$summary['collection'] = array(
'title' => get_string('Collections', 'collection'),
......
......@@ -116,8 +116,10 @@ $string['copiedpagesblocksandartefactsfromtemplate'] = 'Copied %d pages, %d bloc
$string['copiedblogpoststonewjournal'] = 'Copied journal posts have been put into a new separate journal.';
$string['by'] = 'by';
$string['copycollection'] = 'Copy collection';
$string['youhaveonecollection'] = 'You have 1 collection.';
$string['youhavecollections'] = 'You have %s collections.';
$string['youhavencollections'] = array(
'You have 1 collection.',
'You have %d collections.',
);
$string['youhavenocollections'] = 'You have no collections.';
$string['collectionssharedtogroup'] = 'Collections shared with this group';
$string['nosharedcollectionsyet'] = 'There are no collections shared with this group yet';
......
......@@ -101,8 +101,10 @@ $string['nviews'] = array(
);
$string['youhavenoviews1'] = 'You don\'t have any pages or collections.';
$string['youhaventcreatedanyviewsyet'] = "You have not created any pages yet.";
$string['youhaveoneview'] = 'You have 1 page.';
$string['youhaveviews'] = 'You have %s pages.';
$string['youhavenviews'] = array(
'You have 1 page.',
'You have %d pages.',
);
$string['viewsownedbygroup'] = 'Pages owned by this group';
$string['nogroupviewsyet'] = 'There are no pages in this group yet';
$string['viewssharedtogroup'] = 'Pages shared with this group';
......
<p>{$stryouhaveplans}</p>
{if $plans}
<ul>
{foreach from=$plans item=plan}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment