Commit 8b355c8f authored by Nigel McNie's avatar Nigel McNie
Browse files

Fix for bug #1672 - made some strings in the artefact chooser translatable.

Namely: the string saying how many results there are, and the string that says there are no artefacts to choose from.
parent 63a80723
......@@ -60,7 +60,7 @@ var Paginator = function(id, datatable, script, extradata) {
// Update the result count
var results = getFirstElementByTagAndClassName('div', 'results', self.id);
if (results) {
results.innerHTML = data['data']['count'] + ' results'; // TODO i18n
results.innerHTML = data['data']['results'];
}
}
});
......
......@@ -119,4 +119,6 @@ $string['clickformoreinformation'] = 'Click for more information and to place fe
$string['From'] = 'From';
$string['To'] = 'To';
$string['noartefactstochoosefrom'] = 'Sorry, no artefacts to choose from';
?>
......@@ -220,7 +220,7 @@ if (ul) {
// Update the result count
var results = getFirstElementByTagAndClassName('div', 'results', p.id);
if (results) {
results.innerHTML = data['data']['count'] + ' results'; // TODO i18n and pluralisation
results.innerHTML = data['data']['results'];
}
});
});
......
......@@ -17,7 +17,7 @@
</table>
{$pagination}
{else}
<p class="noartefacts">Sorry, no artefacts to choose from</p>
<p class="noartefacts">{str tag=noartefactstochoosefrom section=view}</p>
{/if}
</div>
</div>
......@@ -45,7 +45,8 @@ json_reply(false, array(
'tablerows' => $html,
'pagination' => $pagination['html'],
'pagination_js' => $pagination['javascript'],
'count' => $count
'count' => $count,
'results' => $count . ' ' . ($count == 1 ? get_string('result') : get_string('results')),
)
));
......
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