Traduction de l'interface en Français

This commit is contained in:
2017-08-24 22:36:55 +02:00
parent 67afac3d45
commit 8afd6dec6e
7 changed files with 243 additions and 9 deletions

View File

@ -0,0 +1,26 @@
# OpenBackloggery.
# Copyright (C) 2017
# This file is distributed under the same license as the openbackloggery package.
# Olivier DOSSMANN <git@dossmann.net>, 2017.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-24 22:23+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Olivier DOSSMANN <git@dossmann.net>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: collection/settings.py:114
msgid "French"
msgstr "Français"
#: collection/settings.py:115
msgid "English"
msgstr "Anglais"

View File

@ -11,6 +11,8 @@ https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
from django.utils.translation import ugettext_lazy as _
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -44,6 +46,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
@ -105,7 +108,12 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'fr'
LANGUAGES = (
('fr', _('French')),
('en', _('English')),
)
TIME_ZONE = 'UTC'
@ -123,3 +131,9 @@ STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(os.path.abspath(os.path.curdir), 'static')
if os.getenv('STATIC_ROOT', None):
STATIC_ROOT = os.path.abspath(os.getenv('STATIC_ROOT'))
# Translation directories
LOCALE_PATHS = [
os.path.join(BASE_DIR, 'conf/locale'),
os.path.join(BASE_DIR, 'collection/locale')
]