Use babel for base views

master
Pierre Jaury 8 years ago
parent fe035114e9
commit a3ad45c8ac

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %} {% block title %}
Confirm action {% trans %}Confirm action{% endtrans %}
{% endblock %} {% endblock %}
{% block subtitle %} {% block subtitle %}
@ -9,6 +9,6 @@ Confirm action
{% endblock %} {% endblock %}
{% block box_content %} {% block box_content %}
<p>You are about to {{ action }}. Please confirm your action.</p> <p>{% trans action %}You are about to {{ action }}. Please confirm your action.{% endtrans %}</p>
{{ macros.form(form) }} {{ macros.form(form) }}
{% endblock %} {% endblock %}

@ -3,10 +3,10 @@
{% block sidebar %} {% block sidebar %}
<section class="sidebar"> <section class="sidebar">
<ul class="sidebar-menu"> <ul class="sidebar-menu">
<li class="header">Your account</li> <li class="header">{% trans %}Your account{% endtrans %}</li>
<li> <li>
<a href="#"> <a href="#">
<i class="fa fa-sign-in"></i> <span>Sign in</span> <i class="fa fa-sign-in"></i> <span>{% trans %}Sign in{% endtrans %}</span>
</a> </a>
</li> </li>
</ul> </ul>
@ -14,11 +14,11 @@
{% endblock %} {% endblock %}
{% block title %} {% block title %}
Sign in {% trans %}Sign in{% endtrans %}
{% endblock %} {% endblock %}
{% block subtitle %} {% block subtitle %}
to access the administration tools {% trans %}to access the administration tools{% endtrans %}
{% endblock %} {% endblock %}
{% block box_content %} {% block box_content %}

@ -1,19 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %} {% block title %}
Services status {% trans %}Services status{% endtrans %}
{% endblock %} {% endblock %}
{% block box %} {% block box %}
<table class="table table-bordered"> <table class="table table-bordered">
<tbody> <tbody>
<tr> <tr>
<th>Service</th> <th>{% trans %}Service{% endtrans %}</th>
<th>Status</th> <th>{% trans %}Status{% endtrans %}</th>
<th>PID</th> <th>{% trans %}PID{% endtrans %}</th>
<th>Image</th> <th>{% trans %}Image{% endtrans %}</th>
<th>Started</th> <th>{% trans %}Started{% endtrans %}</th>
<th>Last update</th> <th>{% trans %}Last update{% endtrans %}</th>
</tr> </tr>
{% for name, container in containers.items() %} {% for name, container in containers.items() %}
<tr> <tr>

@ -2,61 +2,61 @@
<h4 class="text-center text-primary">{{ current_user }}</h4> <h4 class="text-center text-primary">{{ current_user }}</h4>
<ul class="sidebar-menu"> <ul class="sidebar-menu">
<li class="header">My account</li> <li class="header">{% trans %}My account{% endtrans %}</li>
<li> <li>
<a href="{{ url_for('.user_settings') }}"> <a href="{{ url_for('.user_settings') }}">
<i class="fa fa-wrench"></i> <span>Settings</span> <i class="fa fa-wrench"></i> <span>{% trans %}Settings{% endtrans %}</span>
</a> </a>
</li> </li>
<li> <li>
<a href="{{ url_for('.user_password') }}"> <a href="{{ url_for('.user_password') }}">
<i class="fa fa-lock"></i> <span>Update password</span> <i class="fa fa-lock"></i> <span>{% trans %}Update password{% endtrans %}</span>
</a> </a>
</li> </li>
<li> <li>
<a href="{{ url_for('.user_forward') }}"> <a href="{{ url_for('.user_forward') }}">
<i class="fa fa-share"></i> <span>Auto-forward</span> <i class="fa fa-share"></i> <span>{% trans %}Auto-forward{% endtrans %}</span>
</a> </a>
</li> </li>
<li> <li>
<a href="{{ url_for('.user_reply') }}"> <a href="{{ url_for('.user_reply') }}">
<i class="fa fa-plane"></i> <span>Auto-reply</span> <i class="fa fa-plane"></i> <span>{% trans %}Auto-reply{% endtrans %}</span>
</a> </a>
</li> </li>
<li> <li>
<a href="{{ url_for('.fetch_list') }}"> <a href="{{ url_for('.fetch_list') }}">
<i class="fa fa-download"></i> <span>Fetched accounts</span> <i class="fa fa-download"></i> <span>{% trans %}Fetched accounts{% endtrans %}</span>
</a> </a>
</li> </li>
<li> <li>
<a href="{{ url_for('.logout') }}"> <a href="{{ url_for('.logout') }}">
<i class="fa fa-sign-out"></i> <span>Sign out</span> <i class="fa fa-sign-out"></i> <span>{% trans %}Sign out{% endtrans %}</span>
</a> </a>
</li> </li>
<li class="header">Administration</li> <li class="header">{% trans %}Administration{% endtrans %}</li>
{% if current_user.global_admin %} {% if current_user.global_admin %}
<li> <li>
<a href="{{ url_for('.services') }}"> <a href="{{ url_for('.services') }}">
<i class="fa fa-dashboard"></i> <span>Services status</span> <i class="fa fa-dashboard"></i> <span>{% trans %}Services status{% endtrans %}</span>
</a> </a>
</li> </li>
<li> <li>
<a href="{{ url_for('.admin_list') }}"> <a href="{{ url_for('.admin_list') }}">
<i class="fa fa-user"></i> <span>Administrators</span> <i class="fa fa-user"></i> <span>{% trans %}Administrators{% endtrans %}</span>
</a> </a>
</li> </li>
{% endif %} {% endif %}
{% if current_user.manager_of or current_user.global_admin %} {% if current_user.manager_of or current_user.global_admin %}
<li> <li>
<a href="{{ url_for('.domain_list') }}"> <a href="{{ url_for('.domain_list') }}">
<i class="fa fa-envelope"></i> <span>Mail domains</span> <i class="fa fa-envelope"></i> <span>{% trans %}Mail domains{% endtrans %}</span>
</a> </a>
</li> </li>
{% endif %} {% endif %}
<li> <li>
<a href="https://github.com/kaiyou/freeposte.io"> <a href="https://github.com/kaiyou/freeposte.io">
<i class="fa fa-life-ring"></i> <span>Help</span> <i class="fa fa-life-ring"></i> <span>{% trans %}Help{% endtrans %}</span>
</a> </a>
</li> </li>
</ul> </ul>

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<div class="alert alert-warning" role="alert">We are still working on this feature!</div> <div class="alert alert-warning" role="alert">{% trans %}We are still working on this feature!{% endtrans %}</div>
{% endblock %} {% endblock %}

Loading…
Cancel
Save