1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 08:40:00 +00:00

Fancy grammar in your anime torrents

This commit is contained in:
TheAMM 2017-05-24 21:54:50 +03:00
parent d287aaf974
commit 4f1576e086
2 changed files with 3 additions and 2 deletions

View file

@ -57,7 +57,8 @@
</button>
<a class="navbar-brand" href="/">{{ config.SITE_NAME }}</a>
</div>
{% set search_placeholder = 'Search {}\'s torrents...'.format(user.username) if user_page else 'Search...' %}
{% set search_username = (user.username + ("'" if user.username[-1] == 's' else "'s")) if user_page else None %}
{% set search_placeholder = 'Search {} torrents...'.format(search_username) if user_page else 'Search...' %}
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li {% if request.path == "/upload" %} class="active"{% endif %}><a href="/upload">Upload</a></li>

View file

@ -41,7 +41,7 @@
{% endif %}
<h3>
Browsing <span class="text-{{ user.userlevel_color }}">{{ user.username }}</span>'s torrents
Browsing <span class="text-{{ user.userlevel_color }}">{{ user.username }}</span>'{{ '' if user.username[-1] == 's' else 's' }} torrents
</h3>
{% include "search_results.html" %}