1. Extract the full sentence rather than parital of a sentence, so that languages with different word orders than English can benifit from this. 2. Using ngettext instead of gettext with 'xxx(s)', as Transifex treats `()` as special characters so that it enforces the translated string must have the same number of `()` pairs. Such enforcement makes translations difficult, as not every language can use forms like 'xxx(s)' to represent both singular & plural within a single word.
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
<div class = "validation-error-modal-content">
|
|
<div class "error-header">
|
|
<p>
|
|
<%= _.template(
|
|
ngettext(
|
|
"There was {strong_start}{num_errors} validation error{strong_end} while trying to save the course settings in the database.",
|
|
"There were {strong_start}{num_errors} validation errors{strong_end} while trying to save the course settings in the database.",
|
|
num_errors
|
|
),
|
|
{
|
|
strong_start:'<strong>',
|
|
num_errors: num_errors,
|
|
strong_end: '</strong>'
|
|
},
|
|
{interpolate: /\{(.+?)\}/g})%>
|
|
<%= gettext("Please check the following validation feedbacks and reflect them in your course settings:")%></p>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<ul class = "error-list">
|
|
<% _.each(response, function(value, index, list) { %>
|
|
|
|
<li class = "error-item">
|
|
<span class='error-item-title'>
|
|
<i class="icon fa fa-warning"></i>
|
|
<strong><%= value.model.display_name %></strong>:
|
|
</span>
|
|
<textarea class = "error-item-message" disabled='disabled'><%=value.message%></textarea>
|
|
</li>
|
|
|
|
<% }); %>
|
|
</ul>
|
|
</div>
|