Commit 565f50f577534830862fee996b532b2f7444a113
1 parent
d7359554
Exists in
master
Versão inicial da lógica de perfis.
Showing
11 changed files
with
308 additions
and
183 deletions
Show diff stats
@@ -0,0 +1,48 @@ | @@ -0,0 +1,48 @@ | ||
1 | +"""create profile table | ||
2 | + | ||
3 | +Revision ID: 2dcee6dfae9d | ||
4 | +Revises: 4f12d8650050 | ||
5 | +Create Date: 2016-05-24 14:30:22.687206 | ||
6 | + | ||
7 | +""" | ||
8 | + | ||
9 | +# revision identifiers, used by Alembic. | ||
10 | +revision = '2dcee6dfae9d' | ||
11 | +down_revision = '4f12d8650050' | ||
12 | + | ||
13 | +from alembic import op | ||
14 | +import sqlalchemy as sa | ||
15 | +from sqlalchemy.dialects.postgresql import ARRAY | ||
16 | +import datetime | ||
17 | + | ||
18 | + | ||
19 | +def make_timestamp(): | ||
20 | + now = datetime.datetime.utcnow() | ||
21 | + return now.isoformat() | ||
22 | + | ||
23 | + | ||
24 | +def upgrade(): | ||
25 | + op.create_table( | ||
26 | + 'profile', | ||
27 | + sa.Column('id', sa.Integer, primary_key=True), | ||
28 | + sa.Column('name', sa.Text, nullable=False, unique=True), | ||
29 | + sa.Column('description', sa.Text, nullable=False), | ||
30 | + sa.Column('access', ARRAY(sa.Text), nullable=False), | ||
31 | + sa.Column('created', sa.Text, server_default=make_timestamp()), | ||
32 | + ) | ||
33 | + | ||
34 | + # Add two categories | ||
35 | + query = 'INSERT INTO profile (name, description, access) VALUES (\'Colaborador\', \'Colaborador geral\', \'{wikilibras}\')' | ||
36 | + op.execute(query) | ||
37 | + query = 'INSERT INTO profile (name, description, access) VALUES (\'Animador\', \'Animador 3D\', \'{wikilibras, corretor_sinais}\')' | ||
38 | + op.execute(query) | ||
39 | + query = 'INSERT INTO profile (name, description, access) VALUES (\'Especialista\', \'Especialista em LIBRAS\', \'{wikilibras, validador_sinais}\')' | ||
40 | + op.execute(query) | ||
41 | + | ||
42 | + op.add_column('user', sa.Column('profile_id', sa.Integer, sa.ForeignKey('profile.id'), server_default="1")) | ||
43 | + | ||
44 | + | ||
45 | +def downgrade(): | ||
46 | + op.drop_column('user', 'profile_id') | ||
47 | + op.drop_table('profile') | ||
48 | + | ||
0 | \ No newline at end of file | 49 | \ No newline at end of file |
pybossa/forms/forms.py
@@ -279,7 +279,11 @@ class RegisterForm(Form): | @@ -279,7 +279,11 @@ class RegisterForm(Form): | ||
279 | [validators.Required(err_msg), | 279 | [validators.Required(err_msg), |
280 | validators.EqualTo('confirm', err_msg_2)]) | 280 | validators.EqualTo('confirm', err_msg_2)]) |
281 | 281 | ||
282 | - confirm = PasswordField(lazy_gettext('Repeat Password')) | 282 | + confirm = PasswordField(lazy_gettext('Repeat Password')) |
283 | + profile = SelectField(lazy_gettext('You want to participate as')) | ||
284 | + | ||
285 | + def set_profile_choices(self, choices): | ||
286 | + self.profile.choices = choices | ||
283 | 287 | ||
284 | 288 | ||
285 | class UpdateProfileForm(Form): | 289 | class UpdateProfileForm(Form): |
@@ -0,0 +1,41 @@ | @@ -0,0 +1,41 @@ | ||
1 | +# -*- coding: utf8 -*- | ||
2 | +# This file is part of PyBossa. | ||
3 | +# | ||
4 | +# Copyright (C) 2015 SciFabric LTD. | ||
5 | +# | ||
6 | +# PyBossa is free software: you can redistribute it and/or modify | ||
7 | +# it under the terms of the GNU Affero General Public License as published by | ||
8 | +# the Free Software Foundation, either version 3 of the License, or | ||
9 | +# (at your option) any later version. | ||
10 | +# | ||
11 | +# PyBossa is distributed in the hope that it will be useful, | ||
12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | +# GNU Affero General Public License for more details. | ||
15 | +# | ||
16 | +# You should have received a copy of the GNU Affero General Public License | ||
17 | +# along with PyBossa. If not, see <http://www.gnu.org/licenses/>. | ||
18 | + | ||
19 | +from sqlalchemy import Integer, Text | ||
20 | +from sqlalchemy.schema import Column, ForeignKey | ||
21 | +from sqlalchemy.dialects.postgresql import ARRAY | ||
22 | + | ||
23 | +from pybossa.core import db | ||
24 | +from pybossa.model import DomainObject, make_timestamp | ||
25 | + | ||
26 | + | ||
27 | +class Profile(db.Model, DomainObject): | ||
28 | + '''A Table with Profiles for Users.''' | ||
29 | + | ||
30 | + __tablename__ = 'profile' | ||
31 | + | ||
32 | + #: Category ID | ||
33 | + id = Column(Integer, primary_key=True) | ||
34 | + #: Name of the Profile | ||
35 | + name = Column(Text, nullable=False, unique=True) | ||
36 | + #: Description of the Profile | ||
37 | + description = Column(Text, nullable=False) | ||
38 | + #: Set of allowed projects for the profile | ||
39 | + access = Column(ARRAY(Text), nullable=False) | ||
40 | + #: UTC timestamp when the Category was created | ||
41 | + created = Column(Text, default=make_timestamp) |
pybossa/model/user.py
@@ -61,11 +61,13 @@ class User(db.Model, DomainObject, UserMixin): | @@ -61,11 +61,13 @@ class User(db.Model, DomainObject, UserMixin): | ||
61 | confirmation_email_sent = Column(Boolean, default=False) | 61 | confirmation_email_sent = Column(Boolean, default=False) |
62 | subscribed = Column(Boolean, default=True) | 62 | subscribed = Column(Boolean, default=True) |
63 | info = Column(MutableDict.as_mutable(JSON), default=dict()) | 63 | info = Column(MutableDict.as_mutable(JSON), default=dict()) |
64 | - | 64 | + profile_id = Column(Integer, ForeignKey('profile.id')) |
65 | + | ||
65 | ## Relationships | 66 | ## Relationships |
66 | task_runs = relationship(TaskRun, backref='user') | 67 | task_runs = relationship(TaskRun, backref='user') |
67 | projects = relationship(Project, backref='owner') | 68 | projects = relationship(Project, backref='owner') |
68 | blogposts = relationship(Blogpost, backref='owner') | 69 | blogposts = relationship(Blogpost, backref='owner') |
70 | + profile = relationship("Profile") | ||
69 | 71 | ||
70 | 72 | ||
71 | def get_id(self): | 73 | def get_id(self): |
pybossa/repositories/user_repository.py
@@ -20,6 +20,7 @@ from sqlalchemy import or_, func | @@ -20,6 +20,7 @@ from sqlalchemy import or_, func | ||
20 | from sqlalchemy.exc import IntegrityError | 20 | from sqlalchemy.exc import IntegrityError |
21 | 21 | ||
22 | from pybossa.model.user import User | 22 | from pybossa.model.user import User |
23 | +from pybossa.model.profile import Profile | ||
23 | from pybossa.exc import WrongObjectError, DBIntegrityError | 24 | from pybossa.exc import WrongObjectError, DBIntegrityError |
24 | 25 | ||
25 | 26 | ||
@@ -86,3 +87,17 @@ class UserRepository(object): | @@ -86,3 +87,17 @@ class UserRepository(object): | ||
86 | name = user.__class__.__name__ | 87 | name = user.__class__.__name__ |
87 | msg = '%s cannot be %s by %s' % (name, action, self.__class__.__name__) | 88 | msg = '%s cannot be %s by %s' % (name, action, self.__class__.__name__) |
88 | raise WrongObjectError(msg) | 89 | raise WrongObjectError(msg) |
90 | + | ||
91 | + # Methods for Profile objects | ||
92 | + def get_profile(self, id=None): | ||
93 | + if id is None: | ||
94 | + return self.db.session.query(Profile).first() | ||
95 | + return self.db.session.query(Profile).get(id) | ||
96 | + | ||
97 | + def get_profile_by(self, **attributes): | ||
98 | + return self.db.session.query(Profile).filter_by(**attributes).first() | ||
99 | + | ||
100 | + def profile_has_access(self, user, project_name): | ||
101 | + profile = self.get_profile(user.profile_id) | ||
102 | + return user.admin or project_name in profile.access | ||
103 | + |
pybossa/themes/default/templates/account/register.html
@@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
20 | {{ render_field(form.email_addr, placeholder= _('hello@mywebsite.org')) }} | 20 | {{ render_field(form.email_addr, placeholder= _('hello@mywebsite.org')) }} |
21 | {{ render_field(form.password, placeholder= _('my secret password')) }} | 21 | {{ render_field(form.password, placeholder= _('my secret password')) }} |
22 | {{ render_field(form.confirm, placeholder= _('my secret password')) }} | 22 | {{ render_field(form.confirm, placeholder= _('my secret password')) }} |
23 | + {{ render_field(form.profile) }} | ||
23 | <div class="form-actions"> | 24 | <div class="form-actions"> |
24 | <input type="submit" value="{{ _('Create an account') }}" class="btn btn-primary btn-lg" /> | 25 | <input type="submit" value="{{ _('Create an account') }}" class="btn btn-primary btn-lg" /> |
25 | <input type="reset" value="{{ _('Cancel') }}" class="btn btn-default" /> | 26 | <input type="reset" value="{{ _('Cancel') }}" class="btn btn-default" /> |
pybossa/themes/default/translations/pt_BR/LC_MESSAGES/messages.mo
No preview for this file type
pybossa/themes/default/translations/pt_BR/LC_MESSAGES/messages.po
@@ -8,7 +8,7 @@ msgstr "" | @@ -8,7 +8,7 @@ msgstr "" | ||
8 | "Project-Id-Version: PROJECT VERSION\n" | 8 | "Project-Id-Version: PROJECT VERSION\n" |
9 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | 9 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" |
10 | "POT-Creation-Date: 2015-08-20 13:26-0300\n" | 10 | "POT-Creation-Date: 2015-08-20 13:26-0300\n" |
11 | -"PO-Revision-Date: 2016-05-19 13:51-0300\n" | 11 | +"PO-Revision-Date: 2016-05-24 18:51-0300\n" |
12 | "Language-Team: pt_BR <LL@li.org>\n" | 12 | "Language-Team: pt_BR <LL@li.org>\n" |
13 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | 13 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
14 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
@@ -21,8 +21,7 @@ msgstr "" | @@ -21,8 +21,7 @@ msgstr "" | ||
21 | 21 | ||
22 | #: core.py:413 | 22 | #: core.py:413 |
23 | msgid "Please update your e-mail address in your profile page, right now it is empty!" | 23 | msgid "Please update your e-mail address in your profile page, right now it is empty!" |
24 | -msgstr "" | ||
25 | -"Por favor atualize seu endereço de e-mail em seu perfil, faça-o agora pois ele está vazio!" | 24 | +msgstr "Por favor atualize seu endereço de e-mail em seu perfil, faça-o agora pois ele está vazio!" |
26 | 25 | ||
27 | #: importers.py:93 | 26 | #: importers.py:93 |
28 | msgid "The file you uploaded has two headers with the same name." | 27 | msgid "The file you uploaded has two headers with the same name." |
@@ -72,22 +71,19 @@ msgstr "Usuários Autenticados" | @@ -72,22 +71,19 @@ msgstr "Usuários Autenticados" | ||
72 | 71 | ||
73 | #: exporter/csv_export.py:91 | 72 | #: exporter/csv_export.py:91 |
74 | msgid "" | 73 | msgid "" |
75 | -"Oops, the project does not have tasks to export, if you are the " | ||
76 | -"owner add some tasks" | 74 | +"Oops, the project does not have tasks to export, if you are the owner add " |
75 | +"some tasks" | ||
77 | msgstr "" | 76 | msgstr "" |
78 | -"Oops, o projeto não tem tarefas para exportar, se você é o " | ||
79 | -"priprietário adicione algumas tarefas" | 77 | +"Oops, o projeto não tem tarefas para exportar, se você é o priprietário " |
78 | +"adicione algumas tarefas" | ||
80 | 79 | ||
81 | #: exporter/csv_export.py:97 | 80 | #: exporter/csv_export.py:97 |
82 | msgid "" | 81 | msgid "" |
83 | -"Oops, there are no Task Runs yet to export, invite some users to " | ||
84 | -"participate" | 82 | +"Oops, there are no Task Runs yet to export, invite some users to participate" |
85 | msgstr "" | 83 | msgstr "" |
86 | -"Oops, não existem execuções para exportar, convide usuários para " | ||
87 | -"participar" | 84 | +"Oops, não existem execuções para exportar, convide usuários para participar" |
88 | 85 | ||
89 | -#: forms/forms.py:40 forms/forms.py:346 | ||
90 | -#: themes/pybossa-contribua-theme/templates/stats/index.html:18 | 86 | +#: forms/forms.py:40 forms/forms.py:346 themes/pybossa-contribua-theme/templates/stats/index.html:18 |
91 | msgid "Name" | 87 | msgid "Name" |
92 | msgstr "Nome" | 88 | msgstr "Nome" |
93 | 89 | ||
@@ -145,41 +141,35 @@ msgstr "Senha (deixe em branco para nenhuma alteração)" | @@ -145,41 +141,35 @@ msgstr "Senha (deixe em branco para nenhuma alteração)" | ||
145 | msgid "Webhook" | 141 | msgid "Webhook" |
146 | msgstr "" | 142 | msgstr "" |
147 | 143 | ||
148 | -#: forms/forms.py:80 | ||
149 | -#: themes/pybossa-contribua-theme/templates/projects/task_settings.html:41 | 144 | +#: forms/forms.py:80 themes/pybossa-contribua-theme/templates/projects/task_settings.html:41 |
150 | #: view/projects.py:1206 | 145 | #: view/projects.py:1206 |
151 | msgid "Redundancy" | 146 | msgid "Redundancy" |
152 | msgstr "Redundância" | 147 | msgstr "Redundância" |
153 | 148 | ||
154 | #: forms/forms.py:84 | 149 | #: forms/forms.py:84 |
155 | msgid "" | 150 | msgid "" |
156 | -"Number of answers should be a " | ||
157 | -"value between 1 and 1,000" | 151 | +"Number of answers should be a value between 1 " |
152 | +"and 1,000" | ||
158 | msgstr "" | 153 | msgstr "" |
159 | -"Número de respostas deve ser um " | ||
160 | -"valor entre 1 e 1,000" | 154 | +"Número de respostas deve ser um valor entre 1 " |
155 | +"e 1,000" | ||
161 | 156 | ||
162 | #: forms/forms.py:89 | 157 | #: forms/forms.py:89 |
163 | msgid "Task IDs" | 158 | msgid "Task IDs" |
164 | msgstr "IDs das tarefas" | 159 | msgstr "IDs das tarefas" |
165 | 160 | ||
166 | -#: forms/forms.py:93 | ||
167 | -#: themes/pybossa-contribua-theme/templates/projects/task_settings.html:25 | 161 | +#: forms/forms.py:93 themes/pybossa-contribua-theme/templates/projects/task_settings.html:25 |
168 | msgid "Priority" | 162 | msgid "Priority" |
169 | msgstr "Prioridade" | 163 | msgstr "Prioridade" |
170 | 164 | ||
171 | #: forms/forms.py:96 | 165 | #: forms/forms.py:96 |
172 | msgid "" | 166 | msgid "" |
173 | -"Priority should be a value between " | ||
174 | -"0.0 and 1.0" | 167 | +"Priority should be a value between 0.0 and 1.0" |
175 | msgstr "" | 168 | msgstr "" |
176 | -"Prioridade deve ser um valor entre " | ||
177 | -"0.0 e 1.0" | 169 | +"Prioridade deve ser um valor entre 0.0 e 1.0" |
178 | 170 | ||
179 | -#: forms/forms.py:103 | ||
180 | -#: themes/pybossa-contribua-theme/templates/projects/task_scheduler.html:11 | ||
181 | -#: themes/pybossa-contribua-theme/templates/projects/task_settings.html:16 | ||
182 | -#: view/projects.py:1238 | 171 | +#: forms/forms.py:103 themes/pybossa-contribua-theme/templates/projects/task_scheduler.html:11 |
172 | +#: themes/pybossa-contribua-theme/templates/projects/task_settings.html:16 view/projects.py:1238 | ||
183 | msgid "Task Scheduler" | 173 | msgid "Task Scheduler" |
184 | msgstr "Escalonador de tarefas" | 174 | msgstr "Escalonador de tarefas" |
185 | 175 | ||
@@ -503,19 +493,18 @@ msgstr "Só mais um passo, por favor" | @@ -503,19 +493,18 @@ msgstr "Só mais um passo, por favor" | ||
503 | 493 | ||
504 | #: themes/pybossa-contribua-theme/templates/account/account_validation.html:7 | 494 | #: themes/pybossa-contribua-theme/templates/account/account_validation.html:7 |
505 | msgid "" | 495 | msgid "" |
506 | -"In order to confirm your identity, we've sent an email to the address you just provided. " | ||
507 | -"Please, check it out and click on the link you'll find to create your account at" | 496 | +"In order to confirm your identity, we've sent an email to the address you just provided. Please, " |
497 | +"check it out and click on the link you'll find to create your account at" | ||
508 | msgstr "" | 498 | msgstr "" |
509 | -"A fim de confirmar sua identidade, nós enviamos um email para o endereço que você " | ||
510 | -"forneceu. Por favor, verifique e clique no link que você encontrar para criar sua conta em" | 499 | +"A fim de confirmar sua identidade, nós enviamos um email para o endereço que você forneceu. Por " |
500 | +"favor, verifique e clique no link que você encontrar para criar sua conta em" | ||
511 | 501 | ||
512 | #: themes/pybossa-contribua-theme/templates/account/account_validation.html:8 | 502 | #: themes/pybossa-contribua-theme/templates/account/account_validation.html:8 |
513 | msgid "" | 503 | msgid "" |
514 | -"If you are not receiving the email, please check the junk folder. If it's not there " | ||
515 | -"please drop us an email to" | 504 | +"If you are not receiving the email, please check the junk folder. If it's not there please drop us an " |
505 | +"email to" | ||
516 | msgstr "" | 506 | msgstr "" |
517 | -"Se você não receber o email, por favor verifique sua lixeira. E se não encontrar, mande " | ||
518 | -"um email para" | 507 | +"Se você não receber o email, por favor verifique sua lixeira. E se não encontrar, mande um email para" |
519 | 508 | ||
520 | #: themes/pybossa-contribua-theme/templates/account/account_validation.html:9 | 509 | #: themes/pybossa-contribua-theme/templates/account/account_validation.html:9 |
521 | msgid "In the meantime, you can check some of the amazing" | 510 | msgid "In the meantime, you can check some of the amazing" |
@@ -868,19 +857,15 @@ msgid "Danger Zone!" | @@ -868,19 +857,15 @@ msgid "Danger Zone!" | ||
868 | msgstr "Zona Perigosa!" | 857 | msgstr "Zona Perigosa!" |
869 | 858 | ||
870 | #: themes/pybossa-contribua-theme/templates/admin/del_category.html:12 | 859 | #: themes/pybossa-contribua-theme/templates/admin/del_category.html:12 |
871 | -msgid "" | ||
872 | -"Deleting the category will remove it from all the projects! This operation cannot be " | ||
873 | -"undone!" | 860 | +msgid "Deleting the category will remove it from all the projects! This operation cannot be undone!" |
874 | msgstr "" | 861 | msgstr "" |
875 | -"Removendo a categoria irá removê-la de todas as aplicações! Esta operação não pode ser " | ||
876 | -"desfeita!" | 862 | +"Removendo a categoria irá removê-la de todas as aplicações! Esta operação não pode ser desfeita!" |
877 | 863 | ||
878 | #: themes/pybossa-contribua-theme/templates/admin/del_category.html:18 | 864 | #: themes/pybossa-contribua-theme/templates/admin/del_category.html:18 |
879 | msgid "No, do not delete it" | 865 | msgid "No, do not delete it" |
880 | msgstr "Não, não apague isto" | 866 | msgstr "Não, não apague isto" |
881 | 867 | ||
882 | -#: themes/pybossa-contribua-theme/templates/admin/index.html:14 view/admin.py:388 | ||
883 | -#: view/admin.py:401 | 868 | +#: themes/pybossa-contribua-theme/templates/admin/index.html:14 view/admin.py:388 view/admin.py:401 |
884 | msgid "Dashboard" | 869 | msgid "Dashboard" |
885 | msgstr "" | 870 | msgstr "" |
886 | 871 | ||
@@ -958,8 +943,7 @@ msgstr "Gerenciar projetos em destaque" | @@ -958,8 +943,7 @@ msgstr "Gerenciar projetos em destaque" | ||
958 | msgid "Update Category" | 943 | msgid "Update Category" |
959 | msgstr "Atualizar Categoria" | 944 | msgstr "Atualizar Categoria" |
960 | 945 | ||
961 | -#: themes/pybossa-contribua-theme/templates/admin/users.html:11 view/admin.py:135 | ||
962 | -#: view/admin.py:139 | 946 | +#: themes/pybossa-contribua-theme/templates/admin/users.html:11 view/admin.py:135 view/admin.py:139 |
963 | msgid "Manage Admin Users" | 947 | msgid "Manage Admin Users" |
964 | msgstr "Gerenciar usuários administradores" | 948 | msgstr "Gerenciar usuários administradores" |
965 | 949 | ||
@@ -981,19 +965,17 @@ msgstr "Usuários atuais com privilégio de administrador" | @@ -981,19 +965,17 @@ msgstr "Usuários atuais com privilégio de administrador" | ||
981 | 965 | ||
982 | #: themes/pybossa-contribua-theme/templates/home/_about.html:5 | 966 | #: themes/pybossa-contribua-theme/templates/home/_about.html:5 |
983 | msgid "" | 967 | msgid "" |
984 | -"PyBossa is a free, open-source crowd-sourcing and micro-tasking platform. It enables " | ||
985 | -"people to create and run projects that utilise online assistance in performing tasks that " | ||
986 | -"require human cognition such as image classification, transcription, geocoding and more. " | ||
987 | -"PyBossa is there to help researchers, civic hackers and developers to create projects " | ||
988 | -"where anyone around the world with some time, interest and an internet connection can " | ||
989 | -"contribute." | ||
990 | -msgstr "" | ||
991 | -"PyBossa é uma plataforma open-source, crowd-sourcing e micro-tasking. Ele permite que as " | ||
992 | -"pessoas criem e executem projetos que utilizam assistência online na execução de tarefas " | ||
993 | -"que requerem cognição humana, tais como classificação de imagens, transcrição, " | ||
994 | -"geocodificação e muito mais. PyBossa foi criado para ajudar pesquisadores, hackers " | ||
995 | -"cívicos e desenvolvedores a criar projetos onde qualquer pessoa no mundo com algum tempo, " | ||
996 | -"interesse e uma conexão à internet pode contribuir." | 968 | +"PyBossa is a free, open-source crowd-sourcing and micro-tasking platform. It enables people to create " |
969 | +"and run projects that utilise online assistance in performing tasks that require human cognition such " | ||
970 | +"as image classification, transcription, geocoding and more. PyBossa is there to help researchers, " | ||
971 | +"civic hackers and developers to create projects where anyone around the world with some time, " | ||
972 | +"interest and an internet connection can contribute." | ||
973 | +msgstr "" | ||
974 | +"PyBossa é uma plataforma open-source, crowd-sourcing e micro-tasking. Ele permite que as pessoas " | ||
975 | +"criem e executem projetos que utilizam assistência online na execução de tarefas que requerem " | ||
976 | +"cognição humana, tais como classificação de imagens, transcrição, geocodificação e muito mais. " | ||
977 | +"PyBossa foi criado para ajudar pesquisadores, hackers cívicos e desenvolvedores a criar projetos onde " | ||
978 | +"qualquer pessoa no mundo com algum tempo, interesse e uma conexão à internet pode contribuir." | ||
997 | 979 | ||
998 | #: themes/pybossa-contribua-theme/templates/home/_about.html:8 | 980 | #: themes/pybossa-contribua-theme/templates/home/_about.html:8 |
999 | msgid "PyBossa is different to existing efforts:" | 981 | msgid "PyBossa is different to existing efforts:" |
@@ -1006,31 +988,31 @@ msgstr "É 100%% open-source" | @@ -1006,31 +988,31 @@ msgstr "É 100%% open-source" | ||
1006 | 988 | ||
1007 | #: themes/pybossa-contribua-theme/templates/home/_about.html:11 | 989 | #: themes/pybossa-contribua-theme/templates/home/_about.html:11 |
1008 | msgid "" | 990 | msgid "" |
1009 | -"Unlike, say, “mechanical turk” style projects, PyBossa is not designed to handle payment " | ||
1010 | -"or money — it is designed to support volunteer-driven projects." | 991 | +"Unlike, say, “mechanical turk” style projects, PyBossa is not designed to handle payment or money — " |
992 | +"it is designed to support volunteer-driven projects." | ||
1011 | msgstr "" | 993 | msgstr "" |
1012 | -"Ao contrário de, digamos, projetos estilo “mechanical turk”, PyBossa não é projetado para " | ||
1013 | -"com pagamento ou dinheiro — se destina a apoiar projetos conduzidos por voluntários." | 994 | +"Ao contrário de, digamos, projetos estilo “mechanical turk”, PyBossa não é projetado para com " |
995 | +"pagamento ou dinheiro — se destina a apoiar projetos conduzidos por voluntários." | ||
1014 | 996 | ||
1015 | #: themes/pybossa-contribua-theme/templates/home/_about.html:13 | 997 | #: themes/pybossa-contribua-theme/templates/home/_about.html:13 |
1016 | msgid "" | 998 | msgid "" |
1017 | -"It's designed as a platform and framework for developing deploying crowd-sourcing and " | ||
1018 | -"microtasking project rather than being a crowd-sourcing project itself. Individual crowd-" | ||
1019 | -"sourcing projects are written as simple snippets of Javascript and HTML which are then " | ||
1020 | -"deployed on a PyBossa instance (such as" | 999 | +"It's designed as a platform and framework for developing deploying crowd-sourcing and microtasking " |
1000 | +"project rather than being a crowd-sourcing project itself. Individual crowd-sourcing projects are " | ||
1001 | +"written as simple snippets of Javascript and HTML which are then deployed on a PyBossa instance (such " | ||
1002 | +"as" | ||
1021 | msgstr "" | 1003 | msgstr "" |
1022 | -"Ele foi projetado como uma estrutura e plataforma para desenvolver a implantação de " | ||
1023 | -"projetos de crowd-sourcing e microtasking ao invés de ser em sí um projeto de crowd-" | ||
1024 | -"sourcing.Projetos crowd-sourcing individuais são escritos como trechos simples em " | ||
1025 | -"Javascript e HTML que são implantados em uma instância PyBossa(como o" | 1004 | +"Ele foi projetado como uma estrutura e plataforma para desenvolver a implantação de projetos de crowd-" |
1005 | +"sourcing e microtasking ao invés de ser em sí um projeto de crowd-sourcing.Projetos crowd-sourcing " | ||
1006 | +"individuais são escritos como trechos simples em Javascript e HTML que são implantados em uma " | ||
1007 | +"instância PyBossa(como o" | ||
1026 | 1008 | ||
1027 | #: themes/pybossa-contribua-theme/templates/home/_about.html:13 | 1009 | #: themes/pybossa-contribua-theme/templates/home/_about.html:13 |
1028 | msgid "" | 1010 | msgid "" |
1029 | -"This way one can easily develop custom projects while using the PyBossa platform to store " | ||
1030 | -"your data, manage users, and handle workflow" | 1011 | +"This way one can easily develop custom projects while using the PyBossa platform to store your data, " |
1012 | +"manage users, and handle workflow" | ||
1031 | msgstr "" | 1013 | msgstr "" |
1032 | -"Desta forma, pode-se facilmente desenvolver projetos personalizados ao usar a plataforma " | ||
1033 | -"PyBossa para armazenar seus dados, gerenciar usuários e lidar com o fluxo de trabalho" | 1014 | +"Desta forma, pode-se facilmente desenvolver projetos personalizados ao usar a plataforma PyBossa para " |
1015 | +"armazenar seus dados, gerenciar usuários e lidar com o fluxo de trabalho" | ||
1034 | 1016 | ||
1035 | #: themes/pybossa-contribua-theme/templates/home/_about.html:18 | 1017 | #: themes/pybossa-contribua-theme/templates/home/_about.html:18 |
1036 | msgid "You can read more about the architecture in the" | 1018 | msgid "You can read more about the architecture in the" |
@@ -1054,10 +1036,8 @@ msgid "Statistics" | @@ -1054,10 +1036,8 @@ msgid "Statistics" | ||
1054 | msgstr "Estatísticas" | 1036 | msgstr "Estatísticas" |
1055 | 1037 | ||
1056 | #: themes/pybossa-contribua-theme/templates/home/_about.html:23 | 1038 | #: themes/pybossa-contribua-theme/templates/home/_about.html:23 |
1057 | -msgid "" | ||
1058 | -" PyBossa provides individual statistics for every project in the system, as well as a" | ||
1059 | -msgstr "" | ||
1060 | -" PyBossa fornece estatísticas individuais para qualquer projeto do sistema, bem como uma" | 1039 | +msgid " PyBossa provides individual statistics for every project in the system, as well as a" |
1040 | +msgstr " PyBossa fornece estatísticas individuais para qualquer projeto do sistema, bem como uma" | ||
1061 | 1041 | ||
1062 | #: themes/pybossa-contribua-theme/templates/home/_about.html:23 | 1042 | #: themes/pybossa-contribua-theme/templates/home/_about.html:23 |
1063 | msgid "general overview about the system like total number of users, tasks, etc" | 1043 | msgid "general overview about the system like total number of users, tasks, etc" |
@@ -1329,10 +1309,8 @@ msgid "If you delete the project and its tasks, it will be gone forever!" | @@ -1329,10 +1309,8 @@ msgid "If you delete the project and its tasks, it will be gone forever!" | ||
1329 | msgstr "Se você excluir o projeto e suas tarefas, ele não poderar ser recuperado!" | 1309 | msgstr "Se você excluir o projeto e suas tarefas, ele não poderar ser recuperado!" |
1330 | 1310 | ||
1331 | #: themes/pybossa-contribua-theme/templates/projects/delete.html:18 | 1311 | #: themes/pybossa-contribua-theme/templates/projects/delete.html:18 |
1332 | -msgid "" | ||
1333 | -"Are you sure you want to delete this project and all its tasks and associated task runs?" | ||
1334 | -msgstr "" | ||
1335 | -"Você está certo que deseja excluir o projeto, suas tarefas e as execuções das tarefas?" | 1312 | +msgid "Are you sure you want to delete this project and all its tasks and associated task runs?" |
1313 | +msgstr "Você está certo que deseja excluir o projeto, suas tarefas e as execuções das tarefas?" | ||
1336 | 1314 | ||
1337 | #: themes/pybossa-contribua-theme/templates/projects/delete.html:21 | 1315 | #: themes/pybossa-contribua-theme/templates/projects/delete.html:21 |
1338 | msgid "No, do not delete it!" | 1316 | msgid "No, do not delete it!" |
@@ -1384,11 +1362,11 @@ msgstr "IMPORTANTE" | @@ -1384,11 +1362,11 @@ msgstr "IMPORTANTE" | ||
1384 | 1362 | ||
1385 | #: themes/pybossa-contribua-theme/templates/projects/export.html:55 | 1363 | #: themes/pybossa-contribua-theme/templates/projects/export.html:55 |
1386 | msgid "" | 1364 | msgid "" |
1387 | -"This export option stills in beta mode and may fail in the CKAN server. If you get an " | ||
1388 | -"error, please send an e-mail to info@pybossa.com" | 1365 | +"This export option stills in beta mode and may fail in the CKAN server. If you get an error, please " |
1366 | +"send an e-mail to info@pybossa.com" | ||
1389 | msgstr "" | 1367 | msgstr "" |
1390 | -"Esta opção de exportação está em modo beta e pode não funcionar no servidor CKAN. Se você " | ||
1391 | -"receber um erro, por favor mande um e-mail para info@pybossa.com" | 1368 | +"Esta opção de exportação está em modo beta e pode não funcionar no servidor CKAN. Se você receber um " |
1369 | +"erro, por favor mande um e-mail para info@pybossa.com" | ||
1392 | 1370 | ||
1393 | #: themes/pybossa-contribua-theme/templates/projects/export.html:60 | 1371 | #: themes/pybossa-contribua-theme/templates/projects/export.html:60 |
1394 | msgid "You don't have a Datahub.io API key in your" | 1372 | msgid "You don't have a Datahub.io API key in your" |
@@ -1453,11 +1431,10 @@ msgid "" | @@ -1453,11 +1431,10 @@ msgid "" | ||
1453 | "it \n" | 1431 | "it \n" |
1454 | " · How? Explain how your project " | 1432 | " · How? Explain how your project " |
1455 | "works \n" | 1433 | "works \n" |
1456 | -" · How you can help: Explain to the volunteers how they can help and " | ||
1457 | -"contribute to the goal of your " | ||
1458 | -"project \n" | ||
1459 | -" · Will you help make a difference? Explain to the volunteers why their " | ||
1460 | -"contribution is essential and how the result of your project can help change " | 1434 | +" · How you can help: Explain to the volunteers how they can help and contribute to the " |
1435 | +"goal of your project \n" | ||
1436 | +" · Will you help make a difference? Explain to the volunteers why their contribution " | ||
1437 | +"is essential and how the result of your project can help change " | ||
1461 | "things! \n" | 1438 | "things! \n" |
1462 | " (you can use Markdown to give format to your description!)" | 1439 | " (you can use Markdown to give format to your description!)" |
1463 | msgstr "" | 1440 | msgstr "" |
@@ -1466,10 +1443,10 @@ msgstr "" | @@ -1466,10 +1443,10 @@ msgstr "" | ||
1466 | "alcançar \n" | 1443 | "alcançar \n" |
1467 | " · Como? Explique como seu projeto " | 1444 | " · Como? Explique como seu projeto " |
1468 | "funciona \n" | 1445 | "funciona \n" |
1469 | -" · como ajudar: Explique aos voluntátios como eles podem contribuir para o " | ||
1470 | -"objetivo do seu projeto \n" | ||
1471 | -" · você ajudará a fazer a diferença? Explique aos voluntários porque sua " | ||
1472 | -"contribuição é essencial e como o resultado do seu projeto pode mudar as " | 1446 | +" · como ajudar: Explique aos voluntátios como eles podem contribuir para o objetivo do " |
1447 | +"seu projeto \n" | ||
1448 | +" · você ajudará a fazer a diferença? Explique aos voluntários porque sua contribuição " | ||
1449 | +"é essencial e como o resultado do seu projeto pode mudar as " | ||
1473 | "coisas! \n" | 1450 | "coisas! \n" |
1474 | " (você pode utilizar Markdown para formatar sua descrição!)" | 1451 | " (você pode utilizar Markdown para formatar sua descrição!)" |
1475 | 1452 | ||
@@ -1505,11 +1482,11 @@ msgstr "Enviar" | @@ -1505,11 +1482,11 @@ msgstr "Enviar" | ||
1505 | 1482 | ||
1506 | #: themes/pybossa-contribua-theme/templates/projects/presenter.html:22 | 1483 | #: themes/pybossa-contribua-theme/templates/projects/presenter.html:22 |
1507 | msgid "" | 1484 | msgid "" |
1508 | -"Sorry, you've contributed to all the tasks for this project, but this project still needs " | ||
1509 | -"more volunteers, so please spread the word!" | 1485 | +"Sorry, you've contributed to all the tasks for this project, but this project still needs more " |
1486 | +"volunteers, so please spread the word!" | ||
1510 | msgstr "" | 1487 | msgstr "" |
1511 | -"Desculpe, você contribuiu para todas as tarefas deste projeto, mas este projeto ainda " | ||
1512 | -"precisa de mais voluntários, então convide outros colaboradores!" | 1488 | +"Desculpe, você contribuiu para todas as tarefas deste projeto, mas este projeto ainda precisa de mais " |
1489 | +"voluntários, então convide outros colaboradores!" | ||
1513 | 1490 | ||
1514 | #: themes/pybossa-contribua-theme/templates/projects/settings.html:14 | 1491 | #: themes/pybossa-contribua-theme/templates/projects/settings.html:14 |
1515 | msgid "Project Settings" | 1492 | msgid "Project Settings" |
@@ -1696,8 +1673,7 @@ msgid "Close" | @@ -1696,8 +1673,7 @@ msgid "Close" | ||
1696 | msgstr "Fechar" | 1673 | msgstr "Fechar" |
1697 | 1674 | ||
1698 | #: themes/pybossa-contribua-theme/templates/projects/task_priority.html:13 | 1675 | #: themes/pybossa-contribua-theme/templates/projects/task_priority.html:13 |
1699 | -#: themes/pybossa-contribua-theme/templates/projects/task_settings.html:23 | ||
1700 | -#: view/projects.py:1285 | 1676 | +#: themes/pybossa-contribua-theme/templates/projects/task_settings.html:23 view/projects.py:1285 |
1701 | msgid "Task Priority" | 1677 | msgid "Task Priority" |
1702 | msgstr "Prioridade da tarefa" | 1678 | msgstr "Prioridade da tarefa" |
1703 | 1679 | ||
@@ -1710,13 +1686,10 @@ msgid "priority" | @@ -1710,13 +1686,10 @@ msgid "priority" | ||
1710 | msgstr "prioridade" | 1686 | msgstr "prioridade" |
1711 | 1687 | ||
1712 | #: themes/pybossa-contribua-theme/templates/projects/task_priority.html:14 | 1688 | #: themes/pybossa-contribua-theme/templates/projects/task_priority.html:14 |
1713 | -msgid "" | ||
1714 | -"of one or more tasks, providing a list of task IDs separated by commas. The lowest " | ||
1715 | -"priority is" | 1689 | +msgid "of one or more tasks, providing a list of task IDs separated by commas. The lowest priority is" |
1716 | msgstr "" | 1690 | msgstr "" |
1717 | "de uma ou mais tarefas,\n" | 1691 | "de uma ou mais tarefas,\n" |
1718 | -" fornecendo uma lista de IDs das tarefas separadas por vírgula. A " | ||
1719 | -"prioridade\n" | 1692 | +" fornecendo uma lista de IDs das tarefas separadas por vírgula. A prioridade\n" |
1720 | " mais baixa é" | 1693 | " mais baixa é" |
1721 | 1694 | ||
1722 | #: themes/pybossa-contribua-theme/templates/projects/task_priority.html:14 | 1695 | #: themes/pybossa-contribua-theme/templates/projects/task_priority.html:14 |
@@ -1915,11 +1888,11 @@ msgstr "O primeiro número representa o total de respostas submetidas para a tar | @@ -1915,11 +1888,11 @@ msgstr "O primeiro número representa o total de respostas submetidas para a tar | ||
1915 | 1888 | ||
1916 | #: themes/pybossa-contribua-theme/templates/projects/tasks_browse.html:18 | 1889 | #: themes/pybossa-contribua-theme/templates/projects/tasks_browse.html:18 |
1917 | msgid "" | 1890 | msgid "" |
1918 | -"This redundancy method will help to detect errors, typos, data forging, etc. when the " | ||
1919 | -"task has been completed" | 1891 | +"This redundancy method will help to detect errors, typos, data forging, etc. when the task has been " |
1892 | +"completed" | ||
1920 | msgstr "" | 1893 | msgstr "" |
1921 | -"Este método de redundância vai ajudar a detectar erros, erros de digitação, forjamento de " | ||
1922 | -"dados, etc., quando a tarefa for concluída" | 1894 | +"Este método de redundância vai ajudar a detectar erros, erros de digitação, forjamento de dados, " |
1895 | +"etc., quando a tarefa for concluída" | ||
1923 | 1896 | ||
1924 | #: themes/pybossa-contribua-theme/templates/projects/tasks_browse.html:18 | 1897 | #: themes/pybossa-contribua-theme/templates/projects/tasks_browse.html:18 |
1925 | msgid "second number" | 1898 | msgid "second number" |
@@ -1987,11 +1960,10 @@ msgstr "De um arquivo CSV" | @@ -1987,11 +1960,10 @@ msgstr "De um arquivo CSV" | ||
1987 | 1960 | ||
1988 | #: themes/pybossa-contribua-theme/templates/projects/importers/csv.html:19 | 1961 | #: themes/pybossa-contribua-theme/templates/projects/importers/csv.html:19 |
1989 | msgid "" | 1962 | msgid "" |
1990 | -"Please provide a URL (i.e. DropBox, Box, Ubuntu One, etc. public link) to a CSV file with " | ||
1991 | -"data for" | 1963 | +"Please provide a URL (i.e. DropBox, Box, Ubuntu One, etc. public link) to a CSV file with data for" |
1992 | msgstr "" | 1964 | msgstr "" |
1993 | -"Por favor forneça uma URL (i.e. DropBox, Box, Ubuntu One, etc. link público) para o " | ||
1994 | -"arquivo CSV com dados para" | 1965 | +"Por favor forneça uma URL (i.e. DropBox, Box, Ubuntu One, etc. link público) para o arquivo CSV com " |
1966 | +"dados para" | ||
1995 | 1967 | ||
1996 | #: themes/pybossa-contribua-theme/templates/projects/importers/csv.html:19 | 1968 | #: themes/pybossa-contribua-theme/templates/projects/importers/csv.html:19 |
1997 | #: themes/pybossa-contribua-theme/templates/projects/importers/dropbox.html:25 | 1969 | #: themes/pybossa-contribua-theme/templates/projects/importers/dropbox.html:25 |
@@ -2031,8 +2003,7 @@ msgstr "De um projeto EpiCollect Plus" | @@ -2031,8 +2003,7 @@ msgstr "De um projeto EpiCollect Plus" | ||
2031 | 2003 | ||
2032 | #: themes/pybossa-contribua-theme/templates/projects/importers/epicollect.html:19 | 2004 | #: themes/pybossa-contribua-theme/templates/projects/importers/epicollect.html:19 |
2033 | msgid "Please provide an EpiCollect Plus project name to import its data for" | 2005 | msgid "Please provide an EpiCollect Plus project name to import its data for" |
2034 | -msgstr "" | ||
2035 | -"Por favor forneça o nome de um projeto EpiCollect Plus de modo a importar seus dados para" | 2006 | +msgstr "Por favor forneça o nome de um projeto EpiCollect Plus de modo a importar seus dados para" |
2036 | 2007 | ||
2037 | #: themes/pybossa-contribua-theme/templates/projects/importers/epicollect.html:21 | 2008 | #: themes/pybossa-contribua-theme/templates/projects/importers/epicollect.html:21 |
2038 | msgid "The name of the public EpiCollect Plus project" | 2009 | msgid "The name of the public EpiCollect Plus project" |
@@ -2449,13 +2420,12 @@ msgstr "Oooops, email/senha incorreto" | @@ -2449,13 +2420,12 @@ msgstr "Oooops, email/senha incorreto" | ||
2449 | 2420 | ||
2450 | #: view/account.py:112 | 2421 | #: view/account.py:112 |
2451 | msgid "Ooops, we didn't find you in the system, did you sign up?" | 2422 | msgid "Ooops, we didn't find you in the system, did you sign up?" |
2452 | -msgstr "" | ||
2453 | -"Ooops, não encontramos você no sistema, você se cadastrou?" | 2423 | +msgstr "Ooops, não encontramos você no sistema, você se cadastrou?" |
2454 | 2424 | ||
2455 | -#: view/account.py:117 view/account.py:216 view/account.py:491 view/account.py:507 | ||
2456 | -#: view/account.py:521 view/account.py:554 view/admin.py:268 view/admin.py:349 | ||
2457 | -#: view/projects.py:219 view/projects.py:276 view/projects.py:415 view/projects.py:1225 | ||
2458 | -#: view/projects.py:1276 view/projects.py:1321 view/projects.py:1396 view/projects.py:1441 | 2425 | +#: view/account.py:117 view/account.py:216 view/account.py:491 view/account.py:507 view/account.py:521 |
2426 | +#: view/account.py:554 view/admin.py:268 view/admin.py:349 view/projects.py:219 view/projects.py:276 | ||
2427 | +#: view/projects.py:415 view/projects.py:1225 view/projects.py:1276 view/projects.py:1321 | ||
2428 | +#: view/projects.py:1396 view/projects.py:1441 | ||
2459 | msgid "Please correct the errors" | 2429 | msgid "Please correct the errors" |
2460 | msgstr "Por favor corrija os erros" | 2430 | msgstr "Por favor corrija os erros" |
2461 | 2431 | ||
@@ -2488,20 +2458,18 @@ msgid "Profile" | @@ -2488,20 +2458,18 @@ msgid "Profile" | ||
2488 | msgstr "Perfil" | 2458 | msgstr "Perfil" |
2489 | 2459 | ||
2490 | #: view/account.py:448 | 2460 | #: view/account.py:448 |
2491 | -msgid "" | ||
2492 | -"Your avatar has been updated! It may take some minutes to refresh..." | 2461 | +msgid "Your avatar has been updated! It may take some minutes to refresh..." |
2493 | msgstr "" | 2462 | msgstr "" |
2494 | -"Seu avatar está sendo atualizado! pode demorar alguns minutos para " | ||
2495 | -"atualização..." | 2463 | +"Seu avatar está sendo atualizado! pode demorar alguns minutos para atualização..." |
2496 | 2464 | ||
2497 | #: view/account.py:478 | 2465 | #: view/account.py:478 |
2498 | #, python-format | 2466 | #, python-format |
2499 | msgid "" | 2467 | msgid "" |
2500 | -"An email has been sent to verify your new email: %s. Once you " | ||
2501 | -"verify it, it will be updated.email_addr" | 2468 | +"An email has been sent to verify your new email: %s. Once you verify it, it " |
2469 | +"will be updated.email_addr" | ||
2502 | msgstr "" | 2470 | msgstr "" |
2503 | -"Um email foi enviado para veirificar seu novo email: %s. Uma vez " | ||
2504 | -"que você verificar, será atualizado.email_addr" | 2471 | +"Um email foi enviado para veirificar seu novo email: %s. Uma vez que você " |
2472 | +"verificar, será atualizado.email_addr" | ||
2505 | 2473 | ||
2506 | #: view/account.py:489 view/account.py:519 | 2474 | #: view/account.py:489 view/account.py:519 |
2507 | msgid "Your profile has been updated!" | 2475 | msgid "Your profile has been updated!" |
@@ -2525,11 +2493,11 @@ msgstr "Nós lhe enviamos um email com as instruções para recuperação de sua | @@ -2525,11 +2493,11 @@ msgstr "Nós lhe enviamos um email com as instruções para recuperação de sua | ||
2525 | 2493 | ||
2526 | #: view/account.py:609 | 2494 | #: view/account.py:609 |
2527 | msgid "" | 2495 | msgid "" |
2528 | -"We don't have this email in our records. You may have signed up with a different email or " | ||
2529 | -"used Twitter, Facebook, or Google to sign-in" | 2496 | +"We don't have this email in our records. You may have signed up with a different email or used " |
2497 | +"Twitter, Facebook, or Google to sign-in" | ||
2530 | msgstr "" | 2498 | msgstr "" |
2531 | -"Nós não temos este email em nossos registros. Você deve ter entrado com um email " | ||
2532 | -"diferente ou usado sua conta do Twitter, Facebook ou Google" | 2499 | +"Nós não temos este email em nossos registros. Você deve ter entrado com um email diferente ou usado " |
2500 | +"sua conta do Twitter, Facebook ou Google" | ||
2533 | 2501 | ||
2534 | #: view/account.py:614 | 2502 | #: view/account.py:614 |
2535 | msgid "Something went wrong, please correct the errors on the form" | 2503 | msgid "Something went wrong, please correct the errors on the form" |
@@ -2549,11 +2517,10 @@ msgstr "Categoria removida" | @@ -2549,11 +2517,10 @@ msgstr "Categoria removida" | ||
2549 | 2517 | ||
2550 | #: view/admin.py:306 | 2518 | #: view/admin.py:306 |
2551 | msgid "" | 2519 | msgid "" |
2552 | -"Sorry, it is not possible to delete the only available category. You can modify it, " | ||
2553 | -"click the edit button" | 2520 | +"Sorry, it is not possible to delete the only available category. You can modify it, click the edit " |
2521 | +"button" | ||
2554 | msgstr "" | 2522 | msgstr "" |
2555 | -"Desculpe, não é possível remover a única categoria disponível. Você pode modificá-la no " | ||
2556 | -"botão Editar" | 2523 | +"Desculpe, não é possível remover a única categoria disponível. Você pode modificá-la no botão Editar" |
2557 | 2524 | ||
2558 | #: view/admin.py:345 | 2525 | #: view/admin.py:345 |
2559 | msgid "Category updated" | 2526 | msgid "Category updated" |
@@ -2593,11 +2560,9 @@ msgstr "import de CSV" | @@ -2593,11 +2560,9 @@ msgstr "import de CSV" | ||
2593 | 2560 | ||
2594 | #: view/projects.py:286 | 2561 | #: view/projects.py:286 |
2595 | msgid "" | 2562 | msgid "" |
2596 | -" or download the project bundle and run the <strong>createTasks.py</strong> script in " | ||
2597 | -"your computer" | 2563 | +" or download the project bundle and run the <strong>createTasks.py</strong> script in your computer" |
2598 | msgstr "" | 2564 | msgstr "" |
2599 | -" ou faça o download do pacote e execute o script <strong>createTasks.py</strong> em seu " | ||
2600 | -"computador" | 2565 | +" ou faça o download do pacote e execute o script <strong>createTasks.py</strong> em seu computador" |
2601 | 2566 | ||
2602 | #: view/projects.py:352 | 2567 | #: view/projects.py:352 |
2603 | msgid "Project deleted!" | 2568 | msgid "Project deleted!" |
@@ -2609,11 +2574,11 @@ msgstr "Projeto atualizado!" | @@ -2609,11 +2574,11 @@ msgstr "Projeto atualizado!" | ||
2609 | 2574 | ||
2610 | #: view/projects.py:434 | 2575 | #: view/projects.py:434 |
2611 | msgid "" | 2576 | msgid "" |
2612 | -"Your project thumbnail has been updated! It may take " | ||
2613 | -"some minutes to refresh..." | 2577 | +"Your project thumbnail has been updated! It may take some minutes " |
2578 | +"to refresh..." | ||
2614 | msgstr "" | 2579 | msgstr "" |
2615 | -"A miniatura do seu projeto foi atualizada! Pode demorar " | ||
2616 | -"alguns minutos para atualização..." | 2580 | +"A miniatura do seu projeto foi atualizada! Pode demorar alguns " |
2581 | +"minutos para atualização..." | ||
2617 | 2582 | ||
2618 | #: view/projects.py:437 | 2583 | #: view/projects.py:437 |
2619 | msgid "You must provide a file to change the avatar" | 2584 | msgid "You must provide a file to change the avatar" |
@@ -2625,11 +2590,11 @@ msgstr "Importando tarefas, isto pode demorar um pouco, aguarde..." | @@ -2625,11 +2590,11 @@ msgstr "Importando tarefas, isto pode demorar um pouco, aguarde..." | ||
2625 | 2590 | ||
2626 | #: view/projects.py:573 | 2591 | #: view/projects.py:573 |
2627 | msgid "" | 2592 | msgid "" |
2628 | -"You're trying to import a large amount of tasks, so please be patient. You " | ||
2629 | -"will receive an email when the tasks are ready." | 2593 | +"You're trying to import a large amount of tasks, so please be patient. You will receive an " |
2594 | +"email when the tasks are ready." | ||
2630 | msgstr "" | 2595 | msgstr "" |
2631 | -"Você está tentando importar uma grande quantidade de tarefas, por favor seja " | ||
2632 | -"paciente. Você receberá um e-mail quando as tarefas estiverem prontas." | 2596 | +"Você está tentando importar uma grande quantidade de tarefas, por favor seja paciente. " |
2597 | +"Você receberá um e-mail quando as tarefas estiverem prontas." | ||
2633 | 2598 | ||
2634 | #: view/projects.py:616 | 2599 | #: view/projects.py:616 |
2635 | msgid "Success! Tasks will be imported daily." | 2600 | msgid "Success! Tasks will be imported daily." |
@@ -2641,13 +2606,11 @@ msgstr "Desculpe, senha incorreta" | @@ -2641,13 +2606,11 @@ msgstr "Desculpe, senha incorreta" | ||
2641 | 2606 | ||
2642 | #: view/projects.py:700 | 2607 | #: view/projects.py:700 |
2643 | msgid "Ooops! You are an anonymous user and will not get any credit for your contributions." | 2608 | msgid "Ooops! You are an anonymous user and will not get any credit for your contributions." |
2644 | -msgstr "" | ||
2645 | -"Ooops! Você é um usuário anônimo e não ganhará nenhum crédito por suas contribuições." | 2609 | +msgstr "Ooops! Você é um usuário anônimo e não ganhará nenhum crédito por suas contribuições." |
2646 | 2610 | ||
2647 | #: view/projects.py:719 view/projects.py:771 | 2611 | #: view/projects.py:719 view/projects.py:771 |
2648 | msgid "Sorry, but this project is still a draft and does not have a task presenter." | 2612 | msgid "Sorry, but this project is still a draft and does not have a task presenter." |
2649 | -msgstr "" | ||
2650 | -"Desculpe, mas este projeto ainda é um rascunho e não tem nenhum visualizadorde tarefas." | 2613 | +msgstr "Desculpe, mas este projeto ainda é um rascunho e não tem nenhum visualizadorde tarefas." |
2651 | 2614 | ||
2652 | #: view/projects.py:899 | 2615 | #: view/projects.py:899 |
2653 | msgid "All the tasks and associated task runs have been deleted" | 2616 | msgid "All the tasks and associated task runs have been deleted" |
@@ -2663,19 +2626,16 @@ msgstr "Dados exportados para " | @@ -2663,19 +2626,16 @@ msgstr "Dados exportados para " | ||
2663 | 2626 | ||
2664 | #: view/projects.py:1063 | 2627 | #: view/projects.py:1063 |
2665 | msgid "" | 2628 | msgid "" |
2666 | -"Oops, the project does not have tasks to export, if you are the owner " | ||
2667 | -"add some tasks" | 2629 | +"Oops, the project does not have tasks to export, if you are the owner add some " |
2630 | +"tasks" | ||
2668 | msgstr "" | 2631 | msgstr "" |
2669 | -"Oops, o projeto não tem tarefas para exportar, se você é o " | ||
2670 | -"proprietário adicione algumas tarefas" | 2632 | +"Oops, o projeto não tem tarefas para exportar, se você é o proprietário " |
2633 | +"adicione algumas tarefas" | ||
2671 | 2634 | ||
2672 | #: view/projects.py:1069 | 2635 | #: view/projects.py:1069 |
2673 | msgid "" | 2636 | msgid "" |
2674 | -"Oops, there are no Task Runs yet to export, invite some users to " | ||
2675 | -"participate" | ||
2676 | -msgstr "" | ||
2677 | -"Oops, não existem execuções para exportar,convide usuários para " | ||
2678 | -"participar" | 2637 | +"Oops, there are no Task Runs yet to export, invite some users to participate" |
2638 | +msgstr "Oops, não existem execuções para exportar,convide usuários para participar" | ||
2679 | 2639 | ||
2680 | #: view/projects.py:1221 | 2640 | #: view/projects.py:1221 |
2681 | msgid "Redundancy of Tasks updated!" | 2641 | msgid "Redundancy of Tasks updated!" |
@@ -2801,8 +2761,7 @@ msgid "Our records show that you use your" | @@ -2801,8 +2761,7 @@ msgid "Our records show that you use your" | ||
2801 | msgstr "" | 2761 | msgstr "" |
2802 | 2762 | ||
2803 | msgid "" | 2763 | msgid "" |
2804 | -"account to sign in. Please use the same account to sign-in again. If you forgot the " | ||
2805 | -"password to your" | 2764 | +"account to sign in. Please use the same account to sign-in again. If you forgot the password to your" |
2806 | msgstr "" | 2765 | msgstr "" |
2807 | 2766 | ||
2808 | msgid "account, please contact" | 2767 | msgid "account, please contact" |
@@ -2827,8 +2786,8 @@ msgid "Click here to confirm your e-mail address and create your account" | @@ -2827,8 +2786,8 @@ msgid "Click here to confirm your e-mail address and create your account" | ||
2827 | msgstr "" | 2786 | msgstr "" |
2828 | 2787 | ||
2829 | msgid "" | 2788 | msgid "" |
2830 | -"Online assistance in performing tasks that require human cognition, knowledge or " | ||
2831 | -"intelligence such as image classification, transcription, geocoding and more!" | 2789 | +"Online assistance in performing tasks that require human cognition, knowledge or intelligence such as " |
2790 | +"image classification, transcription, geocoding and more!" | ||
2832 | msgstr "" | 2791 | msgstr "" |
2833 | "Assistência online para execução de tarefas que requerem cognição humana, conhecimento ou " | 2792 | "Assistência online para execução de tarefas que requerem cognição humana, conhecimento ou " |
2834 | "inteligência, como classificação de imagens, transcrição, geocodificação e muito mais!" | 2793 | "inteligência, como classificação de imagens, transcrição, geocodificação e muito mais!" |
@@ -2884,8 +2843,7 @@ msgid "" | @@ -2884,8 +2843,7 @@ msgid "" | ||
2884 | " priority is" | 2843 | " priority is" |
2885 | msgstr "" | 2844 | msgstr "" |
2886 | "de uma ou mais tarefas,\n" | 2845 | "de uma ou mais tarefas,\n" |
2887 | -" fornecendo uma lista de IDs das tarefas separadas por vírgula. A " | ||
2888 | -"prioridade\n" | 2846 | +" fornecendo uma lista de IDs das tarefas separadas por vírgula. A prioridade\n" |
2889 | " mais baixa é" | 2847 | " mais baixa é" |
2890 | 2848 | ||
2891 | msgid "" | 2849 | msgid "" |
@@ -2920,11 +2878,11 @@ msgid "" | @@ -2920,11 +2878,11 @@ msgid "" | ||
2920 | "returns a task\n" | 2878 | "returns a task\n" |
2921 | " randomly --a user could get the same task twice or more\n" | 2879 | " randomly --a user could get the same task twice or more\n" |
2922 | " times" | 2880 | " times" |
2923 | - | ||
2924 | msgstr "" | 2881 | msgstr "" |
2925 | "Retorna uma tarefa\n" | 2882 | "Retorna uma tarefa\n" |
2926 | " aleatória - um usuário pode receber a tarefa duas ou mais\n" | 2883 | " aleatória - um usuário pode receber a tarefa duas ou mais\n" |
2927 | " vezes" | 2884 | " vezes" |
2885 | + | ||
2928 | msgid "" | 2886 | msgid "" |
2929 | "If you delete all the\n" | 2887 | "If you delete all the\n" |
2930 | " tasks and task runs they will be gone\n" | 2888 | " tasks and task runs they will be gone\n" |
@@ -2942,16 +2900,19 @@ msgstr "" | @@ -2942,16 +2900,19 @@ msgstr "" | ||
2942 | " nada" | 2900 | " nada" |
2943 | 2901 | ||
2944 | # view/projects.py:807 | 2902 | # view/projects.py:807 |
2945 | -msgid "Oops! You have to sign in to participate in <strong>WikiLibras</strong>" | ||
2946 | -" project" | 2903 | +msgid "" |
2904 | +"Oops! You have to sign in to participate in <strong>WikiLibras</strong> " | ||
2905 | +"project" | ||
2947 | msgstr "Oops! Você precisa se cadastrar para participar do projeto <strong>WikiLibras</strong>" | 2906 | msgstr "Oops! Você precisa se cadastrar para participar do projeto <strong>WikiLibras</strong>" |
2948 | 2907 | ||
2949 | -msgid "Oops! You have to sign in to participate in <strong>Corretor de Sinais</strong>" | ||
2950 | -" project" | 2908 | +msgid "" |
2909 | +"Oops! You have to sign in to participate in <strong>Corretor de Sinais</strong> " | ||
2910 | +"project" | ||
2951 | msgstr "Oops! Você precisa se cadastrar para participar do projeto <strong>Corretor de Sinais</strong>" | 2911 | msgstr "Oops! Você precisa se cadastrar para participar do projeto <strong>Corretor de Sinais</strong>" |
2952 | 2912 | ||
2953 | -msgid "Oops! You have to sign in to participate in <strong>Validador de Sinais</strong>" | ||
2954 | -" project" | 2913 | +msgid "" |
2914 | +"Oops! You have to sign in to participate in <strong>Validador de Sinais</strong> " | ||
2915 | +"project" | ||
2955 | msgstr "Oops! Você precisa se cadastrar para participar do projeto <strong>Validador de Sinais</strong>" | 2916 | msgstr "Oops! Você precisa se cadastrar para participar do projeto <strong>Validador de Sinais</strong>" |
2956 | 2917 | ||
2957 | # themes/default/templates/projects/index.html:30 | 2918 | # themes/default/templates/projects/index.html:30 |
@@ -2969,3 +2930,30 @@ msgstr "atividade" | @@ -2969,3 +2930,30 @@ msgstr "atividade" | ||
2969 | # themes/default/templates/projects/index.html:33 | 2930 | # themes/default/templates/projects/index.html:33 |
2970 | msgid "progress" | 2931 | msgid "progress" |
2971 | msgstr "progresso" | 2932 | msgstr "progresso" |
2933 | + | ||
2934 | +# forms/forms.py:283 | ||
2935 | +msgid "You want to participate as" | ||
2936 | +msgstr "Deseja atuar como" | ||
2937 | + | ||
2938 | +# view/projects.py:758 | ||
2939 | +# view/projects.py:815 | ||
2940 | +msgid "" | ||
2941 | +"Oops! Your profile <strong>(Colaborador)</strong> does not have access to the <strong>Validador de Sinais</strong> " | ||
2942 | +"project" | ||
2943 | +msgstr "Oops! O seu perfil <strong>(Colaborador)</strong> não tem acesso ao projeto <strong>Validador de Sinais</strong>" | ||
2944 | + | ||
2945 | +msgid "" | ||
2946 | +"Oops! Your profile <strong>(Colaborador)</strong> does not have access to the <strong>Corretor de Sinais</strong> " | ||
2947 | +"project" | ||
2948 | +msgstr "Oops! O seu perfil <strong>(Colaborador)</strong> não tem acesso ao projeto <strong>Corretor de Sinais</strong>" | ||
2949 | + | ||
2950 | +msgid "" | ||
2951 | +"Oops! Your profile <strong>(Animador)</strong> does not have access to the <strong>Validador de Sinais</strong> " | ||
2952 | +"project" | ||
2953 | +msgstr "Oops! O seu perfil <strong>(Animador)</strong> não tem acesso ao projeto <strong>Validador de Sinais</strong>" | ||
2954 | + | ||
2955 | +msgid "" | ||
2956 | +"Oops! Your profile <strong>(Especialista)</strong> does not have access to the <strong>Corretor de Sinais</strong> " | ||
2957 | +"project" | ||
2958 | +msgstr "Oops! O seu perfil <strong>(Especialista)</strong> não tem acesso ao projeto <strong>Corretor de Sinais</strong>" | ||
2959 | + |
pybossa/view/account.py
@@ -199,10 +199,12 @@ def register(): | @@ -199,10 +199,12 @@ def register(): | ||
199 | 199 | ||
200 | """ | 200 | """ |
201 | form = RegisterForm(request.form) | 201 | form = RegisterForm(request.form) |
202 | + form.set_profile_choices(current_app.config.get('PROFILES')) | ||
202 | if request.method == 'POST' and form.validate(): | 203 | if request.method == 'POST' and form.validate(): |
203 | account = dict(fullname=form.fullname.data, name=form.name.data, | 204 | account = dict(fullname=form.fullname.data, name=form.name.data, |
204 | email_addr=form.email_addr.data, | 205 | email_addr=form.email_addr.data, |
205 | - password=form.password.data) | 206 | + password=form.password.data, profile=form.profile.data, |
207 | + locale=current_app.config.get('DEFAULT_LOCALE')) | ||
206 | confirm_url = get_email_confirmation_url(account) | 208 | confirm_url = get_email_confirmation_url(account) |
207 | if current_app.config.get('ACCOUNT_CONFIRMATION_DISABLED'): | 209 | if current_app.config.get('ACCOUNT_CONFIRMATION_DISABLED'): |
208 | return _create_account(account) | 210 | return _create_account(account) |
@@ -268,10 +270,16 @@ def confirm_account(): | @@ -268,10 +270,16 @@ def confirm_account(): | ||
268 | 270 | ||
269 | 271 | ||
270 | def _create_account(user_data): | 272 | def _create_account(user_data): |
273 | + profile = user_repo.get_profile_by(name=user_data['profile']) | ||
274 | + if profile is None: | ||
275 | + return | ||
276 | + | ||
271 | new_user = model.user.User(fullname=user_data['fullname'], | 277 | new_user = model.user.User(fullname=user_data['fullname'], |
272 | name=user_data['name'], | 278 | name=user_data['name'], |
273 | email_addr=user_data['email_addr'], | 279 | email_addr=user_data['email_addr'], |
274 | - valid_email=True) | 280 | + valid_email=True, |
281 | + profile_id=profile.id, | ||
282 | + locale=user_data['locale']) | ||
275 | new_user.set_password(user_data['password']) | 283 | new_user.set_password(user_data['password']) |
276 | user_repo.save(new_user) | 284 | user_repo.save(new_user) |
277 | flash(gettext('Thanks for signing-up'), 'success') | 285 | flash(gettext('Thanks for signing-up'), 'success') |
pybossa/view/projects.py
@@ -738,7 +738,7 @@ def task_presenter(short_name, task_id): | @@ -738,7 +738,7 @@ def task_presenter(short_name, task_id): | ||
738 | if not project.allow_anonymous_contributors: | 738 | if not project.allow_anonymous_contributors: |
739 | msg = ("Oops! You have to sign in to participate in " | 739 | msg = ("Oops! You have to sign in to participate in " |
740 | "<strong>%s</strong>" | 740 | "<strong>%s</strong>" |
741 | - "project" % project.name) | 741 | + " project" % project.name) |
742 | flash(gettext(msg), 'warning') | 742 | flash(gettext(msg), 'warning') |
743 | return redirect(url_for('account.signin', | 743 | return redirect(url_for('account.signin', |
744 | next=url_for('.presenter', | 744 | next=url_for('.presenter', |
@@ -752,6 +752,13 @@ def task_presenter(short_name, task_id): | @@ -752,6 +752,13 @@ def task_presenter(short_name, task_id): | ||
752 | short_name=short_name, task_id=task_id) | 752 | short_name=short_name, task_id=task_id) |
753 | url = url_for('account.signin', next=next_url) | 753 | url = url_for('account.signin', next=next_url) |
754 | flash(msg_1 + "<a href=\"" + url + "\">Sign in now!</a>", "warning") | 754 | flash(msg_1 + "<a href=\"" + url + "\">Sign in now!</a>", "warning") |
755 | + | ||
756 | + if not current_user.is_anonymous() and not user_repo.profile_has_access(current_user, project.short_name): | ||
757 | + profile = user_repo.get_profile(current_user.profile_id) | ||
758 | + msg = "Oops! Your profile <strong>(%s)</strong> does not have access to the <strong>%s</strong> \ | ||
759 | + project" % (profile.name, project.name) | ||
760 | + flash(gettext(msg), 'warning') | ||
761 | + return redirect(url_for('project.index')) | ||
755 | 762 | ||
756 | title = project_title(project, "Contribute") | 763 | title = project_title(project, "Contribute") |
757 | template_args = {"project": project, "title": title, "owner": owner} | 764 | template_args = {"project": project, "title": title, "owner": owner} |
@@ -802,6 +809,13 @@ def presenter(short_name): | @@ -802,6 +809,13 @@ def presenter(short_name): | ||
802 | title = project_title(project, "Contribute") | 809 | title = project_title(project, "Contribute") |
803 | template_args = {"project": project, "title": title, "owner": owner, | 810 | template_args = {"project": project, "title": title, "owner": owner, |
804 | "invite_new_volunteers": invite_new_volunteers(project)} | 811 | "invite_new_volunteers": invite_new_volunteers(project)} |
812 | + | ||
813 | + if not current_user.is_anonymous() and not user_repo.profile_has_access(current_user, project.short_name): | ||
814 | + profile = user_repo.get_profile(current_user.profile_id) | ||
815 | + msg = "Oops! Your profile <strong>(%s)</strong> does not have access to the <strong>%s</strong> \ | ||
816 | + project" % (profile.name, project.name) | ||
817 | + flash(gettext(msg), 'warning') | ||
818 | + return redirect(url_for('project.index')) | ||
805 | 819 | ||
806 | if not project.allow_anonymous_contributors and current_user.is_anonymous(): | 820 | if not project.allow_anonymous_contributors and current_user.is_anonymous(): |
807 | msg = "Oops! You have to sign in to participate in <strong>%s</strong> \ | 821 | msg = "Oops! You have to sign in to participate in <strong>%s</strong> \ |
settings_local.py.tmpl
@@ -60,11 +60,15 @@ CONTACT_TWITTER = 'PyBossa' | @@ -60,11 +60,15 @@ CONTACT_TWITTER = 'PyBossa' | ||
60 | ## NOTE: You need to create a symbolic link to the translations folder, otherwise | 60 | ## NOTE: You need to create a symbolic link to the translations folder, otherwise |
61 | ## this wont work. | 61 | ## this wont work. |
62 | ## ln -s pybossa/themes/your-theme/translations pybossa/translations | 62 | ## ln -s pybossa/themes/your-theme/translations pybossa/translations |
63 | -DEFAULT_LOCALE = 'pt_BR' | 63 | +DEFAULT_LOCALE = u'pt_BR' |
64 | LOCALES = [('en', 'English'), ('es', u'Español'), | 64 | LOCALES = [('en', 'English'), ('es', u'Español'), |
65 | ('it', 'Italiano'), ('fr', u'Français'), | 65 | ('it', 'Italiano'), ('fr', u'Français'), |
66 | ('ja', u'日本語'),('pt_BR', u'Português (BR)')] | 66 | ('ja', u'日本語'),('pt_BR', u'Português (BR)')] |
67 | 67 | ||
68 | +# Profiles | ||
69 | +PROFILES = [('Colaborador','Colaborador'), ('Animador','Animador 3D'), ('Especialista', 'Especialista em LIBRAS')] | ||
70 | + | ||
71 | + | ||
68 | ## list of administrator emails to which error emails get sent | 72 | ## list of administrator emails to which error emails get sent |
69 | # ADMINS = ['me@sysadmin.org'] | 73 | # ADMINS = ['me@sysadmin.org'] |
70 | 74 |