aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat_scholar/templates/search.html28
-rw-r--r--fatcat_scholar/templates/search_macros.html4
2 files changed, 25 insertions, 7 deletions
diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html
index 27b1676..d91b78a 100644
--- a/fatcat_scholar/templates/search.html
+++ b/fatcat_scholar/templates/search.html
@@ -3,9 +3,9 @@
{% macro format_query_time(query_time_ms) -%}
{% if query_time_ms >= 10000 %}
- {{ "{:0.3}".format(hits.query_time_ms/1000.0) }}sec
+ {{ "{:0.3}".format(hits.query_time_ms/1000.0) }}
{% else %}
- {{ "{:0.2}".format(hits.query_time_ms/1000.0) }}sec
+ {{ "{:0.2}".format(hits.query_time_ms/1000.0) }}
{% endif %}
{%- endmacro %}
@@ -43,8 +43,16 @@
{% if hits %}
<span class="hit-count" style="font-size: 1.5em;">{{ "{:,}".format(hits.count_found) }}</span>
- Hits
- <span style="color: rgba(0,0,0,0.55);">in {{ format_query_time(hits.query_time_ms) }}</span>
+ {% trans trimmed count=hits.count_found %}
+ Hit
+ {% pluralize %}
+ Hits
+ {% endtrans %}
+ <span style="color: rgba(0,0,0,0.55);">
+ {% trans trimmed frac_sec=format_query_time(hits.query_time_ms) %}
+ in {{ frac_sec }}sec
+ {% endtrans %}
+ </span>
{% else %}
&nbsp;
{% endif %}
@@ -65,10 +73,18 @@
<span class="hit-count" style="display: block; font-size: {{ count_size }};">
{{ "{:,}".format(hits.count_found) }}
</span>
- {{ _("Hits") }}
+ {% trans trimmed count=hits.count_found %}
+ Hit
+ {% pluralize %}
+ Hits
+ {% endtrans %}
</div>
<div style="text-align: end;">
- <span style="color: rgba(0,0,0,0.55);">in {{ format_query_time(hits.query_time_ms) }}</span>
+ <span style="color: rgba(0,0,0,0.55);">
+ {% trans trimmed frac_sec=format_query_time(hits.query_time_ms) %}
+ in {{ frac_sec }}sec
+ {% endtrans %}
+ </span>
</div>
<div class="ui clearing divider"></div>
{% endif %}
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index 879f96a..0c35dd4 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -252,7 +252,9 @@
<button class="ui basic label blue small button" form="search_form" type="submit" name="collapse_key" value="{{ paper.collapse_key }}">
<i class="ui icon zoom-in"></i>
{% trans trimmed count=paper._collapsed_count %}
- Show {{ count }} additional hits from this issue
+ Show {{ count }} additional result from this issue
+ {% pluralize %}
+ Show {{ count }} additional results from this issue
{% endtrans %}
</button>
{% endif %}