Skip to content
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

Merged
merged 2 commits into from
Aug 28, 2017
Merged

unescape markup #1634

merged 2 commits into from
Aug 28, 2017

Conversation

fiorda
Copy link
Contributor

@fiorda fiorda commented Aug 24, 2017

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 97.991% when pulling 4a6a8e3 on bloomberg:fix-flash-markup into 57ce265 on Scifabric:master.

@teleyinex
Copy link
Member

🍰 Looks really nice!

@teleyinex
Copy link
Member

By the way, the only day that we do not do merges is on Fridays :-) Just to ensure a good weekend for everybody. Thus, next Monday will be merged! THANKS a lot. This is a really great and clean solution.

bitmoji

@fiorda
Copy link
Contributor Author

fiorda commented Aug 25, 2017

Awesome, thank you!

By the way, the only day that we do not do merges is on Fridays

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 '),

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 &lt;strong&gt;%s&lt;/strong&gt;" % project.name

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&#39;t find")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing i18n for that

Copy link
Member

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.

@@ -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))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing i18n for that

@@ -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')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing i18n for that

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!",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing i18n for that

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 97.992% when pulling de1c656 on bloomberg:fix-flash-markup into 57ce265 on Scifabric:master.

@teleyinex teleyinex merged commit f5fa746 into Scifabric:master Aug 28, 2017
@fiorda fiorda deleted the fix-flash-markup branch August 28, 2017 12:28
@fiorda fiorda restored the fix-flash-markup branch August 28, 2017 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants