mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-25 09:30:33 +00:00
Merge pull request #1639 from hughrun/shelfnames
add translation strings
This commit is contained in:
commit
9ee248033d
7 changed files with 33 additions and 11 deletions
|
@ -18,7 +18,7 @@
|
|||
</p>
|
||||
<form name="directory" method="POST" action="{% url 'directory' %}">
|
||||
{% csrf_token %}
|
||||
<button class="button is-primary" type="submit">Join Directory</button>
|
||||
<button class="button is-primary" type="submit">{% trans "Join Directory" %}</button>
|
||||
<p class="help">
|
||||
{% url 'prefs-profile' as path %}
|
||||
{% blocktrans with path=path %}You can opt-out at any time in your <a href="{{ path }}">profile settings.</a>{% endblocktrans %}
|
||||
|
@ -28,7 +28,7 @@
|
|||
<div class="column is-narrow">
|
||||
{% trans "Dismiss message" as button_text %}
|
||||
<button type="button" class="delete set-display" data-id="hide_join_directory" data-value="true">
|
||||
<span>Dismiss message</span>
|
||||
<span>{% trans "Dismiss message" %}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div></div>
|
||||
|
|
|
@ -4,9 +4,14 @@
|
|||
|
||||
<div class="select is-small mt-1 mb-3">
|
||||
<select name="{{ book.id }}" aria-label="{% blocktrans with book_title=book.title %}Have you read {{ book_title }}?{% endblocktrans %}">
|
||||
<option disabled selected value>Add to your books</option>
|
||||
<option disabled selected value>{% trans 'Add to your books' %}</option>
|
||||
{% for shelf in user_shelves %}
|
||||
<option value="{{ shelf.id }}">{{ shelf.name }}</option>
|
||||
<option value="{{ shelf.id }}">
|
||||
{% if shelf.identifier == 'to-read' %}{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}{% trans "Read" %}
|
||||
{% else %}{{ shelf.name }}{% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<header class="columns is-mobile">
|
||||
<div class="column">
|
||||
<h3 class="title is-5">
|
||||
Results from
|
||||
{% trans 'Results from' %}
|
||||
<a href="{{ result_set.connector.base_url }}" target="_blank">{{ result_set.connector.name|default:result_set.connector.identifier }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
|
|
@ -80,7 +80,10 @@
|
|||
<div class="block columns is-mobile">
|
||||
<div class="column">
|
||||
<h2 class="title is-3">
|
||||
{{ shelf.name }}
|
||||
{% if shelf.identifier == 'to-read' %}{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}{% trans "Read" %}
|
||||
{% else %}{{ shelf.name }}{% endif %}
|
||||
<span class="subtitle">
|
||||
{% include 'snippets/privacy-icons.html' with item=shelf %}
|
||||
</span>
|
||||
|
|
|
@ -22,7 +22,15 @@
|
|||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="change-shelf-from" value="{{ current.identifier }}">
|
||||
<input type="hidden" name="shelf" value="{{ shelf.identifier }}">
|
||||
<button class="button is-fullwidth is-small shelf-option is-radiusless is-white" type="submit" {% if shelf in book.shelf_set.all %} disabled {% endif %}><span>{{ shelf.name }}</span></button>
|
||||
|
||||
<button class="button is-fullwidth is-small shelf-option is-radiusless is-white" type="submit" {% if shelf.identifier == current.identifier %}disabled{% endif %}>
|
||||
<span>
|
||||
{% if shelf.identifier == 'to-read' %}{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}{% trans "Read" %}
|
||||
{% else %}{{ shelf.name }}{% endif %}
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
{% else%}
|
||||
|
|
|
@ -29,8 +29,13 @@
|
|||
<div class="columns is-mobile scroll-x">
|
||||
{% for shelf in shelves %}
|
||||
<div class="column is-narrow">
|
||||
<h3>{{ shelf.name }}
|
||||
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">{% blocktrans with size=shelf.size %}View all {{ size }}{% endblocktrans %}</a>)</small>{% endif %}</h3>
|
||||
<h3>
|
||||
{% if shelf.name == 'To Read' %}{% trans "To Read" %}
|
||||
{% elif shelf.name == 'Currently Reading' %}{% trans "Currently Reading" %}
|
||||
{% elif shelf.name == 'Read' %}{% trans "Read" %}
|
||||
{% else %}{{ shelf.name }}{% endif %}
|
||||
{% if shelf.size > 3 %}<small>(<a href="{{ shelf.local_path }}">{% blocktrans with size=shelf.size %}View all {{ size }}{% endblocktrans %}</a>)</small>{% endif %}
|
||||
</h3>
|
||||
<div class="is-mobile field is-grouped">
|
||||
{% for book in shelf.books %}
|
||||
<div class="control">
|
||||
|
@ -49,7 +54,8 @@
|
|||
|
||||
{% if goal %}
|
||||
<div class="block">
|
||||
<h2 class="title">{% now 'Y' %} Reading Goal</h2>
|
||||
{% now 'Y' as current_year%}
|
||||
<h2 class="title">{% blocktrans %}{{ current_year }} Reading Goal{% endblocktrans %}</h2>
|
||||
{% include 'snippets/goal_progress.html' with goal=goal %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -19,7 +19,7 @@ def request_isni_data(search_index, search_term, max_records=5):
|
|||
"recordPacking": "xml",
|
||||
"sortKeys": "RLV,pica,0,,",
|
||||
}
|
||||
result = requests.get("http://isni.oclc.org/sru/", params=query_params, timeout=10)
|
||||
result = requests.get("http://isni.oclc.org/sru/", params=query_params, timeout=15)
|
||||
# the OCLC ISNI server asserts the payload is encoded
|
||||
# in latin1, but we know better
|
||||
result.encoding = "utf-8"
|
||||
|
|
Loading…
Reference in a new issue