mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 23:43:47 +00:00
Translation of search/ (front)
This commit is contained in:
parent
c3b3146f39
commit
e27625dd80
6 changed files with 210 additions and 38 deletions
|
@ -26,23 +26,24 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.forms import Form
|
from django.forms import Form
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from re2o.utils import get_input_formats_help_text
|
from re2o.utils import get_input_formats_help_text
|
||||||
|
|
||||||
CHOICES_USER = (
|
CHOICES_USER = (
|
||||||
('0', 'Actifs'),
|
('0', _("Active")),
|
||||||
('1', 'Désactivés'),
|
('1', _("Disabled")),
|
||||||
('2', 'Archivés'),
|
('2', _("Archived")),
|
||||||
)
|
)
|
||||||
|
|
||||||
CHOICES_AFF = (
|
CHOICES_AFF = (
|
||||||
('0', 'Utilisateurs'),
|
('0', _("Users")),
|
||||||
('1', 'Machines'),
|
('1', _("Machines")),
|
||||||
('2', 'Factures'),
|
('2', _("Invoices")),
|
||||||
('3', 'Bannissements'),
|
('3', _("Bans")),
|
||||||
('4', 'Accès à titre gracieux'),
|
('4', _("Whitelists")),
|
||||||
('5', 'Chambres'),
|
('5', _("Rooms")),
|
||||||
('6', 'Ports'),
|
('6', _("Ports")),
|
||||||
('7', 'Switchs'),
|
('7', _("Switches")),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,11 +56,11 @@ def initial_choices(choice_set):
|
||||||
class SearchForm(Form):
|
class SearchForm(Form):
|
||||||
"""The form for a simple search"""
|
"""The form for a simple search"""
|
||||||
q = forms.CharField(
|
q = forms.CharField(
|
||||||
label='Recherche',
|
label=_("Search"),
|
||||||
help_text=(
|
help_text=(
|
||||||
'Utilisez « » et «,» pour spécifier différents mots, «"query"» '
|
_("Use « » and «,» to specify distinct words, «\"query\"» for"
|
||||||
'pour une recherche exacte et «\\» pour échapper un caractère.'
|
" an exact search and «\\» to escape a character.")
|
||||||
),
|
),
|
||||||
max_length=100
|
max_length=100
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -67,23 +68,23 @@ class SearchForm(Form):
|
||||||
class SearchFormPlus(Form):
|
class SearchFormPlus(Form):
|
||||||
"""The form for an advanced search (with filters)"""
|
"""The form for an advanced search (with filters)"""
|
||||||
q = forms.CharField(
|
q = forms.CharField(
|
||||||
label='Recherche',
|
label=_("Search"),
|
||||||
help_text=(
|
help_text=(
|
||||||
'Utilisez « » et «,» pour spécifier différents mots, «"query"» '
|
_("Use « » and «,» to specify distinct words, «\"query\"» for"
|
||||||
'pour une recherche exacte et «\\» pour échapper un caractère.'
|
" an exact search and «\\» to escape a character.")
|
||||||
),
|
),
|
||||||
max_length=100,
|
max_length=100,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
u = forms.MultipleChoiceField(
|
u = forms.MultipleChoiceField(
|
||||||
label="Filtre utilisateurs",
|
label=_("Users filter"),
|
||||||
required=False,
|
required=False,
|
||||||
widget=forms.CheckboxSelectMultiple,
|
widget=forms.CheckboxSelectMultiple,
|
||||||
choices=CHOICES_USER,
|
choices=CHOICES_USER,
|
||||||
initial=initial_choices(CHOICES_USER)
|
initial=initial_choices(CHOICES_USER)
|
||||||
)
|
)
|
||||||
a = forms.MultipleChoiceField(
|
a = forms.MultipleChoiceField(
|
||||||
label="Filtre affichage",
|
label=_("Display filter"),
|
||||||
required=False,
|
required=False,
|
||||||
widget=forms.CheckboxSelectMultiple,
|
widget=forms.CheckboxSelectMultiple,
|
||||||
choices=CHOICES_AFF,
|
choices=CHOICES_AFF,
|
||||||
|
@ -91,11 +92,11 @@ class SearchFormPlus(Form):
|
||||||
)
|
)
|
||||||
s = forms.DateField(
|
s = forms.DateField(
|
||||||
required=False,
|
required=False,
|
||||||
label="Date de début",
|
label=_("Start date"),
|
||||||
)
|
)
|
||||||
e = forms.DateField(
|
e = forms.DateField(
|
||||||
required=False,
|
required=False,
|
||||||
label="Date de fin"
|
label=_("End date")
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -106,3 +107,4 @@ class SearchFormPlus(Form):
|
||||||
self.fields['e'].help_text = get_input_formats_help_text(
|
self.fields['e'].help_text = get_input_formats_help_text(
|
||||||
self.fields['e'].input_formats
|
self.fields['e'].input_formats
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
BIN
search/locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
search/locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
163
search/locale/fr/LC_MESSAGES/django.po
Normal file
163
search/locale/fr/LC_MESSAGES/django.po
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||||
|
# se veut agnostique au réseau considéré, de manière à être installable en
|
||||||
|
# quelques clics.
|
||||||
|
#
|
||||||
|
# Copyright © 2018 Maël Kervella
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: 2.5\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2018-08-15 18:15+0200\n"
|
||||||
|
"PO-Revision-Date: 2018-06-24 20:10+0200\n"
|
||||||
|
"Last-Translator: Laouen Fernet <laouen.fernet@supelec.fr>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr_FR\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: forms.py:33
|
||||||
|
msgid "Active"
|
||||||
|
msgstr "Actifs"
|
||||||
|
|
||||||
|
#: forms.py:34
|
||||||
|
msgid "Disabled"
|
||||||
|
msgstr "Désactivés"
|
||||||
|
|
||||||
|
#: forms.py:35
|
||||||
|
msgid "Archived"
|
||||||
|
msgstr "Archivés"
|
||||||
|
|
||||||
|
#: forms.py:39
|
||||||
|
msgid "Users"
|
||||||
|
msgstr "Utilisateurs"
|
||||||
|
|
||||||
|
#: forms.py:40
|
||||||
|
msgid "Machines"
|
||||||
|
msgstr "Machines"
|
||||||
|
|
||||||
|
#: forms.py:41
|
||||||
|
msgid "Invoices"
|
||||||
|
msgstr "Factures"
|
||||||
|
|
||||||
|
#: forms.py:42
|
||||||
|
msgid "Bans"
|
||||||
|
msgstr "Bannissements"
|
||||||
|
|
||||||
|
#: forms.py:43
|
||||||
|
msgid "Whitelists"
|
||||||
|
msgstr "Accès gracieux"
|
||||||
|
|
||||||
|
#: forms.py:44
|
||||||
|
msgid "Rooms"
|
||||||
|
msgstr "Chambres"
|
||||||
|
|
||||||
|
#: forms.py:45
|
||||||
|
msgid "Ports"
|
||||||
|
msgstr "Ports"
|
||||||
|
|
||||||
|
#: forms.py:46
|
||||||
|
msgid "Switches"
|
||||||
|
msgstr "Commutateurs réseau"
|
||||||
|
|
||||||
|
#: forms.py:59 forms.py:71 templates/search/search.html:29
|
||||||
|
#: templates/search/search.html:48
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Rechercher"
|
||||||
|
|
||||||
|
#: forms.py:61 forms.py:73
|
||||||
|
msgid ""
|
||||||
|
"Use « » and «,» to specify distinct words, «\"query\"» for an exact search "
|
||||||
|
"and «\\» to escape a character."
|
||||||
|
msgstr ""
|
||||||
|
"Utilisez « » et «,» pour spécifier différents mots, «\"query\"» pour une "
|
||||||
|
"recherche exacte et «\\» pour échapper un caractère."
|
||||||
|
|
||||||
|
#: forms.py:80
|
||||||
|
msgid "Users filter"
|
||||||
|
msgstr "Filtre utilisateurs"
|
||||||
|
|
||||||
|
#: forms.py:87
|
||||||
|
msgid "Display filter"
|
||||||
|
msgstr "Filtre affichage"
|
||||||
|
|
||||||
|
#: forms.py:95
|
||||||
|
msgid "Start date"
|
||||||
|
msgstr "Date de début"
|
||||||
|
|
||||||
|
#: forms.py:99
|
||||||
|
msgid "End date"
|
||||||
|
msgstr "Date de fin"
|
||||||
|
|
||||||
|
#: templates/search/index.html:29
|
||||||
|
msgid "Search results"
|
||||||
|
msgstr "Résultats de la recherche"
|
||||||
|
|
||||||
|
#: templates/search/index.html:33
|
||||||
|
msgid "Results among users:"
|
||||||
|
msgstr "Résultats parmi les utilisateurs :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:37
|
||||||
|
msgid "Results among clubs:"
|
||||||
|
msgstr "Résultats parmi les clubs :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:41
|
||||||
|
msgid "Results among machines:"
|
||||||
|
msgstr "Résultats parmi les machines :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:45
|
||||||
|
msgid "Results among invoices:"
|
||||||
|
msgstr "Résultats parmi les factures :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:49
|
||||||
|
msgid "Results among whitelists:"
|
||||||
|
msgstr "Résultats parmi les accès à titre gracieux :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:53
|
||||||
|
msgid "Results among bans:"
|
||||||
|
msgstr "Résultats parmi les bannissements :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:57
|
||||||
|
msgid "Results among rooms:"
|
||||||
|
msgstr "Résultats parmi les chambres :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:61
|
||||||
|
msgid "Results among ports"
|
||||||
|
msgstr "Résultats parmi les ports :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:65
|
||||||
|
msgid "Results among switches"
|
||||||
|
msgstr "Résultats parmi les commutateurs réseau :"
|
||||||
|
|
||||||
|
#: templates/search/index.html:69
|
||||||
|
msgid "No result"
|
||||||
|
msgstr "Pas de résultat"
|
||||||
|
|
||||||
|
#: templates/search/index.html:71
|
||||||
|
#, python-format
|
||||||
|
msgid "(Only the first %(max_result)s results are displayed in each category)"
|
||||||
|
msgstr ""
|
||||||
|
"(Seulement les %(max_result)s premiers résultats sont affichés dans chaque "
|
||||||
|
"catégorie)"
|
||||||
|
|
||||||
|
#: templates/search/sidebar.html:31
|
||||||
|
msgid "Simple search"
|
||||||
|
msgstr "Recherche simple"
|
||||||
|
|
||||||
|
#: templates/search/sidebar.html:35
|
||||||
|
msgid "Advanced search"
|
||||||
|
msgstr "Recherche avancée"
|
|
@ -24,52 +24,54 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Résultats de la recherche{% endblock %}
|
{% block title %}{% trans "Search results" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if users %}
|
{% if users %}
|
||||||
<h2>Résultats dans les utilisateurs</h2>
|
<h2>{% trans "Results among users:" %}</h2>
|
||||||
{% include "users/aff_users.html" with users_list=users %}
|
{% include "users/aff_users.html" with users_list=users %}
|
||||||
{% endif%}
|
{% endif%}
|
||||||
{% if clubs %}
|
{% if clubs %}
|
||||||
<h2>Résultats dans les clubs</h2>
|
<h2>{% trans "Results among clubs:" %}</h2>
|
||||||
{% include "users/aff_clubs.html" with clubs_list=clubs %}
|
{% include "users/aff_clubs.html" with clubs_list=clubs %}
|
||||||
{% endif%}
|
{% endif%}
|
||||||
{% if machines %}
|
{% if machines %}
|
||||||
<h2>Résultats dans les machines : </h2>
|
<h2>{% trans "Results among machines:" %}</h2>
|
||||||
{% include "machines/aff_machines.html" with machines_list=machines %}
|
{% include "machines/aff_machines.html" with machines_list=machines %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if factures %}
|
{% if factures %}
|
||||||
<h2>Résultats dans les factures : </h2>
|
<h2>{% trans "Results among invoices:" %}</h2>
|
||||||
{% include "cotisations/aff_cotisations.html" with facture_list=factures %}
|
{% include "cotisations/aff_cotisations.html" with facture_list=factures %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if whitelists %}
|
{% if whitelists %}
|
||||||
<h2>Résultats dans les accès à titre gracieux : </h2>
|
<h2>{% trans "Results among whitelists:" %}</h2>
|
||||||
{% include "users/aff_whitelists.html" with white_list=whitelists %}
|
{% include "users/aff_whitelists.html" with white_list=whitelists %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bans %}
|
{% if bans %}
|
||||||
<h2>Résultats dans les banissements : </h2>
|
<h2>{% trans "Results among bans:" %}</h2>
|
||||||
{% include "users/aff_bans.html" with ban_list=bans %}
|
{% include "users/aff_bans.html" with ban_list=bans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if rooms %}
|
{% if rooms %}
|
||||||
<h2>Résultats dans les chambres : </h2>
|
<h2>{% trans "Results among rooms:" %}</h2>
|
||||||
{% include "topologie/aff_chambres.html" with room_list=rooms %}
|
{% include "topologie/aff_chambres.html" with room_list=rooms %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if ports %}
|
{% if ports %}
|
||||||
<h2>Résultats dans les ports : </h2>
|
<h2>{% trans "Results among ports" %}</h2>
|
||||||
{% include "topologie/aff_port.html" with port_list=ports %}
|
{% include "topologie/aff_port.html" with port_list=ports %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if switches %}
|
{% if switches %}
|
||||||
<h2>Résultats dans les switchs : </h2>
|
<h2>{% trans "Results among switches" %}</h2>
|
||||||
{% include "topologie/aff_switch.html" with switch_list=switches %}
|
{% include "topologie/aff_switch.html" with switch_list=switches %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not users and not machines and not factures and not whitelists and not bans and not rooms and not ports and not switches %}
|
{% if not users and not machines and not factures and not whitelists and not bans and not rooms and not ports and not switches %}
|
||||||
<h3>Aucun résultat</h3>
|
<h3>{% trans "No result" %}</h3>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h6>(Seulement les {{ max_result }} premiers résultats sont affichés dans chaque catégorie)</h6>
|
<h6>{% blocktrans %}(Only the first {{ max_result }} results are displayed in each category){% endblocktrans %}</h6>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}Recherche{% endblock %}
|
{% block title %}{% trans "Search" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% bootstrap_form_errors search_form %}
|
{% bootstrap_form_errors search_form %}
|
||||||
|
@ -44,7 +45,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% if search_form.e %}
|
{% if search_form.e %}
|
||||||
{% bootstrap_field search_form.e %}
|
{% bootstrap_field search_form.e %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% bootstrap_button "Search" button_type="submit" icon="search" %}
|
{% trans "Search" as tr_search %}
|
||||||
|
{% bootstrap_button tr_search button_type="submit" icon="search" %}
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
@ -52,3 +54,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -23,14 +23,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
<a class="list-group-item list-group-item-warning" href="{% url "search:search" %}">
|
<a class="list-group-item list-group-item-warning" href="{% url "search:search" %}">
|
||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
Recherche simple
|
{% trans "Simple search" %}
|
||||||
</a>
|
</a>
|
||||||
<a class="list-group-item list-group-item-warning" href="{% url "search:searchp" %}">
|
<a class="list-group-item list-group-item-warning" href="{% url "search:searchp" %}">
|
||||||
<i class="fa fa-search-plus"></i>
|
<i class="fa fa-search-plus"></i>
|
||||||
Recherche avancée
|
{% trans "Advanced search" %}
|
||||||
</a>
|
</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue