Moves titles into templates and adds i18n support
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
|
||||
{% block title %}{{ author.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<div class="columns is-mobile">
|
||||
|
@ -2,8 +2,10 @@
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% load humanize %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{{ book.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% extends 'discover/landing_layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block panel %}
|
||||
|
||||
{% block panel %}
|
||||
<div class="block columns mt-4">
|
||||
<nav class="menu column is-one-quarter">
|
||||
<h2 class="menu-label">About {{ site.name }}</h2>
|
||||
<h2 class="menu-label">{% blocktrans with site_name=site.name %}About {{ site_name }}{% endblocktrans %}</h2>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a href="#coc">{% trans "Code of Conduct" %}</a>
|
||||
|
@ -1,8 +1,10 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{% trans "Welcome" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header class="block has-text-centered">
|
||||
<h1 class="title">{{ site.name }}</h1>
|
||||
<h2 class="subtitle">{{ site.instance_tagline }}</h2>
|
||||
|
@ -1,6 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}{% trans "Edit Author" %}: {{ author.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header class="block">
|
||||
<h1 class="title level-left">
|
||||
|
@ -1,6 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}{% trans "Edit Book" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header class="block">
|
||||
<h1 class="title level-left">
|
||||
|
@ -1,6 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
|
||||
{% block title %}{% blocktrans with book_title=work.title %}Editions of {{ book_title }}{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{% blocktrans with path=work.local_path work_title=work.title %}Editions of <a href="{{ work_path }}">"{{ work_title }}"</a>{% endblocktrans %}</h1>
|
||||
|
@ -1,11 +1,12 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{% trans "Oops!" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{% trans "Server Error" %}</h1>
|
||||
<p>{% trans "Something went wrong! Sorry about that." %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -3,7 +3,13 @@
|
||||
{% block panel %}
|
||||
|
||||
<header class="block">
|
||||
<h1 class="title">Direct Messages{% if partner %} with {% include 'snippets/username.html' with user=partner %}{% endif %}</h1>
|
||||
<h1 class="title">
|
||||
{% if partner %}
|
||||
{% blocktrans with username=partner.display_name path=partner.local_path %}Direct Messages with <a href="{{ path }}">{{ username }}</a>{% endblocktrans %}
|
||||
{% else %}
|
||||
{% trans "Direct Messsages" %}
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% if partner %}<p class="subtitle"><a href="/direct-messages"><span class="icon icon-arrow-left" aria-hidden="true"></span> {% trans "All messages" %}</a></p>{% endif %}
|
||||
</header>
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block title %}Updates{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{% trans "Updates" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="columns">
|
||||
{% if user.is_authenticated %}
|
||||
<div class="column is-one-third">
|
||||
|
@ -1,5 +1,6 @@
|
||||
{% extends 'feed/feed_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block panel %}
|
||||
<header class="block">
|
||||
<a href="/#feed" class="button" data-back>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<section class="card {% if goal %}hidden{% endif %}" id="show-edit-goal">
|
||||
<header class="card-header">
|
||||
<h2 class="card-header-title has-background-primary has-text-white" tabindex="0" id="edit-form-header">
|
||||
<span class="icon icon-book is-size-3 mr-2" aria-hidden="true"></span> {{ year }} reading goal
|
||||
<span class="icon icon-book is-size-3 mr-2" aria-hidden="true"></span> {% blocktrans %}{{ year }} reading goal{% endblocktrans %}
|
||||
</h2>
|
||||
</header>
|
||||
<section class="card-content content">
|
||||
@ -45,7 +45,13 @@
|
||||
|
||||
{% if goal.books %}
|
||||
<section class="content">
|
||||
<h2>{% if goal.user == request.user %}Your{% else %}{{ goal.user.display_name }}'s{% endif %} {{ year }} Books</h2>
|
||||
<h2>
|
||||
{% if goal.user == request.user %}
|
||||
{% blocktrans %}Your {{ year }} Books{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with username=goal.user.display_name %}{{ username }}'s {{ year }} Books{% endblocktrans %}
|
||||
{% endif %}
|
||||
</h2>
|
||||
<div class="columns is-multiline">
|
||||
{% for book in goal.books %}
|
||||
<div class="column is-narrow">
|
||||
|
@ -1,6 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}{% trans "Import Books" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{% trans "Import Books" %}</h1>
|
||||
|
@ -2,6 +2,9 @@
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}{% trans "Import Status" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{% trans "Import Status" %}</h1>
|
||||
|
@ -1,5 +1,8 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Create an Account" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="columns">
|
||||
|
@ -1,8 +1,8 @@
|
||||
{% extends 'lists/list_layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block panel %}
|
||||
|
||||
{% block panel %}
|
||||
{% if request.user == list.user and pending_count %}
|
||||
<div class="block content">
|
||||
<p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{{ list.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header class="columns content is-mobile">
|
||||
<div class="column">
|
||||
<h1 class="title">{{ list.name }} <span class="subtitle">{% include 'snippets/privacy-icons.html' with item=list %}</span></h1>
|
||||
|
@ -1,5 +1,8 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Lists" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<header class="block">
|
||||
|
@ -1,7 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{% trans "Login" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
|
@ -1,10 +1,11 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{% trans "Not Found" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{% trans "Not Found" %}</h1>
|
||||
<p>{% trans "The page your requested doesn't seem to exist!" %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -2,6 +2,9 @@
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
{% load bookwyrm_tags %}
|
||||
|
||||
{% block title %}{% trans "Notifications" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{% trans "Notifications" %}</h1>
|
||||
|
@ -1,7 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{% trans "Reset Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="block">
|
||||
|
@ -1,7 +1,9 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{% trans "Reset Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-half">
|
||||
<div class="block">
|
||||
|
@ -1,6 +1,8 @@
|
||||
{% extends 'preferences/preferences_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Blocked Users" %}{{ author.name }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
{% trans "Blocked Users" %}
|
||||
{% endblock %}
|
||||
|
@ -1,5 +1,8 @@
|
||||
{% extends 'preferences/preferences_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
{% trans "Change Password" %}
|
||||
{% endblock %}
|
||||
|
@ -1,5 +1,8 @@
|
||||
{% extends 'preferences/preferences_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Edit Profile" %}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
{% trans "Edit Profile" %}
|
||||
{% endblock %}
|
||||
|
@ -1,5 +1,8 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Search Results" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% with book_results|first as local_results %}
|
||||
<div class="block">
|
||||
|
@ -1,5 +1,8 @@
|
||||
{% extends 'settings/admin_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Federated Servers" %}{% endblock %}
|
||||
|
||||
{% block header %}{% trans "Federated Servers" %}{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
|
@ -1,6 +1,9 @@
|
||||
{% extends 'settings/admin_layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block header %}{% trans "Site Configuration" %}{% endblock %}
|
||||
|
||||
{% block title %}{% trans "Site Settings" %}{% endblock %}
|
||||
|
||||
{% block header %}{% trans "Site Settings" %}{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% block content %}
|
||||
|
||||
{% block title %}{{ tag.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h1 class="title">{% blocktrans %}Books tagged "{{ tag.name }}"{% endblocktrans %}</h1>
|
||||
{% include 'snippets/book_tiles.html' with books=books.all %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -4,11 +4,7 @@
|
||||
|
||||
{% block header %}
|
||||
<h1 class="title">
|
||||
{% if is_self %}Your
|
||||
{% else %}
|
||||
{% include 'snippets/username.html' with user=user possessive=True %}
|
||||
{% endif %}
|
||||
followers
|
||||
{% trans "User Profile" %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -4,11 +4,7 @@
|
||||
|
||||
{% block header %}
|
||||
<h1 class="title">
|
||||
Users following
|
||||
{% if is_self %}you
|
||||
{% else %}
|
||||
{% include 'snippets/username.html' with user=user %}
|
||||
{% endif %}
|
||||
{% trans "User Profile" %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<h1 class="title">
|
||||
{% if is_self %}Your
|
||||
{% if is_self %}
|
||||
{% trans "Your Lists" %}
|
||||
{% else %}
|
||||
{% include 'snippets/username.html' with user=user %}'s
|
||||
{% blocktrans with username=user.display_name %}Lists: {{ username }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
Lists
|
||||
</h1>
|
||||
</div>
|
||||
{% if is_self %}
|
||||
|
@ -1,14 +1,17 @@
|
||||
{% extends 'user/user_layout.html' %}
|
||||
{% load bookwyrm_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% blocktrans with username=user.display_name %}Shelves: {{ username }}{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<header class="columns">
|
||||
<h1 class="title">
|
||||
{% if is_self %}Your
|
||||
{% if is_self %}
|
||||
{% trans "Your Shelves" %}
|
||||
{% else %}
|
||||
{% include 'snippets/username.html' with user=user possessive=True %}
|
||||
{% blocktrans with username=user.display_name %}{{ username }}: Shelves{% endblocktrans %}
|
||||
{% endif %}
|
||||
shelves
|
||||
</h1>
|
||||
</header>
|
||||
{% endblock %}
|
||||
@ -29,7 +32,8 @@
|
||||
|
||||
{% if is_self %}
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/toggle/open_button.html' with text="Create shelf" icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
|
||||
{% trans "Create Shelf" as button_text %}
|
||||
{% include 'snippets/toggle/open_button.html' with text=button_text icon="plus" controls_text="create-shelf-form" focus="create-shelf-form-header" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -1,10 +1,12 @@
|
||||
{% extends 'user/user_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ user.name }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<h1 class="title">{% trans "User profile" %}</h1>
|
||||
<h1 class="title">{% trans "User Profile" %}</h1>
|
||||
</div>
|
||||
{% if is_self %}
|
||||
<div class="column is-narrow">
|
||||
|
@ -3,6 +3,8 @@
|
||||
{% load humanize %}
|
||||
{% load bookwyrm_tags %}
|
||||
|
||||
{% block title %}{{ user.display_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header class="block">
|
||||
{% block header %}{% endblock %}
|
||||
|
Reference in New Issue
Block a user