Commit aa1162a4c74b0425471176f3d45df6068e4d712a

Authored by Fabio Kaiser Rauber
2 parents a2d781f7 1fa57960

Merge branch 'master' of https://github.com/TracyWebTech/colab

etc/apache2/sites-available/colab
... ... @@ -1,48 +0,0 @@
1   -<VirtualHost *:80>
2   - ServerName colab01a.interlegis.leg.br
3   - ServerAlias colab.interlegis.leg.br
4   - ServerAlias colab.interlegis.gov.br
5   -
6   - <Proxy *>
7   - Order deny,allow
8   - Allow from all
9   - </Proxy>
10   -
11   - RewriteEngine On
12   - RewriteRule ^/login(.*) http://colab-backend.interlegis.leg.br/login$1 [P]
13   - RewriteRule ^/logout(.*) http://colab-backend.interlegis.leg.br/logout$1 [P]
14   -
15   - WSGIDaemonProcess colab user=www-data group=www-data threads=25
16   - WSGIProcessGroup colab
17   -
18   - Alias /static/admin/ /usr/local/django/colab/lib/python2.6/site-packages/django/contrib/admin/media/
19   - <Directory /usr/local/django/colab/lib/python2.6/site-packages/django/contrib/admin/media/>
20   - Options -Indexes
21   - Order deny,allow
22   - Allow from all
23   - AllowOverride None
24   - </Directory>
25   -
26   - Alias /static/ /usr/local/django/colab/static/
27   - <Directory /usr/local/django/colab/static/>
28   - Options -Indexes
29   - Order deny,allow
30   - Allow from all
31   - AllowOverride None
32   - </Directory>
33   -
34   - WSGIScriptAlias / /usr/local/django/colab/wsgi/colab.wsgi
35   - <Directory /usr/local/django/colab/wsgi/>
36   - Order deny,allow
37   - Allow from all
38   - AllowOverride None
39   - </Directory>
40   -
41   - ErrorLog /var/log/apache2/error.log
42   -
43   - # Possible values include: debug, info, notice, warn, error, crit,
44   - # alert, emerg.
45   - LogLevel warn
46   -
47   - CustomLog /var/log/apache2/access.log combined
48   -</VirtualHost>
etc/apache2/wsgi/colab.wsgi
... ... @@ -1,12 +0,0 @@
1   -import site
2   -import os
3   -
4   -cwd_path = os.path.abspath(os.path.dirname(__file__))
5   -virtualenv_path = os.path.join(cwd_path, '../lib/python2.6/site-packages')
6   -site.addsitedir(virtualenv_path)
7   -
8   -from django.core.handlers.wsgi import WSGIHandler
9   -os.environ['DJANGO_SETTINGS_MODULE'] = 'colab.settings'
10   -application = WSGIHandler()
11   -
12   -
etc/autofs/listas
... ... @@ -1 +0,0 @@
1   -archives -fstype=fuse,rw,nodev,users,noatime :sshfs\#root@listas.interlegis.gov.br\:/var/lib/mailman/archives/private
etc/cron.d/colab_import_emails
... ... @@ -1,2 +0,0 @@
1   -PATH="/usr/local/django/colab/bin"
2   -* * * * * root DJANGO_SETTINGS_MODULE="colab.settings" django-admin.py import_emails --archives_path=/usr/local/django/colab/mnt/archives/ --exclude-list=saberes-divulgacao --exclude-list=pml --exclude-list=mailman --exclude-list=lexml-anuncios > /tmp/colab-import-emails-last.log
etc/cron.d/colab_solr_reindex
... ... @@ -1,3 +0,0 @@
1   -PATH="/usr/bin"
2   -*/1 * * * * root wget "http://solr.interlegis.leg.br:8080/solr/dataimport?wt=json&indent=true&command=delta-import" -q -O - >> /tmp/solr-delta-import.log
3   -4 6 * * * root wget "http://solr.interlegis.leg.br:8080/solr/dataimport?wt=json&indent=true&command=full-import" -q -O - >> /tmp/solr-full-import.log
src/colab/custom_settings.py
1 1 from settings import *
  2 +from django.utils.translation import ugettext_lazy as _
2 3  
3 4 DEBUG = False
4 5  
... ... @@ -6,11 +7,10 @@ TEMPLATE_DEBUG = False
6 7  
7 8 TIME_ZONE = 'America/Sao_Paulo'
8 9  
9   -gettext = lambda s: s
10 10 LANGUAGES = (
11   - ('en', gettext('English')),
12   - ('pt-br', gettext('Portuguese')),
13   - ('es', gettext('Spanish')),
  11 + ('en', _('English')),
  12 + ('pt-br', _('Portuguese')),
  13 + ('es', _('Spanish')),
14 14 )
15 15  
16 16 DJANGO_DATE_FORMAT_TO_JS = {
... ... @@ -33,11 +33,11 @@ ATTACHMENTS_FOLDER_PATH = &#39;/home/colab/trac/attachments/&#39;
33 33  
34 34 ORDERING_DATA = {
35 35 'latest': {
36   - 'name': gettext(u'Recent activity'),
  36 + 'name': _(u'Recent activity'),
37 37 'fields': ('-modified', '-created'),
38 38 },
39 39 'hottest': {
40   - 'name': gettext(u'Relevance'),
  40 + 'name': _(u'Relevance'),
41 41 'fields': None,
42 42 },
43 43 }
... ... @@ -45,16 +45,16 @@ ORDERING_DATA = {
45 45 # File type groupings is a tuple of tuples containg what it should filter,
46 46 # how it should be displayed, and a tuple of which mimetypes it includes
47 47 FILE_TYPE_GROUPINGS = (
48   - ('document', gettext(u'Document'),
  48 + ('document', _(u'Document'),
49 49 ('doc', 'docx', 'odt', 'otx', 'dotx', 'pdf', 'ott')),
50   - ('presentation', gettext(u'Presentation'), ('ppt', 'pptx', 'odp')),
51   - ('text', gettext(u'Text'), ('txt', 'po', 'conf', 'log')),
52   - ('code', gettext(u'Code'),
  50 + ('presentation', _(u'Presentation'), ('ppt', 'pptx', 'odp')),
  51 + ('text', _(u'Text'), ('txt', 'po', 'conf', 'log')),
  52 + ('code', _(u'Code'),
53 53 ('py', 'php', 'js', 'sql', 'sh', 'patch', 'diff', 'html', '')),
54   - ('compressed', gettext(u'Compressed'), ('rar', 'zip', 'gz', 'tgz', 'bz2')),
55   - ('image', gettext(u'Image'),
  54 + ('compressed', _(u'Compressed'), ('rar', 'zip', 'gz', 'tgz', 'bz2')),
  55 + ('image', _(u'Image'),
56 56 ('jpg', 'jpeg', 'png', 'tiff', 'gif', 'svg', 'psd', 'planner', 'cdr')),
57   - ('spreadsheet', gettext(u'Spreadsheet'),
  57 + ('spreadsheet', _(u'Spreadsheet'),
58 58 ('ods', 'xls', 'xlsx', 'xslt', 'csv')),
59 59 )
60 60  
... ... @@ -67,7 +67,7 @@ HAYSTACK_CUSTOM_HIGHLIGHTER = &#39;colab.utils.highlighting.ColabHighlighter&#39;
67 67 HAYSTACK_CONNECTIONS = {
68 68 'default': {
69 69 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
70   - 'URL': os.environ.get('COLAB_SOLR_URL'),
  70 + 'URL': os.environ.get('COLAB_SOLR_URL', 'http://localhost:8983/solr'),
71 71 }
72 72 }
73 73  
... ... @@ -193,7 +193,9 @@ LOGGING = {
193 193 }
194 194  
195 195 COLAB_FROM_ADDRESS = '"Colab Interlegis" <noreply@interlegis.leg.br>'
196   -SERVER_EMAIL = EMAIL_HOST_USER = COLAB_FROM_ADDRESS
  196 +SERVER_EMAIL = COLAB_FROM_ADDRESS
  197 +EMAIL_HOST = 'smtp.interlegis.leg.br'
  198 +EMAIL_PORT = 25
197 199  
198 200 TEMPLATE_CONTEXT_PROCESSORS = (
199 201 'django.contrib.auth.context_processors.auth',
... ... @@ -258,8 +260,8 @@ MESSAGE_TAGS = {
258 260 ### Feedzilla (planet)
259 261 from feedzilla.settings import *
260 262 FEEDZILLA_PAGE_SIZE = 5
261   -FEEDZILLA_SITE_TITLE = gettext(u'Planet Colab')
262   -FEEDZILLA_SITE_DESCRIPTION = gettext(u'Colab blog aggregator')
  263 +FEEDZILLA_SITE_TITLE = _(u'Planet Colab')
  264 +FEEDZILLA_SITE_DESCRIPTION = _(u'Colab blog aggregator')
263 265  
264 266  
265 267 ### Mailman API settings
... ...
src/locale/pt_BR/LC_MESSAGES/django.mo
No preview for this file type
src/locale/pt_BR/LC_MESSAGES/django.po
... ... @@ -7,7 +7,7 @@ msgid &quot;&quot;
7 7 msgstr ""
8 8 "Project-Id-Version: PACKAGE VERSION\n"
9 9 "Report-Msgid-Bugs-To: \n"
10   -"POT-Creation-Date: 2013-11-13 11:49-0200\n"
  10 +"POT-Creation-Date: 2013-11-13 15:58-0200\n"
11 11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 13 "Language-Team: LANGUAGE <LL@li.org>\n"
... ... @@ -229,7 +229,6 @@ msgstr &quot;Conjunto de mudanças&quot;
229 229  
230 230 #: badger/models.py:27 search/views.py:42
231 231 #: search/templates/search/includes/search_filters.html:124
232   -#: templates/search.html:33
233 232 msgid "Ticket"
234 233 msgstr "Tíquetes"
235 234  
... ... @@ -403,7 +402,7 @@ msgid &quot;Latest collaborations&quot;
403 402 msgstr "Últimas colaborações"
404 403  
405 404 #: search/forms.py:16 search/templates/search/search.html:39
406   -#: templates/base.html:90 templates/search.html:7
  405 +#: templates/base.html:90
407 406 msgid "Search"
408 407 msgstr "Busca"
409 408  
... ... @@ -500,7 +499,6 @@ msgstr &quot;Tamanho&quot;
500 499  
501 500 #: search/utils.py:7 search/views.py:20
502 501 #: search/templates/search/includes/search_filters.html:116
503   -#: templates/search.html:25
504 502 msgid "Wiki"
505 503 msgstr "Wiki"
506 504  
... ... @@ -513,12 +511,10 @@ msgid &quot;Attachments&quot;
513 511 msgstr "Anexos"
514 512  
515 513 #: search/views.py:31 search/templates/search/includes/search_filters.html:120
516   -#: templates/search.html:29
517 514 msgid "Discussion"
518 515 msgstr "Discussões"
519 516  
520 517 #: search/views.py:84 search/templates/search/includes/search_filters.html:128
521   -#: templates/search.html:37
522 518 msgid "Changeset"
523 519 msgstr "Conjunto de Mudanças"
524 520  
... ... @@ -540,11 +536,11 @@ msgid &quot;Search here&quot;
540 536 msgstr "Pesquise aqui"
541 537  
542 538 #: search/templates/search/search.html:67
543   -#: search/templates/search/search.html:77 templates/search.html:18
  539 +#: search/templates/search/search.html:77
544 540 msgid "Filters"
545 541 msgstr "Filtros"
546 542  
547   -#: search/templates/search/search.html:98 templates/search.html:48
  543 +#: search/templates/search/search.html:98
548 544 msgid "No results for your search."
549 545 msgstr "Não há resultados para sua busca."
550 546  
... ... @@ -552,28 +548,10 @@ msgstr &quot;Não há resultados para sua busca.&quot;
552 548 msgid "You are searching for"
553 549 msgstr "Você está procurando por"
554 550  
555   -#: search/templates/search/search.html:110 templates/search.html:57
556   -msgid "Previous"
557   -msgstr "Anterior"
558   -
559   -#: search/templates/search/search.html:113 templates/search.html:61
560   -msgid "Page"
561   -msgstr "Página"
562   -
563   -#: search/templates/search/search.html:113 templates/search.html:61
564   -msgid "of"
565   -msgstr "de"
566   -
567   -#: search/templates/search/search.html:118 templates/search.html:65
568   -msgid "Next"
569   -msgstr "Pŕoximo"
570   -
571 551 #: search/templates/search/includes/search_filters.html:5
572 552 #: search/templates/search/includes/search_filters.html:33
573 553 #: search/templates/search/includes/search_filters.html:51
574 554 #: search/templates/search/includes/search_filters.html:69
575   -#: templates/search.html:23 templates/search.html.py:27
576   -#: templates/search.html:31 templates/search.html.py:35
577 555 msgid "Remove filter"
578 556 msgstr "Remover filtro"
579 557  
... ... @@ -587,18 +565,7 @@ msgstr &quot;Filtro&quot;
587 565 msgid "Sort by"
588 566 msgstr "Ordenar por"
589 567  
590   -#: search/templates/search/includes/search_filters.html:101
591   -#, python-format
592   -msgid "<strong>%(name)s</strong>"
593   -msgstr "<strong>%(name)s</strong>"
594   -
595   -#: search/templates/search/includes/search_filters.html:103
596   -#, python-format
597   -msgid "%(name)s"
598   -msgstr "%(name)s"
599   -
600 568 #: search/templates/search/includes/search_filters.html:111
601   -#: templates/search.html:20
602 569 msgid "Types"
603 570 msgstr "Tipos"
604 571  
... ... @@ -921,17 +888,36 @@ msgstr &quot;RSS - Últimas Discussões&quot;
921 888 msgid "Willing to help"
922 889 msgstr "Vontade de ajudar"
923 890  
924   -#: templates/search.html:10
925   -msgid "documents found in"
926   -msgstr "documentos encontrados em"
927   -
928   -#: templates/search.html:11
929   -msgid "seconds"
930   -msgstr "segundos"
931   -
932 891 #: templates/includes/big_header.html:9
933 892 msgid "INTERLEGIS COMMUNITIES"
934 893 msgstr "COMUNIDADES INTERLEGIS"
935 894  
  895 +#~ msgid "documents found in"
  896 +#~ msgstr "documentos encontrados em"
  897 +
  898 +#~ msgid "seconds"
  899 +#~ msgstr "segundos"
  900 +
  901 +#~ msgid "Previous"
  902 +#~ msgstr "Anterior"
  903 +
  904 +#~ msgid "Page"
  905 +#~ msgstr "Página"
  906 +
  907 +#~ msgid "of"
  908 +#~ msgstr "de"
  909 +
  910 +#~ msgid "Next"
  911 +#~ msgstr "Pŕoximo"
  912 +
  913 +#~ msgid "%(option)s"
  914 +#~ msgstr "%(option)s"
  915 +
  916 +#~ msgid "%(name)s"
  917 +#~ msgstr "%(name)s"
  918 +
  919 +#~ msgid "<strong>%(name)s</strong>"
  920 +#~ msgstr "<strong>%(name)s</strong>"
  921 +
936 922 #~ msgid "OpenData - Communities Interlegis"
937 923 #~ msgstr "OpenData - Comunidades Interlegis"
... ...
src/search/templates/search/includes/search_filters.html
... ... @@ -98,9 +98,9 @@
98 98 <span class="glyphicon glyphicon-chevron-right"></span>
99 99 <a href="{% append_to_get order=option p=1 %}">
100 100 {% ifequal request.GET.order option %}
101   - {% blocktrans with name=dict_order.name %}<strong>{{ name }}</strong>{% endblocktrans %}
  101 + <strong>{{ dict_order.name }}</strong>
102 102 {% else %}
103   - {% blocktrans with name=dict_order.name %}{{ name }}{% endblocktrans %}
  103 + {{ dict_order.name }}
104 104 {% endifequal %}
105 105 </a>
106 106 </li>
... ...
src/templates/search.html
... ... @@ -1,73 +0,0 @@
1   -{% extends "base.html" %}
2   -{% load i18n superarchives %}
3   -
4   -{% block main-content %}
5   - <div class="row">
6   - <div class="col-lg-2">
7   - <h2>{% trans "Search" %}</h2>
8   - </div>
9   - <span class="pull-right quiet">
10   - {{ docs.numFound }} {% trans "documents found in" %}
11   - {{ docs.QTime|floatformat:3 }} {% trans "seconds" %}
12   - </span>
13   - </div>
14   - <hr/>
15   -
16   - <div class="row">
17   - <div class="col-lg-2">
18   - <h3>{% trans "Filters" %}</h3>
19   -
20   - <h4>{% trans "Types" %}</h4>
21   -
22   - <ul class="none indent">
23   - <li {% ifequal type "wiki" %} title="{% trans "Remove filter" %}" {% endifequal %}>
24   - <span class="glyphicon glyphicon-book"></span>
25   - <a href="{% ifnotequal type "wiki" %} {% append_to_get type='wiki' %} {% else %} {% append_to_get type="" %} {% endifnotequal %}">{% trans "Wiki" %}</a>
26   - </li>
27   - <li {% ifequal type "thread" %} title="{% trans "Remove filter" %}" {% endifequal %}>
28   - <span class="glyphicon glyphicon-envelope"></span>
29   - <a href="{% ifnotequal type "thread" %} {% append_to_get type='thread' %} {% else %} {% append_to_get type="" %} {% endifnotequal %}">{% trans "Discussion" %}</a>
30   - </li>
31   - <li {% ifequal type "ticket" %} title="{% trans "Remove filter" %}" {% endifequal %}>
32   - <span class="glyphicon glyphicon-tag"></span>
33   - <a href="{% ifnotequal type "ticket" %} {% append_to_get type='ticket' %} {% else %} {% append_to_get type="" %} {% endifnotequal %}">{% trans "Ticket" %}</a>
34   - </li>
35   - <li {% ifequal type "changeset" %} title="{% trans "Remove filter" %}" {% endifequal %}>
36   - <span class="glyphicon glyphicon-align-right"></span>
37   - <a href="{% ifnotequal type "changeset" %} {% append_to_get type='changeset' %} {% else %} {% append_to_get type="" %} {% endifnotequal %}">{% trans "Changeset" %}</a>
38   - </li>
39   - </ul>
40   - </div>
41   -
42   - <div class="col-lg-10">
43   - <ul class="none indent">
44   - {% for doc in docs %}
45   - {% include "message-preview.html" %}
46   - {% empty %}
47   - <li class="text-center">
48   - {% trans "No results for your search." %}
49   - </li>
50   - {% endfor %}
51   - </ul>
52   -
53   - {% if docs.numFound %}
54   - <div>
55   - <span>
56   - {% if docs.has_previous %}
57   - <a href="{% append_to_get p=docs.previous_page_number %}">{% trans "Previous" %}</a>
58   - {% endif %}
59   -
60   - <span>
61   - {% trans "Page" %} {{ docs.page_num }} {% trans "of" %} {{ docs.num_of_pages }}
62   - </span>
63   -
64   - {% if docs.has_next %}
65   - <a href="{% append_to_get p=docs.next_page_number %}">{% trans "Next" %}</a>
66   - {% endif %}
67   - </span>
68   - </div>
69   - </div>
70   - {% endif %}
71   - </div>
72   -
73   -{% endblock %}