-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unescape markup #1634
unescape markup #1634
Conversation
🍰 Looks really nice! |
Awesome, thank you!
Makes a lot of sense :) have a great weekend! |
'<strong><a href="https://docs.pybossa.com"> {}' + | ||
'</a></strong> {}') | ||
flash(markup.format( | ||
gettext('You can check the '), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be one message, otherwise it will broken in translations files and hard to understood by translators.
@@ -5977,7 +5977,7 @@ def test_69_allow_anonymous_contributors(self): | |||
res = self.app.get(url, follow_redirects=True) | |||
err_msg = "User should be redirected to sign in" | |||
project = db.session.query(Project).first() | |||
msg = "Oops! You have to sign in to participate in <strong>%s</strong>" % project.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing i18n for that
@@ -414,7 +414,7 @@ def test_12_admin_user_search_json(self): | |||
# warning should be issued for non-found users | |||
data = {'user': 'nothingexists'} | |||
res = self.app_post_json('/admin/users', data=data) | |||
warning = ("We didn't find") | |||
warning = ("We didn't find") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing i18n for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Let's merge this first, and then we can fix these other issues. This solution will be the path to avoid these errors, so we can have good translations.
pybossa/view/projects.py
Outdated
@@ -784,7 +787,8 @@ def task_presenter(short_name, task_id): | |||
next_url = url_for('project.task_presenter', | |||
short_name=short_name, task_id=task_id) | |||
url = url_for('account.signin', next=next_url) | |||
flash(msg_1 + "<a href=\"" + url + "\">Sign in now!</a>", "warning") | |||
markup = Markup('<a href="{}">Sign in now!</a>'.format(url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing i18n for that
pybossa/view/admin.py
Outdated
@@ -473,7 +478,8 @@ def delete_announcement(id): | |||
|
|||
ensure_authorized_to('delete', announcement) | |||
announcement_repo.delete(announcement) | |||
flash('<i class="icon-ok"></i> ' + 'Announcement deleted!', 'success') | |||
markup = '<i class="icon-ok"></i> {}' | |||
flash(markup.format('Announcement deleted!'), 'success') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing i18n for that
pybossa/view/admin.py
Outdated
flash("<strong>Ooops!</strong> We didn't find a user " | ||
"matching your query: <strong>%s</strong>" % form.user.data) | ||
markup = Markup('<strong>{}</strong> {} <strong>{}</strong>') | ||
flash(markup.format("Ooops!", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing i18n for that
No description provided.