mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 01:16:27 +00:00
Mark strings for translation in re2o
This commit is contained in:
parent
038a11fb75
commit
b5769bb1f8
4 changed files with 12 additions and 12 deletions
|
@ -44,14 +44,14 @@ def acl_error_message(msg, permissions):
|
||||||
if permissions is None:
|
if permissions is None:
|
||||||
return msg
|
return msg
|
||||||
groups = ", ".join([g.name for g in get_group_having_permission(*permissions)])
|
groups = ", ".join([g.name for g in get_group_having_permission(*permissions)])
|
||||||
message = msg or _("You don't have the right to edit" " this option.")
|
message = msg or _("You don't have the right to edit this option.")
|
||||||
if groups:
|
if groups:
|
||||||
return (
|
return (
|
||||||
message
|
message
|
||||||
+ _(" You need to be a member of one of those" " groups : %s") % groups
|
+ _("You need to be a member of one of these groups: %s.") % groups
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return message + " No group have the %s permission(s) !" % " or ".join(
|
return message + _("No group has the %s permission(s)!") % " or ".join(
|
||||||
[",".join(permissions[:-1]), permissions[-1]]
|
[",".join(permissions[:-1]), permissions[-1]]
|
||||||
if len(permissions) > 2
|
if len(permissions) > 2
|
||||||
else permissions
|
else permissions
|
||||||
|
@ -190,7 +190,7 @@ ModelC)
|
||||||
for msg in error_messages:
|
for msg in error_messages:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
msg or _("You don't have the right to access" " this menu."),
|
msg or _("You don't have the right to access this menu."),
|
||||||
)
|
)
|
||||||
if request.user.id is not None:
|
if request.user.id is not None:
|
||||||
return redirect(
|
return redirect(
|
||||||
|
|
|
@ -96,9 +96,9 @@ def convert_datetime_format(format):
|
||||||
def get_input_formats_help_text(input_formats):
|
def get_input_formats_help_text(input_formats):
|
||||||
"""Returns a help text about the possible input formats"""
|
"""Returns a help text about the possible input formats"""
|
||||||
if len(input_formats) > 1:
|
if len(input_formats) > 1:
|
||||||
help_text_template = "Format: {main} {more}"
|
help_text_template = _("Format: {main} {more}")
|
||||||
else:
|
else:
|
||||||
help_text_template = "Format: {main}"
|
help_text_template = _("Format: {main}")
|
||||||
more_text_template = '<i class="fa fa-question-circle" title="{}"></i>'
|
more_text_template = '<i class="fa fa-question-circle" title="{}"></i>'
|
||||||
help_text = help_text_template.format(
|
help_text = help_text_template.format(
|
||||||
main=convert_datetime_format(input_formats[0]),
|
main=convert_datetime_format(input_formats[0]),
|
||||||
|
|
|
@ -38,16 +38,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<p>{{ option.adresse1 | safe }}</p>
|
<p>{{ option.adresse1 | safe }}</p>
|
||||||
<p>{{ option.adresse2 | safe }}</p>
|
<p>{{ option.adresse2 | safe }}</p>
|
||||||
|
|
||||||
<p>SIRET : {{ option.siret | safe }}</p>
|
<p>{% trans "SIRET: " %}{{ option.siret | safe }}</p>
|
||||||
|
|
||||||
<h4>{% trans "Publication manager" %}</h4>
|
<h4>{% trans "Publication manager" %}</h4>
|
||||||
<p>{{ president }} - {% trans "President of " %} {{ option.pseudo }}</p>
|
<p>{{ president }} - {% trans "President of " %} {{ option.pseudo }}</p>
|
||||||
|
|
||||||
<h4>{% trans "General conditions of use" %}</h4>
|
<h4>{% trans "General Terms of Use" %}</h4>
|
||||||
<p><a href='{{ gtu.url }}' download='CGU'>{{ gtu }}</a></p>
|
<p><a href='{{ gtu.url }}' download='CGU'>{{ gtu }}</a></p>
|
||||||
|
|
||||||
{% if option.description %}
|
{% if option.description %}
|
||||||
<h4>Extra informations</h4>
|
<h4>{% trans "Additional information" %}</h4>
|
||||||
<p>{{ option.description | safe }}</p>
|
<p>{{ option.description | safe }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -57,11 +57,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<a href="https://rezometz.org/">Rezo Metz</a> and a few
|
<a href="https://rezometz.org/">Rezo Metz</a> and a few
|
||||||
members of other <a href="https://federez.net">FedeRez</a> associations
|
members of other <a href="https://federez.net">FedeRez</a> associations
|
||||||
around the summer 2016.<br />
|
around the summer 2016.<br />
|
||||||
It is intended to be a tool independant from any network infrastructure
|
It is intended to be a tool independent from any network infrastructure
|
||||||
so it can be setup in "a few steps". This tool is entirely free and
|
so it can be setup in "a few steps". This tool is entirely free and
|
||||||
available under a GNU Public License v2 (GPLv2) license on
|
available under a GNU Public License v2 (GPLv2) license on
|
||||||
<a href="https://gitlab.federez.net/federez/re2o/">FedeRez gitlab</a>.<br />
|
<a href="https://gitlab.federez.net/federez/re2o/">FedeRez gitlab</a>.<br />
|
||||||
Re2o's mainteners are volunteers mainly from French schools. <br />
|
Re2o's maintainers are volunteers mainly from French schools. <br />
|
||||||
If you want to get involved in the development process, we will be glad to
|
If you want to get involved in the development process, we will be glad to
|
||||||
welcome you so do not hesitate to contact us and come help us build the
|
welcome you so do not hesitate to contact us and come help us build the
|
||||||
future of Re2o.
|
future of Re2o.
|
||||||
|
|
|
@ -46,7 +46,7 @@ from __future__ import unicode_literals
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
|
|
||||||
from .settings_local import OPTIONNAL_APPS_RE2O
|
from .settings_local import OPTIONNAL_APPS_RE2O
|
||||||
|
|
Loading…
Reference in a new issue