Skip to content

Commit

Permalink
Merge pull request #746 from superdesk/master
Browse files Browse the repository at this point in the history
Merging master into stt
  • Loading branch information
akintolga authored Mar 28, 2019
2 parents 3bb0d11 + 3c6329b commit e8eca1c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 31 deletions.
5 changes: 1 addition & 4 deletions newsroom/agenda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ def init_app(app):
'google_maps_styles',
gettext('Google Maps Styles'),
default='',
description=gettext('Provide styles delimited by &(ampersand). '
'For example, feature:poi|element:labels|visibility:off&transit|visibility:off. '
'Refer to https://developers.google.com/maps/documentation/maps-static/styling '
'for more details'),
description=gettext('Provide styles delimited by &(ampersand). For example, feature:poi|element:labels|visibility:off&transit|visibility:off. Refer to https://developers.google.com/maps/documentation/maps-static/styling for more details'), # noqa
client_setting=True
)
6 changes: 3 additions & 3 deletions newsroom/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def push():
notify_new_item(agenda, check_topics=True)
elif item.get('type') == 'text':
orig = app.data.find_one('wire_search', req=None, _id=item['guid'])
item['_id'] = publish_item(item)
item['_id'] = publish_item(item, is_new=orig is None)
notify_new_item(item, check_topics=orig is None)
elif item['type'] == 'planning_featured':
publish_planning_featured(item)
Expand All @@ -96,7 +96,7 @@ def set_dates(doc):
doc.setdefault(app.config['VERSION'], 1)


def publish_item(doc):
def publish_item(doc, is_new):
"""Duplicating the logic from content_api.publish service."""
set_dates(doc)
doc.setdefault('wordcount', get_word_count(doc.get('body_html', '')))
Expand All @@ -123,7 +123,7 @@ def publish_item(doc):
agenda_items = superdesk.get_resource_service('agenda').set_delivery(doc)
if agenda_items:
[notify_new_item(item, check_topics=False) for item in agenda_items]
publish_item_signal.send(app._get_current_object(), item=doc)
publish_item_signal.send(app._get_current_object(), item=doc, is_new=is_new)
_id = service.create([doc])[0]
if 'evolvedfrom' in doc and parent_item:
service.system_update(parent_item['_id'], {'nextversion': _id}, parent_item)
Expand Down
3 changes: 1 addition & 2 deletions newsroom/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ def init_app(app):
# basic settings
app.general_setting('google_analytics', gettext('Google Analytics ID'), default=app.config['GOOGLE_ANALYTICS'])
app.general_setting('company_expiry_alert_recipients', gettext('Company expiry alert recipients'),
description=gettext('Comma separated list of email addresses to '
'which the expiration alerts of companies will be sent to.'))
description=gettext('Comma separated list of email addresses to which the expiration alerts of companies will be sent to.')) # noqa


class SettingsApp():
Expand Down
3 changes: 1 addition & 2 deletions newsroom/topics/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def update_topic(id):
if data.get('notifications'):
user = get_resource_service('users').find_one(req=None, _id=user_id)
if not user.get('receive_email'):
return "", gettext('Please enable \'Receive notifications via email\' option in '
'your profile to receive topic notifications')
return "", gettext('Please enable \'Receive notifications via email\' option in your profile to receive topic notifications') # noqa

updates = {
'label': data.get('label'),
Expand Down
23 changes: 22 additions & 1 deletion pots/newsroom-client.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1541,4 +1541,25 @@ msgstr ""

#: assets/wire/components/WirePreview.jsx:65
msgid "Follow story"
msgstr ""
msgstr ""

msgid "News only filter"
msgstr ""

msgid "This query defines what is NOT considered 'news' content. It is used by the News only switch to filter the view. When switched on, stories matching this filter will not be displayed."
msgstr ""

msgid "Time limit for Wire products (in days)"
msgstr ""

msgid "You can create an additional filter on top of the product definition. The time limit can be enabled for each company in the Permissions."
msgstr ""

msgid "Comma separated list of email addresses to which the expiration alerts of companies will be sent to."
msgstr ""

msgid "Provide styles delimited by &(ampersand). For example, feature:poi|element:labels|visibility:off&transit|visibility:off. Refer to https://developers.google.com/maps/documentation/maps-static/styling for more details"
msgstr ""

msgid "Company expiry alert recipients"
msgstr ""
23 changes: 4 additions & 19 deletions pots/newsroom-server.pot
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ msgid "Google Maps Styles"
msgstr ""

#: newsroom/agenda/__init__.py:34
msgid ""
"Provide styles delimited by &(ampersand). For example, "
"feature:poi|element:labels|visibility:off&transit|visibility:off. Refer "
"to https://developers.google.com/maps/documentation/maps-static/styling "
"for more details"
msgid "Provide styles delimited by &(ampersand). For example, feature:poi|element:labels|visibility:off&transit|visibility:off. Refer to https://developers.google.com/maps/documentation/maps-static/styling for more details"
msgstr ""

#: newsroom/agenda/agenda.py:44
Expand Down Expand Up @@ -582,9 +578,7 @@ msgid "On:"
msgstr ""

#: newsroom/topics/views.py:29
msgid ""
"Please enable 'Receive notifications via email' option in your profile to"
" receive topic notifications"
msgid "Please enable 'Receive notifications via email' option in your profile to receive topic notifications"
msgstr ""

#: newsroom/topics/views.py:109 newsroom/wire/views.py:214
Expand Down Expand Up @@ -685,24 +679,15 @@ msgid "News only filter"
msgstr ""

#: newsroom/wire/__init__.py:82
msgid ""
"\n"
"This query defines what is NOT considered \"news\" content.\n"
"It is used by the News only switch to filter the view.\n"
"When switched on, stories matching this filter will not be displayed.\n"
" "
msgid "This query defines what is NOT considered 'news' content. It is used by the News only switch to filter the view. When switched on, stories matching this filter will not be displayed."
msgstr ""

#: newsroom/wire/__init__.py:91
msgid "Time limit for Wire products (in days)"
msgstr ""

#: newsroom/wire/__init__.py:95
msgid ""
"\n"
"You can create an additional filter on top of the product definition.\n"
"The time limit can be enabled for each company in the Permissions.\n"
" "
msgid "You can create an additional filter on top of the product definition. The time limit can be enabled for each company in the Permissions."
msgstr ""

#: newsroom/wire/__init__.py:117
Expand Down

0 comments on commit e8eca1c

Please sign in to comment.