templates: Add HTML title element to templates that extend base/portico.

Adds HTML title elements to templates that extend either `base.html`,
`portico.html` or `portico_signup.html`, and that are not website
portico landing pages that will use the `PAGE_TITLE` variable to set
the HTML title element (see following commit in series).

Also, updates some templates for missing translation tags.

As a general rule, we want the title element (and page content)
translated. Exceptions that are updated in this commit are templates
used in the development environment, analytics templates that are used
by staff and templates related to Zephyr.
This commit is contained in:
Lauryn Menard 2022-09-06 12:04:03 +02:00 committed by Tim Abbott
parent 92f9a9ba41
commit 7a0d659f14
54 changed files with 229 additions and 13 deletions

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Zulip - 500 internal server error</title>
<title>500 internal server error | Zulip</title>
<base href="/static/webpack-bundles/" />
<meta http-equiv="refresh" content="60;URL='/'" />

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Error") }} | Zulip</title>
{% endblock %}
{% block portico_class_name %}error{% endblock %}
{% block portico_content %}
@ -10,13 +14,15 @@
<div class="errorbox">
<div class="errorcontent">
{% if status_code == 405 %}
<h1 class="lead">Method not allowed (405)</h1>
<h1 class="lead">{{ _("Method not allowed (405)") }}</h1>
{% else %}
<h1 class="lead">Page not found (404)</h1>
<h1 class="lead">{{ _("Page not found (404)") }}</h1>
{% endif %}
<p>
{% trans %}
If this error is unexpected, you can
<a href="mailto:{{ support_email }}">contact support</a>.
{% endtrans %}
</p>
</div>
</div>

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Internal server error") }} | Zulip</title>
{% endblock %}
{% block customhead %}
{{ super() }}
<meta http-equiv="refresh" content="60;URL='/'" />
@ -14,10 +18,12 @@
<img src="/static/images/errors/500art.svg" alt=""/>
<div class="errorbox">
<div class="errorcontent">
<h1 class="lead">Internal server error</h1>
<h1 class="lead">{{ _("Internal server error") }}</h1>
{% trans %}
<p>This Zulip server is currently experiencing some technical difficulties. Sorry about that!</p>
<p>The page will reload automatically soon after service is restored.</p>
<p>If you'd like, you can <a href="mailto:{{ support_email }}">drop us a line</a> to let us know what happened.</p>
{% endtrans %}
</div>
</div>

View File

@ -4,7 +4,7 @@
{# User activity. #}
{% block title %}
<title>{{ title }}</title>
<title>{{ title }} | Zulip analytics</title>
{% endblock %}

View File

@ -1,6 +1,14 @@
{% extends "zerver/base.html" %}
{% set entrypoint = "stats" %}
{% block title %}
<title>
{% trans %}
Analytics for {{ target_name }} | Zulip
{% endtrans %}
</title>
{% endblock %}
{% block content %}
<div class="app portico-page stats-page">

View File

@ -4,7 +4,7 @@
{# User activity. #}
{% block title %}
<title>Info</title>
<title>Support panel | Zulip</title>
{% endblock %}
{% block content %}

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Email changed") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app confirm-email-change-page flex full-page">

View File

@ -1,6 +1,10 @@
{% extends "zerver/base.html" %}
{% set entrypoint = "confirm-preregistrationuser" %}
{% block title %}
<title>{{ _("Confirming your email address") }} | Zulip</title>
{% endblock %}
{% block content %}
{#

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Confirmation link does not exist") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="error_page">
<div class="container">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Confirmation link expired or deactivated") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="error_page">
<div class="container">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Confirmation link malformed") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="error_page">
<div class="container">

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "billing" %}
{% block title %}
<title>{{ _("Billing") }} | Zulip</title>
{% endblock %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% endblock %}

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "billing-event-status" %}
{% block title %}
<title>{{ _("Billing status") }} | Zulip</title>
{% endblock %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% endblock %}

View File

@ -1,13 +1,19 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Thanks for contacting us") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="flex full-page thanks-page">
<div class="center-block new-style">
<h1>Thanks for contacting us!</h1>
<p>We will be in touch with you soon.</p>
<h1>{{ _("Thanks for contacting us!") }}</h1>
<p>{{ _("We will be in touch with you soon.") }}</p>
<p>
{% trans %}
You can find answers to frequently asked questions in the
<a href="/help/">Zulip help center</a>.
{% endtrans %}
</p>
</div>
</div>

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "upgrade" %}
{% block title %}
<title>{{ _("Upgrade") }} | Zulip</title>
{% endblock %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% endblock %}

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>Zephyr mirroring information | Zulip</title>
{% endblock %}
{# Zephyr mirroring information page #}
{% block portico_content %}

View File

@ -2,7 +2,7 @@
{% set entrypoint = "landing-page" %}
{% block title %}
<title>Zulip zephyr</title>
<title>Zephyr for MIT | Zulip</title>
{% endblock %}
{% block customhead %}

View File

@ -1,4 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Accept the Terms of Service") }} | Zulip</title>
{% endblock %}
{#
Allow the user to accept a TOS, creating an email record of that fact.
Users only hit this page if they are coming from a migration or other update of the TOS;

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico_signup.html" %}
{# Home page for not logged-in users. #}
{% block title %}
<title>{{ _("Sign up") }} | Zulip</title>
{% endblock %}
{# This is where we pitch the app and solicit signups. #}
{% block portico_content %}

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico_signup.html" %}
{# Displayed after a user attempts to sign up. #}
{% block title %}
<title>{{ _("Confirm your email address") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<!-- The following empty tag has unique data-page-id so that this
page can be easily identified in it's respective JavaScript file -->

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Authentication subdomain error") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="error_page">
@ -8,13 +12,15 @@
<img src="/static/images/errors/500art.svg" alt=""/>
<div class="errorbox">
<div class="errorcontent">
<h1 class="lead">Authentication subdomain</h1>
<h1 class="lead">{{ _("Authentication subdomain") }}</h1>
<p>
{% trans %}
It appears you ended up here by accident. This site
is meant to be an intermediate step in the authentication process
and shouldn't be accessed manually. If you came here directly,
you probably got the address wrong. If you got stuck here while trying
to log in, this is most likely a server bug or misconfiguration.
{% endtrans %}
</p>
</div>
</div>

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Callback complete</title>
<title>{{ _("Video call ended") }} | Zulip</title>
<script>
window.close();
// Why doesnt this work in Firefox? See
@ -10,6 +10,6 @@
</script>
</head>
<body>
<p>You may now close this window.</p>
<p>{{ _("You may now close this window.") }}</p>
</body>
</html>

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Configuration error") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="error_page" style="padding-bottom: 60px;">
@ -8,7 +12,7 @@
<img src="/static/images/errors/500art.svg" alt=""/>
<div class="errorbox config-error">
<div class="errorcontent">
<h1 class="lead">Configuration error</h1>
<h1 class="lead">{{ _("Configuration error") }}</h1>
<br />
{% if error_name == "ldap_error_realm_is_none" %}
{% trans %}

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Account not found") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app register-page">
<div class="app-main confirm-continue-page-container">

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico_signup.html" %}
{# Home page for not logged-in users. #}
{% block title %}
<title>{{ _("Create a new organization") }} | Zulip</title>
{% endblock %}
{# This is where we pitch the app and solicit signups. #}
{% block portico_content %}

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Deactivated organization") }} | Zulip</title>
{% endblock %}
{% block customhead %}
{{ super() }}
<meta http-equiv="refresh" content="60;URL='/'" />

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "desktop-login" %}
{% block title %}
<title>{{ _("Finish desktop app login") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="flex new-style">
<div class="desktop-redirect-box">

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "desktop-redirect" %}
{% block title %}
<title>{{ _("Log in to desktop app") }} | Zulip</title>
{% endblock %}
{% block content %}
<div class="flex new-style">
<div class="desktop-redirect-box white-box">

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "dev-login" %}
{% block title %}
<title>Log in | Zulip Dev</title>
{% endblock %}
{# Login page. #}
{% block portico_content %}
<!-- The following empty tag has unique data-page-id so that this

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>Tools and data sets | Zulip Dev</title>
{% endblock %}
{# Login page. #}
{% block portico_content %}

View File

@ -1,5 +1,10 @@
{% extends "zerver/base.html" %}
{% set entrypoint = "dev-email-log" %}
{% block title %}
<title>Email log | Zulip Dev</title>
{% endblock %}
{% block content %}
<div class="container">
<div style="position: fixed">

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "dev-integrations-panel" %}
{% block title %}
<title>Integrations developer panel | Zulip Dev</title>
{% endblock %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

View File

@ -1,6 +1,10 @@
{% extends "zerver/base.html" %}
{% set entrypoint = "digest" %}
{% block title %}
<title>{{ _("Digest") }} | Zulip</title>
{% endblock %}
{% block content %}
<body>
<div class="portico-wrap">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Find your accounts") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app find-account-page flex full-page">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Update required") }} | Zulip</title>
{% endblock %}
{% block content %}
<div class="error_page">

View File

@ -1,4 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Invalid email") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<h3>{{ _('Invalid email') }}</h3>

View File

@ -1,4 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Organization does not exist") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app find-account-page flex full-page">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Invalid or expired login session") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app portico-page">
<div class="app-main portico-page-container center-block flex full-page account-creation new-style">

View File

@ -1,5 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "signup" %}
{% block title %}
<title>{{ _("Log in") }} | Zulip</title>
{% endblock %}
{# Login page. #}
{% block portico_content %}

View File

@ -1,4 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("No licenses available") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<br/>
<br/>

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Rate limit exceeded") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="error_page">

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "landing-page" %}
{% block title %}
<title>{{ _("Error creating new organization") }} | Zulip</title>
{% endblock %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% endblock %}

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Organization successfully reactivated") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app portico-page">
<div class="app-main portico-page-container center-block flex full-page account-creation new-style">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Organization reactivation link expired or invalid") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app portico-page">
<div class="app-main portico-page-container center-block flex full-page account-creation new-style">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Log in to your organization") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app goto-account-page flex full-page">

View File

@ -1,5 +1,10 @@
{% extends "zerver/portico_signup.html" %}
{% set entrypoint = "register" %}
{% block title %}
<title>{{ _("Registration") }} | Zulip</title>
{% endblock %}
{#
Gather other user information, after having confirmed
their email address.

View File

@ -1,4 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Reset your password") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="flex new-style app portico-page">

View File

@ -1,6 +1,10 @@
{% extends "zerver/portico_signup.html" %}
{% set entrypoint = "register" %}
{% block title %}
<title>{{ _("Set a new password") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="password-container flex full-page new-style">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Password successfully reset") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app portico-page">
<div class="app-main portico-page-container center-block flex full-page account-creation new-style">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Password reset email sent") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app portico-page">
<div class="app-main portico-page-container center-block flex full-page account-creation new-style">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico_signup.html" %}
{% block title %}
<title>{{ _("Select account for authentication") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="register-account flex full-page new-style" id="choose_email">
<div class="lead">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Error unsubscribing email") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<h1>{% trans %}Unknown email unsubscribe request{% endtrans %}</h1>

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Email settings updated") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="app portico-page">

View File

@ -1,5 +1,9 @@
{% extends "zerver/portico.html" %}
{% block title %}
<title>{{ _("Unsupported browser") }} | Zulip</title>
{% endblock %}
{% block portico_content %}
<div class="error_page unsupported_browser_page">