ungettext fix

This commit is contained in:
Braden MacDonald
2014-12-13 20:00:38 -08:00
committed by E. Kolpakov
parent 99c3692902
commit cdf7c6545a
2 changed files with 12 additions and 4 deletions

View File

@@ -1,9 +1,13 @@
<%! from django.utils.translation import ugettext as _ %>
<%! from django.utils.translation import ungettext %>
<div class="wrapper-xblock-message">
<div class="xblock-message information">
<p>
<span class="message-text">
${_('Showing all matching content eligible to be added into {display_name}. Each student will be assigned {max_count} component[s] drawn randomly from this list.').format(max_count=max_count, display_name=display_name)}
${ungettext(
'Showing all matching content eligible to be added into {display_name}. Each student will be assigned {max_count} component drawn randomly from this list.',
'Showing all matching content eligible to be added into {display_name}. Each student will be assigned {max_count} components drawn randomly from this list.',
max_count
).format(max_count=max_count, display_name=display_name)}
</span>
</p>
</div>

View File

@@ -1,6 +1,10 @@
<%!
from django.utils.translation import ugettext as _
from django.utils.translation import ungettext
%>
<div class="xblock-header-secondary">
<p>${_('This component will be replaced by {max_count} component[s] randomly chosen from the {num_children} matching components in {lib_names}.').format(mode=mode, max_count=max_count, num_children=num_children, lib_names=', '.join(library_names))}</p>
<p>${ungettext(
'This component will be replaced by {max_count} component randomly chosen from the {num_children} matching components in {lib_names}.',
'This component will be replaced by {max_count} components randomly chosen from the {num_children} matching components in {lib_names}.',
max_count
).format(max_count=max_count, num_children=num_children, lib_names=', '.join(library_names))}</p>
</div>