-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mark for i18n, handle case where count = -1
- Loading branch information
1 parent
7456c0a
commit a895646
Showing
2 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,39 @@ | ||
{% load i18n %} | ||
<div style="padding: 1em"> | ||
{% if block_count > 0 %} | ||
<p>Learners will see {{ max_count }} of the {{ block_count }} selected components:</p> | ||
{% if max_count == -1 %} | ||
<p> | ||
{% blocktrans count num_selected=block_count %} | ||
Learners will see the selected component: | ||
{% plural %} | ||
Learners will see all of the {{ num_selected }} selected components, in random order: | ||
{% endblocktrans %} | ||
</p> | ||
{% else %} | ||
<p> | ||
{% blocktrans with max_count=max_count count num_selected=block_count %} | ||
Learners will see the selected component: | ||
{% plural %} | ||
Learners will see {{ max_count }} of the {{ num_selected }} selected components: | ||
{% endblocktrans %} | ||
</p> | ||
{% endif %} | ||
<ol style="list-style: decimal; margin-left: 2em;"> | ||
{% for block in blocks %} | ||
<li>{{ block.display_name }}</li> | ||
{% endfor %} | ||
</ol> | ||
<p style="color: var(--gray);">Press <a href="/container/{{ item_bank_id }}">View</a> to preview, sync/update, and/or remove the selected components.</p> | ||
<p style="color: var(--gray);">Press <a role="button" href="#" class="edit-button action-button">Edit</a> to configure how many will be shown and other settings.</p> | ||
<p style="color: var(--gray);"> | ||
{% blocktrans with prefix="/container/" item_bank_id=item_bank_id %} | ||
Press <a href="{{prefix}}{{item_bank_id}}">View</a> to preview, sync/update, and/or remove the selected components. | ||
{% endblocktrans %} | ||
</p> | ||
<p style="color: var(--gray);"> | ||
{% blocktrans with link='role="button" href="#" class="edit-button action-button"'|safe %} | ||
Press <a {{link}}>Edit</a> to configure how many will be shown and other settings. | ||
{% endblocktrans %} | ||
</p> | ||
{% else %} | ||
<p>You have not selected any components yet.</p> | ||
<p>{% trans "You have not selected any components yet." %}</p> | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{% load i18n %} | ||
<div class="insert-new-lib-blocks-here"></div> | ||
<div class="xblock-header-secondary"> | ||
{% comment %} | ||
How does this button work? An event handler in cms/static/js/views/pages/container.js | ||
How this button works: An event handler in cms/static/js/views/pages/container.js | ||
will watch for clicks and then display the SelectV2LibraryContent modal and process | ||
the list of selected blocks returned from the modal. | ||
{% endcomment %} | ||
<button class="btn btn-primary problem-bank-v2-add-button"> | ||
<span class="icon fa fa-plus" aria-hidden="true"></span> | ||
Add components | ||
</button> from a content library to this problem bank. | ||
</div> | ||
{# Translators: This is the button label that appears before the separate "from a content library to this problem bank." message. #} | ||
{% trans "Add components" %} | ||
</button> | ||
{# Translators: This text appears immediately after the "Add components" button. If it's difficult to translate directly, replace this with an empty string to hide it. #} | ||
{% trans "from a content library to this problem bank." %} | ||
</div> |