Commit 1b4324f3 authored by Skia's avatar Skia

Add french translation file

parent beebe636
Pipeline #57 failed with stage
in 1 minute and 8 seconds
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('club', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='membership',
name='role',
field=models.IntegerField(verbose_name='role', default=0, choices=[(0, 'Curious'), (1, 'Active member'), (2, 'Board member'), (3, 'IT supervisor'), (4, 'Secretary'), (5, 'Communication supervisor'), (7, 'Treasurer'), (9, 'Vice-President'), (10, 'President')]),
),
]
......@@ -120,7 +120,7 @@ class Membership(models.Model):
raise ValidationError(_('User is already member of that club'))
def __str__(self):
return self.club.name+' - '+self.user.username+' - '+settings.SITH_CLUB_ROLES[self.role]+str(
return self.club.name+' - '+self.user.username+' - '+str(settings.SITH_CLUB_ROLES[self.role])+str(
" - "+str(_('past member')) if self.end_date is not None else ""
)
......
......@@ -191,9 +191,9 @@ class CounterClick(DetailView):
def parse_code(self, request):
"""Parse the string entered by the barman"""
string = str(request.POST['code']).upper()
if string == _("FIN"):
if string == _("END"):
return self.finish(request)
elif string == _("ANN"):
elif string == _("CAN"):
return self.cancel(request)
regex = re.compile(r"^((?P<nb>[0-9]+)X)?(?P<code>[A-Z0-9]+)$")
m = regex.match(string)
......
This diff is collapsed.
......@@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/1.8/ref/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.utils.translation import ugettext_lazy as _
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
......@@ -52,6 +53,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'core.middleware.AuthenticationMiddleware',
......@@ -152,6 +154,10 @@ USE_L10N = True
USE_TZ = True
LOCALE_PATHS = (
os.path.join(BASE_DIR, "locale"),
)
# Medias
MEDIA_ROOT = './data/'
MEDIA_URL = '/data/'
......@@ -218,16 +224,16 @@ SITH_MAIN_BOARD_GROUP=SITH_MAIN_CLUB['unix_name']+SITH_BOARD_SUFFIX
SITH_MAIN_MEMBERS_GROUP=SITH_MAIN_CLUB['unix_name']+SITH_MEMBER_SUFFIX
SITH_ACCOUNTING_PAYMENT_METHOD = [
('cheque', 'Chèque'),
('cash', 'Espèce'),
('transfert', 'Virement'),
('card', 'Carte banquaire'),
('cheque', _('Check')),
('cash', _('Cash')),
('transfert', _('Transfert')),
('card', _('Credit card')),
]
SITH_SUBSCRIPTION_PAYMENT_METHOD = [
('cheque', 'Chèque'),
('cash', 'Espèce'),
('other', 'Autre'),
('cheque', _('Check')),
('cash', _('Cash')),
('other', _('Other')),
]
SITH_COUNTER_BARS = [
......@@ -237,8 +243,8 @@ SITH_COUNTER_BARS = [
]
SITH_COUNTER_PAYMENT_METHOD = [
('cheque', 'Chèque'),
('cash', 'Espèce'),
('cheque', _('Check')),
('cash', _('Cash')),
]
SITH_COUNTER_BANK = [
......@@ -251,22 +257,22 @@ SITH_COUNTER_BANK = [
# Subscription durations are in semestres (should be settingized)
SITH_SUBSCRIPTIONS = {
'un-semestre': {
'name': 'Un semestre',
'name': _('One semester'),
'price': 15,
'duration': 1,
},
'deux-semestres': {
'name': 'Deux semestres',
'name': _('Two semesters'),
'price': 28,
'duration': 2,
},
'cursus-tronc-commun': {
'name': 'Cursus Tronc Commun',
'name': _('Common core cursus'),
'price': 45,
'duration': 4,
},
'cursus-branche': {
'name': 'Cursus Branche',
'name': _('Branch cursus'),
'price': 45,
'duration': 6,
},
......@@ -274,15 +280,15 @@ SITH_SUBSCRIPTIONS = {
}
SITH_CLUB_ROLES = {
10: 'Président',
9: 'Vice-Président',
7: 'Trésorier',
5: 'Responsable com',
4: 'Secrétaire',
3: 'Responsable info',
2: 'Membre du bureau',
1: 'Membre actif',
0: 'Curieux',
10: _('President'),
9: _('Vice-President'),
7: _('Treasurer'),
5: _('Communication supervisor'),
4: _('Secretary'),
3: _('IT supervisor'),
2: _('Board member'),
1: _('Active member'),
0: _('Curious'),
}
# This corresponds to the maximum role a user can freely subscribe to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment