mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-05-10 14:24:45 +00:00
added a test project to run tests
This commit is contained in:
parent
7881389012
commit
a73243f30b
9 changed files with 103 additions and 9 deletions
1
CHANGES
1
CHANGES
|
|
@ -1,3 +1,4 @@
|
|||
* Added a testproject to run tests
|
||||
* Merged @sleepyjames' PR that fixes an error when pofile save path contains '.po' in the path
|
||||
* Merged @rory's PR to correcty handle plural strings that have a leading/trailing newline (Issue #34)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@ include LICENSE
|
|||
recursive-include rosetta/locale *
|
||||
recursive-include rosetta/tests *
|
||||
recursive-include rosetta/templates *
|
||||
prune testproject
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2,19 +2,19 @@
|
|||
# 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.
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Rosetta\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-07-04 13:42+0200\n"
|
||||
"PO-Revision-Date: 2008-09-22 11:02\n"
|
||||
"Last-Translator: Admin Admin <admin@admin.com>\n"
|
||||
"PO-Revision-Date: 2012-03-31 02:17\n"
|
||||
"Last-Translator: Anonymous User <anonymous@user.tld>\n"
|
||||
"Language-Team: French <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Translated-Using: django-rosetta 0.4.RC2\n"
|
||||
"X-Translated-Using: django-rosetta 0.6.7\n"
|
||||
|
||||
#: templates/rosetta/languages.html:4 templates/rosetta/languages.html.py:6
|
||||
msgid "Language selection"
|
||||
|
|
@ -69,8 +69,9 @@ msgstr ""
|
|||
#: templates/rosetta/languages.html:46
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N documentation</"
|
||||
"a> for a guide on how to set up internationalization for your project."
|
||||
"Please refer to <a href=\"%(i18n_doc_link)s\">Django's I18N "
|
||||
"documentation</a> for a guide on how to set up internationalization for your"
|
||||
" project."
|
||||
msgstr ""
|
||||
"Veuillez vous référer à la <a href=\"%(i18n_doc_link)s\">documentation sur "
|
||||
"l'internationalisation de Django</a> pour un guide sur comment activer et "
|
||||
|
|
@ -97,9 +98,10 @@ msgstr ""
|
|||
msgid ""
|
||||
"Some items in your last translation block couldn't be saved: this usually "
|
||||
"happens when the catalog file changes on disk after you last loaded it."
|
||||
msgstr "Certains parmi vos derniers éléments n'ont pas pu être sauvés: ceci "
|
||||
"arrive généralement quand le catalogue de traductions à été modifié après qu'il ait "
|
||||
"été chargé."
|
||||
msgstr ""
|
||||
"Certains parmi vos derniers éléments n'ont pas pu être sauvés: ceci arrive "
|
||||
"généralement quand le catalogue de traductions à été modifié après qu'il ait"
|
||||
" été chargé."
|
||||
|
||||
#: templates/rosetta/pofile.html:28
|
||||
#, python-format
|
||||
|
|
|
|||
5
runtests.sh
Normal file
5
runtests.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd testproject
|
||||
python manage.py test rosetta
|
||||
cd ..
|
||||
0
testproject/__init__.py
Normal file
0
testproject/__init__.py
Normal file
16
testproject/manage.py
Normal file
16
testproject/manage.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
from django.core.management import execute_manager
|
||||
import sys
|
||||
import os
|
||||
|
||||
try:
|
||||
import settings # Assumed to be in the same directory.
|
||||
except ImportError:
|
||||
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
|
||||
sys.exit(1)
|
||||
|
||||
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
sys.path.insert(0, BASEDIR)
|
||||
|
||||
if __name__ == "__main__":
|
||||
execute_manager(settings)
|
||||
52
testproject/settings.py
Normal file
52
testproject/settings.py
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import django
|
||||
import os
|
||||
import sys
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
PYTHON_VERSION = '%s.%s' % sys.version_info[:2]
|
||||
DJANGO_VERSION = django.get_version()
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(PROJECT_PATH, 'rosetta.db')
|
||||
}
|
||||
}
|
||||
|
||||
TEST_DATABASE_CHARSET = "utf8"
|
||||
TEST_DATABASE_COLLATION = "utf8_general_ci"
|
||||
|
||||
DATABASE_SUPPORTS_TRANSACTIONS = True
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.auth',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
|
||||
'rosetta',
|
||||
]
|
||||
|
||||
LANGUAGE_CODE = "en"
|
||||
|
||||
LANGUAGES = (
|
||||
('en', 'English'),
|
||||
('ja', u'日本語'),
|
||||
('xx', u'XXXXX'),
|
||||
)
|
||||
|
||||
SOUTH_TESTS_MIGRATE = False
|
||||
|
||||
FIXTURE_DIRS = (
|
||||
os.path.join(PROJECT_PATH, 'fixtures'),
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'testproject.urls'
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = True
|
||||
17
testproject/urls.py
Normal file
17
testproject/urls.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from django.conf.urls.defaults import patterns, include, url
|
||||
|
||||
# Uncomment the next two lines to enable the admin:
|
||||
# from django.contrib import admin
|
||||
# admin.autodiscover()
|
||||
|
||||
urlpatterns = patterns('',
|
||||
# Examples:
|
||||
# url(r'^$', 'testproject.views.home', name='home'),
|
||||
# url(r'^testproject/', include('testproject.foo.urls')),
|
||||
|
||||
# Uncomment the admin/doc line below to enable admin documentation:
|
||||
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||
|
||||
# Uncomment the next line to enable the admin:
|
||||
# url(r'^admin/', include(admin.site.urls)),
|
||||
)
|
||||
Loading…
Reference in a new issue