[i18n] Fix some messages and update locales

remotes/origin/github-import
David Barragán Merino 2017-01-25 17:40:47 +01:00
parent 475092f4c2
commit c2b0ac84e6
8 changed files with 130 additions and 51 deletions

View File

@ -48,9 +48,9 @@ class AsanaImporterViewSet(viewsets.ViewSet):
try:
users = importer.list_users(project_id)
except exceptions.InvalidRequest:
raise exc.BadRequest(_('Invalid asana api request'))
raise exc.BadRequest(_('Invalid Asana API request'))
except exceptions.FailedRequest:
raise exc.BadRequest(_('Failed to make the request to asana api'))
raise exc.BadRequest(_('Failed to make the request to Asana API'))
for user in users:
if user['detected_user']:
@ -71,9 +71,9 @@ class AsanaImporterViewSet(viewsets.ViewSet):
try:
projects = importer.list_projects()
except exceptions.InvalidRequest:
raise exc.BadRequest(_('Invalid asana api request'))
raise exc.BadRequest(_('Invalid Asana API request'))
except exceptions.FailedRequest:
raise exc.BadRequest(_('Failed to make the request to asana api'))
raise exc.BadRequest(_('Failed to make the request to Asana API'))
return response.Ok(projects)
@list_route(methods=["POST"])
@ -128,8 +128,8 @@ class AsanaImporterViewSet(viewsets.ViewSet):
try:
asana_token = AsanaImporter.get_access_token(code, settings.ASANA_APP_ID, settings.ASANA_APP_SECRET, settings.ASANA_APP_CALLBACK_URL)
except exceptions.InvalidRequest:
raise exc.BadRequest(_('Invalid asana api request'))
raise exc.BadRequest(_('Invalid Asana API request'))
except exceptions.FailedRequest:
raise exc.BadRequest(_('Failed to make the request to asana api'))
raise exc.BadRequest(_('Failed to make the request to Asana API'))
return response.Ok({"token": asana_token})

View File

@ -39,14 +39,14 @@ def import_project(self, user_id, token, project_id, options):
# Error
ctx = {
"user": user,
"error_subject": _("Error importing asana project"),
"error_message": _("Error importing asana project"),
"error_subject": _("Error importing Asana project"),
"error_message": _("Error importing Asana project"),
"project": project_id,
"exception": e
}
email = mail_builder.asana_import_error(admin, ctx)
email.send()
logger.error('Error importing asana project %s (by %s)', project_id, user, exc_info=sys.exc_info())
logger.error('Error importing Asana project %s (by %s)', project_id, user, exc_info=sys.exc_info())
else:
ctx = {
"project": project,

View File

@ -39,14 +39,14 @@ def import_project(self, user_id, token, project_id, options):
# Error
ctx = {
"user": user,
"error_subject": _("Error importing github project"),
"error_message": _("Error importing github project"),
"error_subject": _("Error importing GitHub project"),
"error_message": _("Error importing GitHub project"),
"project": project_id,
"exception": e
}
email = mail_builder.github_import_error(admin, ctx)
email.send()
logger.error('Error importing github project %s (by %s)', project_id, user, exc_info=sys.exc_info())
logger.error('Error importing GitHub project %s (by %s)', project_id, user, exc_info=sys.exc_info())
else:
ctx = {
"project": project,

View File

@ -44,14 +44,14 @@ def import_project(self, user_id, url, token, project_id, options, importer_type
# Error
ctx = {
"user": user,
"error_subject": _("Error importing jira project"),
"error_message": _("Error importing jira project"),
"error_subject": _("Error importing Jira project"),
"error_message": _("Error importing Jira project"),
"project": project_id,
"exception": e
}
email = mail_builder.jira_import_error(admin, ctx)
email.send()
logger.error('Error importing jira project %s (by %s)', project_id, user, exc_info=sys.exc_info())
logger.error('Error importing Jira project %s (by %s)', project_id, user, exc_info=sys.exc_info())
else:
ctx = {
"project": project,

View File

@ -39,14 +39,14 @@ def import_project(self, user_id, token, project_id, options):
# Error
ctx = {
"user": user,
"error_subject": _("Error importing pivotal project"),
"error_message": _("Error importing pivotal project"),
"error_subject": _("Error importing PivotalTracker project"),
"error_message": _("Error importing PivotalTracker project"),
"project": project_id,
"exception": e
}
email = mail_builder.pivotal_import_error(admin, ctx)
email.send()
logger.error('Error importing pivotal project %s (by %s)', project_id, user, exc_info=sys.exc_info())
logger.error('Error importing PivotalTracker project %s (by %s)', project_id, user, exc_info=sys.exc_info())
else:
ctx = {
"project": project,

View File

@ -39,14 +39,14 @@ def import_project(self, user_id, token, project_id, options):
# Error
ctx = {
"user": user,
"error_subject": _("Error importing trello project"),
"error_message": _("Error importing trello project"),
"error_subject": _("Error importing Trello project"),
"error_message": _("Error importing Trello project"),
"project": project_id,
"exception": e
}
email = mail_builder.trello_import_error(admin, ctx)
email.send()
logger.error('Error importing trello project %s (by %s)', project_id, user, exc_info=sys.exc_info())
logger.error('Error importing Trello project %s (by %s)', project_id, user, exc_info=sys.exc_info())
else:
ctx = {
"project": project,

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: taiga-back\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-09 09:12+0100\n"
"POT-Creation-Date: 2017-02-15 12:07+0100\n"
"PO-Revision-Date: 2015-03-25 20:09+0100\n"
"Last-Translator: Taiga Dev Team <support@taiga.io>\n"
"Language-Team: Taiga Dev Team <support@taiga.io>\n"
@ -184,8 +184,8 @@ msgstr ""
#: taiga/projects/api.py:754 taiga/projects/epics/api.py:200
#: taiga/projects/epics/api.py:284 taiga/projects/issues/api.py:224
#: taiga/projects/mixins/ordering.py:59 taiga/projects/tasks/api.py:247
#: taiga/projects/tasks/api.py:272 taiga/projects/userstories/api.py:322
#: taiga/projects/userstories/api.py:374 taiga/webhooks/api.py:71
#: taiga/projects/tasks/api.py:272 taiga/projects/userstories/api.py:323
#: taiga/projects/userstories/api.py:375 taiga/webhooks/api.py:71
msgid "Blocked element"
msgstr ""
@ -764,7 +764,7 @@ msgstr ""
#: taiga/external_apps/models.py:39 taiga/projects/attachments/models.py:62
#: taiga/projects/custom_attributes/models.py:37
#: taiga/projects/epics/models.py:55
#: taiga/projects/epics/models.py:56
#: taiga/projects/history/templatetags/functions.py:25
#: taiga/projects/issues/models.py:60 taiga/projects/models.py:152
#: taiga/projects/models.py:739 taiga/projects/tasks/models.py:62
@ -801,7 +801,7 @@ msgstr ""
#: taiga/feedback/models.py:31 taiga/projects/attachments/models.py:48
#: taiga/projects/contact/models.py:34
#: taiga/projects/custom_attributes/models.py:46
#: taiga/projects/epics/models.py:48 taiga/projects/issues/models.py:52
#: taiga/projects/epics/models.py:49 taiga/projects/issues/models.py:52
#: taiga/projects/likes/models.py:33 taiga/projects/milestones/models.py:48
#: taiga/projects/models.py:159 taiga/projects/models.py:743
#: taiga/projects/notifications/models.py:89 taiga/projects/tasks/models.py:48
@ -861,7 +861,7 @@ msgstr ""
#: taiga/hooks/api.py:63 taiga/projects/epics/api.py:154
#: taiga/projects/issues/api.py:139 taiga/projects/tasks/api.py:201
#: taiga/projects/userstories/api.py:276
#: taiga/projects/userstories/api.py:277
msgid "The project doesn't exist"
msgstr ""
@ -949,6 +949,85 @@ msgstr ""
msgid "The status doesn't exist"
msgstr ""
#: taiga/importers/asana/api.py:44 taiga/importers/asana/api.py:86
#: taiga/importers/github/api.py:45 taiga/importers/github/api.py:75
#: taiga/importers/jira/api.py:56 taiga/importers/jira/api.py:102
#: taiga/importers/pivotal/api.py:44 taiga/importers/pivotal/api.py:81
#: taiga/importers/trello/api.py:46 taiga/importers/trello/api.py:83
msgid "The project param is needed"
msgstr ""
#: taiga/importers/asana/api.py:51 taiga/importers/asana/api.py:74
#: taiga/importers/asana/api.py:131
msgid "Invalid Asana API request"
msgstr ""
#: taiga/importers/asana/api.py:53 taiga/importers/asana/api.py:76
#: taiga/importers/asana/api.py:133
msgid "Failed to make the request to Asana API"
msgstr ""
#: taiga/importers/asana/api.py:126 taiga/importers/github/api.py:121
msgid "Code param needed"
msgstr ""
#: taiga/importers/asana/tasks.py:42 taiga/importers/asana/tasks.py:43
msgid "Error importing Asana project"
msgstr ""
#: taiga/importers/github/api.py:129
msgid "Invalid auth data"
msgstr ""
#: taiga/importers/github/api.py:131
msgid "Third party service failing"
msgstr ""
#: taiga/importers/github/tasks.py:42 taiga/importers/github/tasks.py:43
msgid "Error importing GitHub project"
msgstr ""
#: taiga/importers/jira/api.py:58 taiga/importers/jira/api.py:85
#: taiga/importers/jira/api.py:105 taiga/importers/jira/api.py:178
msgid "The url param is needed"
msgstr ""
#: taiga/importers/jira/api.py:154
msgid "Invalid project_type {}"
msgstr ""
#: taiga/importers/jira/api.py:224 taiga/importers/pivotal/api.py:139
#: taiga/importers/trello/api.py:143
msgid "Invalid or expired auth token"
msgstr ""
#: taiga/importers/jira/tasks.py:47 taiga/importers/jira/tasks.py:48
msgid "Error importing Jira project"
msgstr ""
#: taiga/importers/pivotal/tasks.py:42 taiga/importers/pivotal/tasks.py:43
msgid "Error importing PivotalTracker project"
msgstr ""
#: taiga/importers/trello/importer.py:77
#, python-format
msgid "Invalid Request: %s at %s"
msgstr ""
#: taiga/importers/trello/importer.py:79 taiga/importers/trello/importer.py:81
#, python-format
msgid "Unauthorized: %s at %s"
msgstr ""
#: taiga/importers/trello/importer.py:83 taiga/importers/trello/importer.py:85
#, python-format
msgid "Resource Unavailable: %s at %s"
msgstr ""
#: taiga/importers/trello/tasks.py:42 taiga/importers/trello/tasks.py:43
msgid "Error importing Trello project"
msgstr ""
#: taiga/permissions/choices.py:23 taiga/permissions/choices.py:34
msgid "View project"
msgstr ""
@ -1134,7 +1213,7 @@ msgid "Fans"
msgstr ""
#: taiga/projects/admin.py:144 taiga/projects/attachments/models.py:39
#: taiga/projects/epics/models.py:39 taiga/projects/issues/models.py:37
#: taiga/projects/epics/models.py:40 taiga/projects/issues/models.py:37
#: taiga/projects/milestones/models.py:42 taiga/projects/models.py:164
#: taiga/projects/notifications/models.py:62 taiga/projects/tasks/models.py:39
#: taiga/projects/userstories/models.py:69 taiga/projects/wiki/models.py:40
@ -1217,7 +1296,7 @@ msgstr ""
#: taiga/projects/attachments/models.py:41 taiga/projects/contact/models.py:29
#: taiga/projects/custom_attributes/models.py:43
#: taiga/projects/epics/models.py:37 taiga/projects/issues/models.py:50
#: taiga/projects/epics/models.py:38 taiga/projects/issues/models.py:50
#: taiga/projects/milestones/models.py:44 taiga/projects/models.py:506
#: taiga/projects/models.py:528 taiga/projects/models.py:565
#: taiga/projects/models.py:593 taiga/projects/models.py:619
@ -1240,7 +1319,7 @@ msgstr ""
#: taiga/projects/attachments/models.py:51
#: taiga/projects/custom_attributes/models.py:48
#: taiga/projects/epics/models.py:51 taiga/projects/issues/models.py:55
#: taiga/projects/epics/models.py:52 taiga/projects/issues/models.py:55
#: taiga/projects/milestones/models.py:51 taiga/projects/models.py:162
#: taiga/projects/models.py:746 taiga/projects/tasks/models.py:51
#: taiga/projects/userstories/models.py:90 taiga/projects/wiki/models.py:47
@ -1266,7 +1345,7 @@ msgstr ""
#: taiga/projects/attachments/models.py:63
#: taiga/projects/custom_attributes/models.py:41
#: taiga/projects/epics/models.py:101 taiga/projects/milestones/models.py:57
#: taiga/projects/epics/models.py:104 taiga/projects/milestones/models.py:57
#: taiga/projects/models.py:522 taiga/projects/models.py:555
#: taiga/projects/models.py:589 taiga/projects/models.py:613
#: taiga/projects/models.py:645 taiga/projects/models.py:665
@ -1409,26 +1488,26 @@ msgstr ""
msgid "You don't have permissions to set this status to this epic."
msgstr ""
#: taiga/projects/epics/models.py:35 taiga/projects/issues/models.py:35
#: taiga/projects/epics/models.py:36 taiga/projects/issues/models.py:35
#: taiga/projects/tasks/models.py:37 taiga/projects/userstories/models.py:62
msgid "ref"
msgstr ""
#: taiga/projects/epics/models.py:42 taiga/projects/issues/models.py:39
#: taiga/projects/epics/models.py:43 taiga/projects/issues/models.py:39
#: taiga/projects/tasks/models.py:41 taiga/projects/userstories/models.py:72
msgid "status"
msgstr ""
#: taiga/projects/epics/models.py:45
#: taiga/projects/epics/models.py:46
msgid "epics order"
msgstr ""
#: taiga/projects/epics/models.py:54 taiga/projects/issues/models.py:59
#: taiga/projects/epics/models.py:55 taiga/projects/issues/models.py:59
#: taiga/projects/tasks/models.py:55 taiga/projects/userstories/models.py:94
msgid "subject"
msgstr ""
#: taiga/projects/epics/models.py:58 taiga/projects/models.py:526
#: taiga/projects/epics/models.py:59 taiga/projects/models.py:526
#: taiga/projects/models.py:561 taiga/projects/models.py:617
#: taiga/projects/models.py:647 taiga/projects/models.py:667
#: taiga/projects/models.py:691 taiga/projects/models.py:719
@ -1436,23 +1515,28 @@ msgstr ""
msgid "color"
msgstr ""
#: taiga/projects/epics/models.py:61 taiga/projects/issues/models.py:63
#: taiga/projects/epics/models.py:62 taiga/projects/issues/models.py:63
#: taiga/projects/tasks/models.py:65 taiga/projects/userstories/models.py:98
msgid "assigned to"
msgstr ""
#: taiga/projects/epics/models.py:63 taiga/projects/userstories/models.py:100
#: taiga/projects/epics/models.py:64 taiga/projects/userstories/models.py:100
msgid "is client requirement"
msgstr ""
#: taiga/projects/epics/models.py:65 taiga/projects/userstories/models.py:102
#: taiga/projects/epics/models.py:66 taiga/projects/userstories/models.py:102
msgid "is team requirement"
msgstr ""
#: taiga/projects/epics/models.py:69
#: taiga/projects/epics/models.py:70
msgid "user stories"
msgstr ""
#: taiga/projects/epics/models.py:72 taiga/projects/issues/models.py:66
#: taiga/projects/tasks/models.py:70 taiga/projects/userstories/models.py:109
msgid "external reference"
msgstr ""
#: taiga/projects/epics/validators.py:37
msgid "There's no epic with that id"
msgstr ""
@ -1635,11 +1719,6 @@ msgstr ""
msgid "finished date"
msgstr ""
#: taiga/projects/issues/models.py:66 taiga/projects/tasks/models.py:70
#: taiga/projects/userstories/models.py:109
msgid "external reference"
msgstr ""
#: taiga/projects/likes/models.py:36
msgid "Like"
msgstr ""
@ -3307,25 +3386,25 @@ msgstr ""
msgid "Stakeholder"
msgstr ""
#: taiga/projects/userstories/api.py:127
#: taiga/projects/userstories/api.py:128
msgid "You don't have permissions to set this sprint to this user story."
msgstr ""
#: taiga/projects/userstories/api.py:131
#: taiga/projects/userstories/api.py:132
msgid "You don't have permissions to set this status to this user story."
msgstr ""
#: taiga/projects/userstories/api.py:221
#: taiga/projects/userstories/api.py:222
#, python-brace-format
msgid "Invalid role id '{role_id}'"
msgstr ""
#: taiga/projects/userstories/api.py:228
#: taiga/projects/userstories/api.py:229
#, python-brace-format
msgid "Invalid points id '{points_id}'"
msgstr ""
#: taiga/projects/userstories/api.py:243
#: taiga/projects/userstories/api.py:244
#, python-brace-format
msgid "Generating the user story #{ref} - {subject}"
msgstr ""

View File

@ -95,7 +95,7 @@ def test_authorize_with_bad_verify(client, settings):
assert response.status_code == 400
assert 'token' not in response.data
assert '_error_message' in response.data
assert response.data['_error_message'] == "Invalid asana api request"
assert response.data['_error_message'] == "Invalid Asana API request"
def test_import_asana_list_users(client):