+ New fabric task: makemessages
+ Added Spanish language files + Activated locale: es
This commit is contained in:
parent
06c2c36fd8
commit
d317646f24
|
@ -22,3 +22,6 @@ static_components
|
|||
|
||||
# Media
|
||||
shelfzilla/media/
|
||||
|
||||
# i18n
|
||||
django.pot
|
|
@ -1 +1,4 @@
|
|||
-r ../requirements.txt
|
||||
|
||||
# i18n
|
||||
django-rosetta==0.7.4
|
|
@ -2,7 +2,7 @@ from __future__ import with_statement, print_function
|
|||
from os.path import dirname, abspath, join
|
||||
|
||||
from fabric.api import *
|
||||
from fabric.context_managers import settings
|
||||
from fabric.context_managers import settings, cd
|
||||
from fabric.contrib.files import exists
|
||||
from fabric.colors import yellow, red, white, green
|
||||
|
||||
|
@ -76,7 +76,11 @@ def virtualenv():
|
|||
"""
|
||||
Activates virtualenv first
|
||||
"""
|
||||
return prefix('source .virtualenv/bin/activate')
|
||||
return prefix(
|
||||
'source {}/.virtualenv/bin/activate'.format(
|
||||
env.host_config['path']
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
|
@ -210,3 +214,27 @@ def rungrunt():
|
|||
Executes grunt
|
||||
"""
|
||||
run('grunt --force')
|
||||
|
||||
|
||||
@task_environment
|
||||
@task
|
||||
@hosts(['local'])
|
||||
def makemessages():
|
||||
"""
|
||||
Executes django-admin makemessages where needed
|
||||
"""
|
||||
with cd('shelfzilla'):
|
||||
if not exists('locale'):
|
||||
run('mkdir locale')
|
||||
with virtualenv():
|
||||
run('django-admin.py makemessages -l es', quiet=True)
|
||||
|
||||
"""
|
||||
apps = ['homepage', 'landing', 'manga', 'users']
|
||||
for app in apps:
|
||||
with cd('shelfzilla/apps/{}'.format(app)):
|
||||
if not exists('locale'):
|
||||
run('mkdir locale')
|
||||
with virtualenv():
|
||||
run('django-admin.py makemessages -l es', quiet=True)
|
||||
"""
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,164 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-04-02 17:01+0200\n"
|
||||
"PO-Revision-Date: 2014-04-02 17:05+0200\n"
|
||||
"Last-Translator: <fmartingr@me.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Translated-Using: django-rosetta 0.7.4\n"
|
||||
|
||||
#: models.py:6
|
||||
msgid "For review"
|
||||
msgstr "Para revisión"
|
||||
|
||||
#: models.py:8
|
||||
msgid "Review comment"
|
||||
msgstr "Comentario de revisión"
|
||||
|
||||
#: apps/manga/admin.py:13 apps/manga/models.py:68 apps/manga/models.py:69
|
||||
#: themes/bootflat/templates/_layout.html:28
|
||||
#: themes/bootflat/templates/manga/publishers/detail.html:13
|
||||
#: themes/bootflat/templates/manga/series/list.html:4
|
||||
msgid "Series"
|
||||
msgstr "Series"
|
||||
|
||||
#: apps/manga/admin.py:24 apps/manga/models.py:88
|
||||
#: themes/bootflat/templates/manga/publishers/detail.html:16
|
||||
#: themes/bootflat/templates/manga/publishers/detail.html:36
|
||||
#: themes/bootflat/templates/manga/series/detail.html:23
|
||||
msgid "Volumes"
|
||||
msgstr "Volúmenes"
|
||||
|
||||
#: apps/manga/models.py:10 apps/manga/models.py:41
|
||||
#: themes/bootflat/templates/manga/publishers/detail.html:35
|
||||
msgid "Name"
|
||||
msgstr "Nombre"
|
||||
|
||||
#: apps/manga/models.py:11 apps/manga/models.py:42
|
||||
msgid "Slug"
|
||||
msgstr "Álias"
|
||||
|
||||
#: apps/manga/models.py:12
|
||||
msgid "URL"
|
||||
msgstr "URL"
|
||||
|
||||
#: apps/manga/models.py:36
|
||||
msgid "Publisher"
|
||||
msgstr "Editorial"
|
||||
|
||||
#: apps/manga/models.py:37 themes/bootflat/templates/_layout.html:31
|
||||
#: themes/bootflat/templates/manga/publishers/list.html:4
|
||||
#: themes/bootflat/templates/manga/series/detail.html:33
|
||||
msgid "Publishers"
|
||||
msgstr "Editoriales"
|
||||
|
||||
#: apps/manga/models.py:44
|
||||
msgid "Summary"
|
||||
msgstr "Resumen"
|
||||
|
||||
#: apps/manga/models.py:45
|
||||
#: themes/bootflat/templates/manga/publishers/detail.html:37
|
||||
#: themes/bootflat/templates/manga/series/detail.html:26
|
||||
msgid "Finished"
|
||||
msgstr "Finalizado"
|
||||
|
||||
#: apps/manga/models.py:73
|
||||
msgid "Number"
|
||||
msgstr "Número"
|
||||
|
||||
#: apps/manga/models.py:78
|
||||
msgid "ISBN-10"
|
||||
msgstr "ISBN-10"
|
||||
|
||||
#: apps/manga/models.py:80
|
||||
msgid "ISBN-13"
|
||||
msgstr "ISBN-13"
|
||||
|
||||
#: apps/manga/models.py:87
|
||||
#: themes/bootflat/templates/manga/series/includes/volume.html:24
|
||||
msgid "Volume"
|
||||
msgstr "Volumen"
|
||||
|
||||
#: apps/manga/models.py:99
|
||||
msgid "have"
|
||||
msgstr "tiene"
|
||||
|
||||
#: apps/manga/models.py:112
|
||||
msgid "wants"
|
||||
msgstr "quiere"
|
||||
|
||||
#: apps/manga/views/volumes.py:23
|
||||
msgid "{} is already on your collection!"
|
||||
msgstr "¡{} ya está en tu colección!"
|
||||
|
||||
#: apps/manga/views/volumes.py:32
|
||||
msgid "{} removed from wishlist"
|
||||
msgstr "{} eliminado de la lista de deseados"
|
||||
|
||||
#: apps/manga/views/volumes.py:38
|
||||
msgid "{} wishlisted!"
|
||||
msgstr "¡{} añadido a la lista de deseados!"
|
||||
|
||||
#: apps/manga/views/volumes.py:61
|
||||
msgid "{} removed from collection."
|
||||
msgstr "{} eliminado de tu colección."
|
||||
|
||||
#: apps/manga/views/volumes.py:66
|
||||
msgid "{} added to collection!"
|
||||
msgstr "¡{} añadido a tu colección!"
|
||||
|
||||
#: apps/users/forms.py:31
|
||||
msgid "This account is disabled."
|
||||
msgstr "Esta cuenta está desactivada."
|
||||
|
||||
#: apps/users/forms.py:35
|
||||
msgid "User with those credentials was not found."
|
||||
msgstr "No se ha encontrado un usuario con esos credenciales."
|
||||
|
||||
#: apps/users/views.py:39
|
||||
msgid "Logged in successfully."
|
||||
msgstr "Has accedido correctamente."
|
||||
|
||||
#: apps/users/views.py:58
|
||||
msgid "Logged out successfully"
|
||||
msgstr "Sesión finalizada."
|
||||
|
||||
#: settings/base.py:116
|
||||
msgid "Spanish"
|
||||
msgstr "Español"
|
||||
|
||||
#: themes/bootflat/templates/_layout.html:39
|
||||
msgid "My collection"
|
||||
msgstr "Mi colección"
|
||||
|
||||
#: themes/bootflat/templates/_layout.html:40
|
||||
msgid "Profile"
|
||||
msgstr "Perfil"
|
||||
|
||||
#: themes/bootflat/templates/_layout.html:46
|
||||
msgid "Log in"
|
||||
msgstr "Entrar"
|
||||
|
||||
#: themes/bootflat/templates/manga/publishers/detail.html:20
|
||||
msgid "Homepage"
|
||||
msgstr "Página principal"
|
||||
|
||||
#: themes/bootflat/templates/users/login.html:10
|
||||
msgid "Access the site"
|
||||
msgstr "Accede al sitio"
|
||||
|
||||
#: themes/bootflat/templates/users/login.html:23
|
||||
msgid "Login"
|
||||
msgstr "Entrar"
|
|
@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/1.6/ref/settings/
|
|||
import os
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
_ = lambda x: x
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
||||
|
@ -78,6 +80,7 @@ MIDDLEWARE_CLASSES = (
|
|||
'reversion.middleware.RevisionMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
|
@ -109,7 +112,15 @@ DATABASES = {
|
|||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.6/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'es-es'
|
||||
LANGUAGES = (
|
||||
('es', _('Spanish')),
|
||||
)
|
||||
|
||||
LANGUAGE_CODE = 'es'
|
||||
|
||||
LOCALE_PATHS = (
|
||||
os.path.join(BASE_DIR, 'locale'),
|
||||
)
|
||||
|
||||
TIME_ZONE = 'Europe/Madrid'
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ STATICFILES_DIRS += (
|
|||
# Apps
|
||||
INSTALLED_APPS += (
|
||||
'django.contrib.webdesign',
|
||||
'rosetta',
|
||||
)
|
||||
|
||||
# Filer
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
from django.conf.urls import patterns, include, url
|
||||
from django.conf import settings
|
||||
|
||||
from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
|
||||
from .views import MessagesView
|
||||
|
||||
|
||||
admin.autodiscover()
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^messages/$', MessagesView.as_view(), name="contrib.messages"),
|
||||
|
@ -27,3 +28,9 @@ if settings.DEBUG:
|
|||
{'document_root': settings.MEDIA_ROOT}
|
||||
),
|
||||
)
|
||||
|
||||
if 'rosetta' in settings.INSTALLED_APPS:
|
||||
urlpatterns += patterns(
|
||||
'',
|
||||
url(r'^rosetta/', include('rosetta.urls')),
|
||||
)
|
||||
|
|
Reference in New Issue