Browse Source

Merge pull request #344 from tracim/fix/342/t9n_files_cleaning

Damien Accorsi 7 years ago
parent
commit
ba2479fa8d

+ 3 - 0
.gitignore View File

@@ -77,3 +77,6 @@ wsgidav.conf
77 77
 # builded files from gulp scripts
78 78
 /tracim/tracim/public/assets/dist/
79 79
 /tracim/tracim/public/assets/js/main_es5.js
80
+
81
+# binary translation files
82
+*.mo

+ 2 - 1
.travis.yml View File

@@ -15,11 +15,12 @@ addons:
15 15
   mysql: "5.5"
16 16
 
17 17
 install:
18
-  - cd tracim && python setup.py develop; cd -
18
+  - cd tracim && python setup.py develop && cd -
19 19
   - echo coveralls >> install/requirements.txt; echo
20 20
   - cat install/requirements.postgresql.txt >> install/requirements.txt; echo
21 21
   - cat install/requirements.mysql.txt >> install/requirements.txt; echo
22 22
   - pip install -r install/requirements.txt; echo
23
+  - cd tracim && python setup.py compile_catalog && cd -
23 24
 
24 25
 before_script:
25 26
   - cp ${TRAVIS_BUILD_DIR}/tracim/development.ini.base ${TRAVIS_BUILD_DIR}/tracim/development.ini

+ 6 - 0
README.md View File

@@ -167,6 +167,12 @@ Create configuration files for a development environment and for `WsgiDAV`:
167 167
     cp tracim/development.ini.base tracim/development.ini
168 168
     cp tracim/wsgidav.conf.sample tracim/wsgidav.conf
169 169
 
170
+## Translation ##
171
+
172
+Compile translation binary files from available catalogs:
173
+
174
+    python setup.py compile_catalog
175
+
170 176
 ## Database schema ##
171 177
 
172 178
 The last step before running the application is to initialize the database

+ 2 - 2
tracim/development.ini.base View File

@@ -32,8 +32,8 @@ cookie_secret = 3283411b-1904-4554-b0e1-883863b53080
32 32
 [app:main]
33 33
 use = egg:tracim
34 34
 full_stack = true
35
-# You can set french as default language by uncommenting next line
36
-# i18n.lang = fr
35
+# Fallback language if browser and tracim can't find one they agree on.
36
+i18n.lang = en
37 37
 
38 38
 cache_dir = %(here)s/data
39 39
 # preview generator cache directory

+ 43 - 47
tracim/setup.py View File

@@ -1,23 +1,8 @@
1 1
 # -*- coding: utf-8 -*-
2
-#quickstarted Options:
3
-#
4
-# sqlalchemy: True
5
-# auth:       sqlalchemy
6
-# mako:       True
7
-#
8
-#
9
-
10
-#This is just a work-around for a Python2.7 issue causing
11
-#interpreter crash at exit when trying to log an info message.
12
-try:
13
-    import logging
14
-    import multiprocessing
15
-except:
16
-    pass
17
-
18
-import sys
19
-py_version = sys.version_info[:2]
20
-
2
+# quickstarted Options:
3
+#  sqlalchemy: True
4
+#  auth:       sqlalchemy
5
+#  mako:       True
21 6
 try:
22 7
     from setuptools import setup, find_packages
23 8
 except ImportError:
@@ -25,6 +10,7 @@ except ImportError:
25 10
     use_setuptools()
26 11
     from setuptools import setup, find_packages
27 12
 
13
+
28 14
 classifiers = [
29 15
     "License :: OSI Approved :: MIT License",
30 16
     "Programming Language :: Python",
@@ -33,33 +19,37 @@ classifiers = [
33 19
     "Programming Language :: Python :: 3.6",
34 20
 ]
35 21
 
36
-testpkgs=['WebTest >= 1.2.3',
37
-               'nose',
38
-               'coverage',
39
-               'gearbox'
40
-               ]
22
+testpkgs = [
23
+    'WebTest >= 1.2.3',
24
+    'nose',
25
+    'coverage',
26
+    'gearbox',
27
+]
41 28
 
42
-install_requires=[
43
-    "TurboGears2==2.3.7",
44
-    "Genshi",
45
-    "Mako",
46
-    "zope.sqlalchemy >= 0.4",
47
-    "sqlalchemy",
48
-    "alembic",
49
-    "repoze.who",
50
-    "who_ldap>=3.2.1",
51
-    "python-ldap-test==0.2.1",
52
-    "unicode-slugify==0.1.3",
53
-    "pytz==2014.7",
29
+install_requires = [
30
+    'TurboGears2==2.3.7',
31
+    'Genshi',
32
+    'Mako',
33
+    'zope.sqlalchemy >= 0.4',
34
+    'sqlalchemy',
35
+    'alembic',
36
+    'repoze.who',
37
+    'who_ldap>=3.2.1',
38
+    'python-ldap-test==0.2.1',
39
+    'unicode-slugify==0.1.3',
40
+    'pytz==2014.7',
54 41
     'rq==0.7.1',
55 42
     'filedepot>=0.5.0',
56
-    'preview-generator'
57
-    ]
43
+    'preview-generator',
44
+]
58 45
 
59 46
 setup(
60 47
     name='tracim',
61 48
     version='1.0.0',
62
-    description='Tracim is plateform software designed to improve traceability and productivity in collaborative work.',
49
+    description=(
50
+        'Tracim is a plateform software designed to improve '
51
+        'traceability and productivity in collaborative work.'
52
+    ),
63 53
     author='Damien ACCORSI',
64 54
     author_email='damien.accorsi@free.fr',
65 55
     url='https://github.com/tracim/tracim',
@@ -68,14 +58,20 @@ setup(
68 58
     include_package_data=True,
69 59
     test_suite='nose.collector',
70 60
     tests_require=testpkgs,
71
-    package_data={'tracim': ['i18n/*/LC_MESSAGES/*.mo',
72
-                                 'templates/*/*',
73
-                                 'public/*/*']},
74
-    message_extractors={'tracim': [
61
+    package_data={
62
+        'tracim': [
63
+            'i18n/*/LC_MESSAGES/*.mo',
64
+            'templates/*/*',
65
+            'public/*/*',
66
+        ]
67
+    },
68
+    message_extractors={
69
+        'tracim': [
75 70
             ('**.py', 'python', None),
76 71
             ('templates/**.mak', 'mako', {'input_encoding': 'utf-8'}),
77
-            ('public/**', 'ignore', None)]},
78
-
72
+            ('public/**', 'ignore', None)
73
+        ]
74
+    },
79 75
     entry_points={
80 76
         'paste.app_factory': [
81 77
             'main = tracim.config.middleware:make_app'
@@ -92,6 +88,6 @@ setup(
92 88
     },
93 89
     dependency_links=[
94 90
         'http://github.com/algoo/preview-generator/tarball/master#egg=preview_generator-1.0',
95
-        ],
96
-    zip_safe=False
91
+    ],
92
+    zip_safe=False,
97 93
 )

BIN
tracim/tracim/i18n/fr/LC_MESSAGES/tracim.mo View File


+ 0 - 24
tracim/tracim/i18n/ru/LC_MESSAGES/pboard.po View File

@@ -1,24 +0,0 @@
1
-# Russian translations for ${package}.
2
-# Copyright (C) 2008 ORGANIZATION
3
-# This file is distributed under the same license as the ${package} project.
4
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
5
-#
6
-msgid ""
7
-msgstr ""
8
-"Project-Id-Version: ${package} 0.0.0\n"
9
-"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
-"POT-Creation-Date: 2008-01-13 14:00+0200\n"
11
-"PO-Revision-Date: 2008-01-13 14:00+0200\n"
12
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
-"Language-Team: ru <LL@li.org>\n"
14
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
15
-"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
16
-"MIME-Version: 1.0\n"
17
-"Content-Type: text/plain; charset=utf-8\n"
18
-"Content-Transfer-Encoding: 8bit\n"
19
-"Generated-By: Babel 0.9.1\n"
20
-
21
-#: ${package}/controllers/root.py:13
22
-msgid "Your application is now running"
23
-msgstr "Ваши приложение успешно запущено"
24
-