diff --git a/.tx/config b/.tx/config index 9435d2abc76..d0a7e04a6a2 100644 --- a/.tx/config +++ b/.tx/config @@ -5,9 +5,6 @@ host = https://www.transifex.com file_filter = ckan/i18n//LC_MESSAGES/ckan.po source_file = ckan/i18n/ckan.pot source_lang = en +trans.sr@latin = ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po type = PO -# Namings not quite the same in Transifex and babel: -# Transifex vs Babel (& CKAN) -# 'sr@Latin' vs 'sr_Latn' -trans.sr@latin = ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2b2b625771b..490bb6f5633 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,25 @@ Changelog --------- +v2.5.6 2017-08-02 +================= + +* Fix in organization / group form image URL field (#3661) +* Fix activity test to use utcnow (#3644) +* Changed required permission from 'update' to 'manage_group' (#3631) +* Catch invalid sort param exception (#3630) +* Choose direction of recreated package relationship depending on its type (#3626) +* Fix render_datetime for dates before year 1900 (#3611) +* Fix KeyError in 'package_create' (#3027) +* Allow slug preview to work with autocomplete fields (#2501) +* Fix filter results button not working for organization/group (#3620) +* Allow underscores in URL slug preview on create dataset (#3612) +* Create new resource view if resource format changed (#3515) +* Fixed incorrect escaping in `mail_to` and datapusher's log +* Autocomplete fields are more responsive - 300ms timeout instead of 1s (#3693) +* Fixed dataset count display for groups (#3711) +* Restrict access to form pages (#3684) + v2.5.5 2017-03-22 ================= diff --git a/ckan/__init__.py b/ckan/__init__.py index 75bb565ac23..38c7ad36146 100644 --- a/ckan/__init__.py +++ b/ckan/__init__.py @@ -1,4 +1,4 @@ -__version__ = '2.5.5' +__version__ = '2.5.6' __description__ = 'CKAN Software' __long_description__ = \ diff --git a/ckan/controllers/group.py b/ckan/controllers/group.py index 8483ea07c0b..1c011e9a370 100644 --- a/ckan/controllers/group.py +++ b/ckan/controllers/group.py @@ -168,14 +168,24 @@ def index(self): context['user_id'] = c.userobj.id context['user_is_admin'] = c.userobj.sysadmin - data_dict_global_results = { - 'all_fields': False, - 'q': q, - 'sort': sort_by, - 'type': group_type or 'group', - } - global_results = self._action('group_list')(context, - data_dict_global_results) + try: + data_dict_global_results = { + 'all_fields': False, + 'q': q, + 'sort': sort_by, + 'type': group_type or 'group', + } + global_results = self._action('group_list')( + context, data_dict_global_results) + except ValidationError as e: + if e.error_dict and e.error_dict.get('message'): + msg = e.error_dict['message'] + else: + msg = str(e) + h.flash_error(msg) + c.page = h.Page([], 0) + return render(self._index_template(group_type), + extra_vars={'group_type': group_type}) data_dict_page_results = { 'all_fields': True, @@ -405,6 +415,7 @@ def bulk_process(self, id): data_dict = {'id': id} try: + self._check_access('bulk_update_public', context, {'org_id': id}) # Do not query for the group datasets when dictizing, as they will # be ignored and get requested on the controller anyway data_dict['include_datasets'] = False @@ -413,7 +424,7 @@ def bulk_process(self, id): except NotFound: abort(404, _('Group not found')) except NotAuthorized: - abort(401, _('Unauthorized to read group %s') % id) + abort(403, _('User %r not authorized to edit %s') % (c.user, id)) #use different form names so that ie7 can be detected form_names = set(["bulk_action.public", "bulk_action.delete", @@ -673,16 +684,21 @@ def members(self, id): 'user': c.user or c.author} try: + data_dict = {'id': id} + check_access('group_edit_permissions', context, data_dict) c.members = self._action('member_list')( context, {'id': id, 'object_type': 'user'} ) - data_dict = {'id': id} data_dict['include_datasets'] = False c.group_dict = self._action('group_show')(context, data_dict) - except NotAuthorized: - abort(401, _('Unauthorized to delete group %s') % '') except NotFound: abort(404, _('Group not found')) + except NotAuthorized: + abort( + 403, + _('User %r not authorized to edit members of %s') % ( + c.user, id)) + return self._render_template('group/members.html', group_type) def member_new(self, id): @@ -691,7 +707,11 @@ def member_new(self, id): context = {'model': model, 'session': model.Session, 'user': c.user or c.author} - #self._check_access('group_delete', context, {'id': id}) + try: + self._check_access('group_member_create', context, {'id': id}) + except NotAuthorized: + abort(403, _('Unauthorized to create group %s members') % '') + try: data_dict = {'id': id} data_dict['include_datasets'] = False diff --git a/ckan/controllers/package.py b/ckan/controllers/package.py index f0ba12ee6bb..a8214bd7d9b 100644 --- a/ckan/controllers/package.py +++ b/ckan/controllers/package.py @@ -549,6 +549,15 @@ def new(self, data=None, errors=None, error_summary=None): def resource_edit(self, id, resource_id, data=None, errors=None, error_summary=None): + context = {'model': model, 'session': model.Session, + 'api_version': 3, 'for_edit': True, + 'user': c.user, 'auth_user_obj': c.userobj} + data_dict = {'id': id} + + try: + check_access('package_update', context, data_dict) + except NotAuthorized: + abort(403, _('User %r not authorized to edit %s') % (c.user, id)) if request.method == 'POST' and not data: data = data or \ @@ -557,10 +566,6 @@ def resource_edit(self, id, resource_id, data=None, errors=None, # we don't want to include save as it is part of the form del data['save'] - context = {'model': model, 'session': model.Session, - 'api_version': 3, 'for_edit': True, - 'user': c.user or c.author, 'auth_user_obj': c.userobj} - data['package_id'] = id try: if resource_id: @@ -578,9 +583,6 @@ def resource_edit(self, id, resource_id, data=None, errors=None, redirect(h.url_for(controller='package', action='resource_read', id=id, resource_id=resource_id)) - context = {'model': model, 'session': model.Session, - 'api_version': 3, 'for_edit': True, - 'user': c.user or c.author, 'auth_user_obj': c.userobj} pkg_dict = get_action('package_show')(context, {'id': id}) if pkg_dict['state'].startswith('draft'): # dataset has not yet been fully created diff --git a/ckan/i18n/ar/LC_MESSAGES/ckan.po b/ckan/i18n/ar/LC_MESSAGES/ckan.po index f908e009324..e094cebd6dd 100644 --- a/ckan/i18n/ar/LC_MESSAGES/ckan.po +++ b/ckan/i18n/ar/LC_MESSAGES/ckan.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:18+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Arabic (http://www.transifex.com/okfn/ckan/language/ar/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/bg/LC_MESSAGES/ckan.po b/ckan/i18n/bg/LC_MESSAGES/ckan.po index 4e769518150..330c5445678 100644 --- a/ckan/i18n/bg/LC_MESSAGES/ckan.po +++ b/ckan/i18n/bg/LC_MESSAGES/ckan.po @@ -20,7 +20,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:23+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Bulgarian (http://www.transifex.com/okfn/ckan/language/bg/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/ca/LC_MESSAGES/ckan.po b/ckan/i18n/ca/LC_MESSAGES/ckan.po index aa118c92fae..ebc6d45754a 100644 --- a/ckan/i18n/ca/LC_MESSAGES/ckan.po +++ b/ckan/i18n/ca/LC_MESSAGES/ckan.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-04 10:58+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Adrià Mercader \n" "Language-Team: Catalan (http://www.transifex.com/okfn/ckan/language/ca/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po b/ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po index 10ff2270c0c..b750c673971 100644 --- a/ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po +++ b/ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po @@ -4,16 +4,16 @@ # # Translators: # Adrià Mercader , 2013 -# klimek , 2011,2015 -# klimek , 2015 +# Jakub Klímek , 2011,2015 +# Jakub Klímek , 2015 # uep, 2011 msgid "" msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-04 11:38+0000\n" -"Last-Translator: klimek \n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" +"Last-Translator: Jakub Klímek \n" "Language-Team: Czech (Czech Republic) (http://www.transifex.com/okfn/ckan/language/cs_CZ/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/ckan/i18n/da_DK/LC_MESSAGES/ckan.po b/ckan/i18n/da_DK/LC_MESSAGES/ckan.po index e4b9fa16789..22284c5e68c 100644 --- a/ckan/i18n/da_DK/LC_MESSAGES/ckan.po +++ b/ckan/i18n/da_DK/LC_MESSAGES/ckan.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:23+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Danish (Denmark) (http://www.transifex.com/okfn/ckan/language/da_DK/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/de/LC_MESSAGES/ckan.po b/ckan/i18n/de/LC_MESSAGES/ckan.po index fb96a616fc4..6a367f319e9 100644 --- a/ckan/i18n/de/LC_MESSAGES/ckan.po +++ b/ckan/i18n/de/LC_MESSAGES/ckan.po @@ -25,7 +25,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-10 07:53+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Florian Mayer \n" "Language-Team: German (http://www.transifex.com/okfn/ckan/language/de/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/el/LC_MESSAGES/ckan.po b/ckan/i18n/el/LC_MESSAGES/ckan.po index f0ca19224e2..0fd6fd9d887 100644 --- a/ckan/i18n/el/LC_MESSAGES/ckan.po +++ b/ckan/i18n/el/LC_MESSAGES/ckan.po @@ -24,7 +24,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:11+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Greek (http://www.transifex.com/okfn/ckan/language/el/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/en_AU/LC_MESSAGES/ckan.po b/ckan/i18n/en_AU/LC_MESSAGES/ckan.po index 1b1d0715c8a..5d6863b5d9e 100644 --- a/ckan/i18n/en_AU/LC_MESSAGES/ckan.po +++ b/ckan/i18n/en_AU/LC_MESSAGES/ckan.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 21:50+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Steven De Costa \n" "Language-Team: English (Australia) (http://www.transifex.com/okfn/ckan/language/en_AU/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/en_GB/LC_MESSAGES/ckan.po b/ckan/i18n/en_GB/LC_MESSAGES/ckan.po index 5cae6b55630..1fd32ad904f 100644 --- a/ckan/i18n/en_GB/LC_MESSAGES/ckan.po +++ b/ckan/i18n/en_GB/LC_MESSAGES/ckan.po @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-05-27 15:38+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Martin Burchell \n" "Language-Team: English (United Kingdom) (http://www.transifex.com/okfn/ckan/language/en_GB/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/es/LC_MESSAGES/ckan.po b/ckan/i18n/es/LC_MESSAGES/ckan.po index 98eac43930e..48ead22d76b 100644 --- a/ckan/i18n/es/LC_MESSAGES/ckan.po +++ b/ckan/i18n/es/LC_MESSAGES/ckan.po @@ -8,7 +8,7 @@ # Félix Pedrera , 2012 # , 2011 # Isabel Ruiz, 2013 -# javierdcm , 2012 +# J , 2012 # Jesús García <>, 2012 # Jesus Redondo , 2013 # Open Knowledge Foundation , 2011 @@ -18,7 +18,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-06 19:52+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Carlos Brys \n" "Language-Team: Spanish (http://www.transifex.com/okfn/ckan/language/es/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/es_AR/LC_MESSAGES/ckan.po b/ckan/i18n/es_AR/LC_MESSAGES/ckan.po index 7dfbae45645..0a7fa48c64e 100644 --- a/ckan/i18n/es_AR/LC_MESSAGES/ckan.po +++ b/ckan/i18n/es_AR/LC_MESSAGES/ckan.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-10 14:30+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Carlos Brys \n" "Language-Team: Spanish (Argentina) (http://www.transifex.com/okfn/ckan/language/es_AR/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/fa_IR/LC_MESSAGES/ckan.po b/ckan/i18n/fa_IR/LC_MESSAGES/ckan.po index 00b968a4d72..d0d9dc3f1ac 100644 --- a/ckan/i18n/fa_IR/LC_MESSAGES/ckan.po +++ b/ckan/i18n/fa_IR/LC_MESSAGES/ckan.po @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:20+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Persian (Iran) (http://www.transifex.com/okfn/ckan/language/fa_IR/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/fi/LC_MESSAGES/ckan.po b/ckan/i18n/fi/LC_MESSAGES/ckan.po index 817cd10b7bc..b5cbbbaa7fd 100644 --- a/ckan/i18n/fi/LC_MESSAGES/ckan.po +++ b/ckan/i18n/fi/LC_MESSAGES/ckan.po @@ -21,7 +21,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-05-26 12:31+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Zharktas \n" "Language-Team: Finnish (http://www.transifex.com/okfn/ckan/language/fi/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/fr/LC_MESSAGES/ckan.po b/ckan/i18n/fr/LC_MESSAGES/ckan.po index 4530fd4491a..81f5700f84a 100644 --- a/ckan/i18n/fr/LC_MESSAGES/ckan.po +++ b/ckan/i18n/fr/LC_MESSAGES/ckan.po @@ -6,7 +6,7 @@ # Adrià Mercader , 2014 # Anne-Marie Luigi-Way, 2013 # arthur.lutz , 2012 -# Diane Mercier , 2015 +# Diane Mercier , 2015 # Emmanuel , 2013 # , 2011 # keronos , 2012 @@ -20,8 +20,8 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-04 21:03+0000\n" -"Last-Translator: Diane Mercier \n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" +"Last-Translator: Diane Mercier \n" "Language-Team: French (http://www.transifex.com/okfn/ckan/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/ckan/i18n/he/LC_MESSAGES/ckan.po b/ckan/i18n/he/LC_MESSAGES/ckan.po index 00641261afc..87f3803bf64 100644 --- a/ckan/i18n/he/LC_MESSAGES/ckan.po +++ b/ckan/i18n/he/LC_MESSAGES/ckan.po @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:24+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Hebrew (http://www.transifex.com/okfn/ckan/language/he/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/hr/LC_MESSAGES/ckan.po b/ckan/i18n/hr/LC_MESSAGES/ckan.po index 7c7353b1a01..395b74a0ee6 100644 --- a/ckan/i18n/hr/LC_MESSAGES/ckan.po +++ b/ckan/i18n/hr/LC_MESSAGES/ckan.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-04 19:48+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Vladimir Mašala \n" "Language-Team: Croatian (http://www.transifex.com/okfn/ckan/language/hr/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/hu/LC_MESSAGES/ckan.po b/ckan/i18n/hu/LC_MESSAGES/ckan.po index e79f8ae19da..05a427e2703 100644 --- a/ckan/i18n/hu/LC_MESSAGES/ckan.po +++ b/ckan/i18n/hu/LC_MESSAGES/ckan.po @@ -4,7 +4,7 @@ # # Translators: # , 2011 -# kitzinger , 2012 +# David Kitzinger , 2012 # Open Knowledge Foundation , 2011 # Sean Hammond , 2012 # stf , 2011 @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:21+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Hungarian (http://www.transifex.com/okfn/ckan/language/hu/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/id/LC_MESSAGES/ckan.po b/ckan/i18n/id/LC_MESSAGES/ckan.po index 9a7b3656f1e..230145deb84 100644 --- a/ckan/i18n/id/LC_MESSAGES/ckan.po +++ b/ckan/i18n/id/LC_MESSAGES/ckan.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:18+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Indonesian (http://www.transifex.com/okfn/ckan/language/id/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/is/LC_MESSAGES/ckan.po b/ckan/i18n/is/LC_MESSAGES/ckan.po index 7b308137ae7..9d62e0a41b0 100644 --- a/ckan/i18n/is/LC_MESSAGES/ckan.po +++ b/ckan/i18n/is/LC_MESSAGES/ckan.po @@ -19,7 +19,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-28 21:17+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Tryggvi Björgvinsson \n" "Language-Team: Icelandic (http://www.transifex.com/okfn/ckan/language/is/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/it/LC_MESSAGES/ckan.po b/ckan/i18n/it/LC_MESSAGES/ckan.po index fa90b00b5d1..4772b0c4240 100644 --- a/ckan/i18n/it/LC_MESSAGES/ckan.po +++ b/ckan/i18n/it/LC_MESSAGES/ckan.po @@ -10,7 +10,7 @@ # groundrace , 2013,2015 # , 2011 # lafuga2 , 2012 -# Lorenzo Ruzzene , 2014 +# Lorenzo Ruzzene , 2014 # Luca De Santis , 2015 # M2M , 2013 # Maurizio Napolitano , 2015 @@ -21,7 +21,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 15:06+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Maurizio Napolitano \n" "Language-Team: Italian (http://www.transifex.com/okfn/ckan/language/it/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/ja/LC_MESSAGES/ckan.po b/ckan/i18n/ja/LC_MESSAGES/ckan.po index 3e0ca768a08..504e9b1db2d 100644 --- a/ckan/i18n/ja/LC_MESSAGES/ckan.po +++ b/ckan/i18n/ja/LC_MESSAGES/ckan.po @@ -8,7 +8,7 @@ # Hal Seki , 2015 # Kayama Yoichi , 2015 # nyampire <>, 2012 -# Satoshi IIDA , 2013 +# nyampire , 2013 # Sean Hammond , 2012 # Takayuki Miyauchi , 2015 msgid "" @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-27 07:50+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Fumihiro Kato <>\n" "Language-Team: Japanese (http://www.transifex.com/okfn/ckan/language/ja/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/km/LC_MESSAGES/ckan.po b/ckan/i18n/km/LC_MESSAGES/ckan.po index cacaa9c9c4e..f0f0248c009 100644 --- a/ckan/i18n/km/LC_MESSAGES/ckan.po +++ b/ckan/i18n/km/LC_MESSAGES/ckan.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:18+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Khmer (http://www.transifex.com/okfn/ckan/language/km/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/ko_KR/LC_MESSAGES/ckan.po b/ckan/i18n/ko_KR/LC_MESSAGES/ckan.po index 283e53e49ac..8c8aa82cc18 100644 --- a/ckan/i18n/ko_KR/LC_MESSAGES/ckan.po +++ b/ckan/i18n/ko_KR/LC_MESSAGES/ckan.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-04 23:00+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: haklaekim \n" "Language-Team: Korean (Korea) (http://www.transifex.com/okfn/ckan/language/ko_KR/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/lt/LC_MESSAGES/ckan.po b/ckan/i18n/lt/LC_MESSAGES/ckan.po index 3e678d8a709..798e6685e0f 100644 --- a/ckan/i18n/lt/LC_MESSAGES/ckan.po +++ b/ckan/i18n/lt/LC_MESSAGES/ckan.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:21+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Lithuanian (http://www.transifex.com/okfn/ckan/language/lt/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/lv/LC_MESSAGES/ckan.po b/ckan/i18n/lv/LC_MESSAGES/ckan.po index 39b9795176b..58048c5f4ff 100644 --- a/ckan/i18n/lv/LC_MESSAGES/ckan.po +++ b/ckan/i18n/lv/LC_MESSAGES/ckan.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:19+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Latvian (http://www.transifex.com/okfn/ckan/language/lv/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/mn_MN/LC_MESSAGES/ckan.po b/ckan/i18n/mn_MN/LC_MESSAGES/ckan.po index 2176bc3089c..c72db40e97e 100644 --- a/ckan/i18n/mn_MN/LC_MESSAGES/ckan.po +++ b/ckan/i18n/mn_MN/LC_MESSAGES/ckan.po @@ -25,7 +25,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-07 02:24+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: amarsanaag \n" "Language-Team: Mongolian (Mongolia) (http://www.transifex.com/okfn/ckan/language/mn_MN/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/nl/LC_MESSAGES/ckan.po b/ckan/i18n/nl/LC_MESSAGES/ckan.po index 8cf9a3be911..ddee02fa749 100644 --- a/ckan/i18n/nl/LC_MESSAGES/ckan.po +++ b/ckan/i18n/nl/LC_MESSAGES/ckan.po @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-16 13:08+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Peter Vos \n" "Language-Team: Dutch (http://www.transifex.com/okfn/ckan/language/nl/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/no/LC_MESSAGES/ckan.po b/ckan/i18n/no/LC_MESSAGES/ckan.po index ceb62988edb..dde01060e26 100644 --- a/ckan/i18n/no/LC_MESSAGES/ckan.po +++ b/ckan/i18n/no/LC_MESSAGES/ckan.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-01-07 07:44+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Hilde Austlid \n" "Language-Team: Norwegian (http://www.transifex.com/okfn/ckan/language/no/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/pl/LC_MESSAGES/ckan.po b/ckan/i18n/pl/LC_MESSAGES/ckan.po index e0255a43a4d..58968c86b13 100644 --- a/ckan/i18n/pl/LC_MESSAGES/ckan.po +++ b/ckan/i18n/pl/LC_MESSAGES/ckan.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:20+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Polish (http://www.transifex.com/okfn/ckan/language/pl/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.1.1\n" "Language: pl\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" #: ckan/authz.py:177 #, python-format @@ -880,6 +880,7 @@ msgid_plural "{n} new activities from {site_title}" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/formatters.py:17 msgid "January" @@ -939,6 +940,7 @@ msgid_plural "{mins} minutes ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/formatters.py:119 msgid "{hours} hour ago" @@ -946,6 +948,7 @@ msgid_plural "{hours} hours ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/formatters.py:125 msgid "{days} day ago" @@ -953,6 +956,7 @@ msgid_plural "{days} days ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/formatters.py:128 msgid "{months} month ago" @@ -960,6 +964,7 @@ msgid_plural "{months} months ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/formatters.py:130 msgid "over {years} year ago" @@ -967,6 +972,7 @@ msgid_plural "over {years} years ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/formatters.py:146 msgid "{month} {day}, {year}, {hour:02}:{min:02} ({timezone})" @@ -1062,6 +1068,7 @@ msgid_plural "{number} views" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/helpers.py:1520 msgid "{number} recent view" @@ -1069,6 +1076,7 @@ msgid_plural "{number} recent views" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/lib/mailer.py:25 #, python-format @@ -2105,6 +2113,7 @@ msgid_plural "Dashboard (%(num)d new items)" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/header.html:29 ckan/templates/user/dashboard.html:6 msgid "Dashboard" @@ -2741,6 +2750,7 @@ msgid_plural "{num} Datasets" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/group/snippets/group_item.html:34 #: ckan/templates/organization/snippets/organization_item.html:33 @@ -3899,6 +3909,7 @@ msgid_plural "{number} datasets found for \"{query}\"" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/snippets/search_result_text.html:16 msgid "No datasets found for \"{query}\"" @@ -3910,6 +3921,7 @@ msgid_plural "{number} datasets found" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/snippets/search_result_text.html:18 msgid "No datasets found" @@ -3921,6 +3933,7 @@ msgid_plural "{number} groups found for \"{query}\"" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/snippets/search_result_text.html:22 msgid "No groups found for \"{query}\"" @@ -3932,6 +3945,7 @@ msgid_plural "{number} groups found" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/snippets/search_result_text.html:24 msgid "No groups found" @@ -3943,6 +3957,7 @@ msgid_plural "{number} organizations found for \"{query}\"" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/snippets/search_result_text.html:28 msgid "No organizations found for \"{query}\"" @@ -3954,6 +3969,7 @@ msgid_plural "{number} organizations found" msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgstr[3] "" #: ckan/templates/snippets/search_result_text.html:30 msgid "No organizations found" diff --git a/ckan/i18n/pt_BR/LC_MESSAGES/ckan.po b/ckan/i18n/pt_BR/LC_MESSAGES/ckan.po index fcdcdcd715c..ec1d168d8f5 100644 --- a/ckan/i18n/pt_BR/LC_MESSAGES/ckan.po +++ b/ckan/i18n/pt_BR/LC_MESSAGES/ckan.po @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-16 13:37+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Augusto Herrmann \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/okfn/ckan/language/pt_BR/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/pt_PT/LC_MESSAGES/ckan.po b/ckan/i18n/pt_PT/LC_MESSAGES/ckan.po index 00058944308..252ddd223a6 100644 --- a/ckan/i18n/pt_PT/LC_MESSAGES/ckan.po +++ b/ckan/i18n/pt_PT/LC_MESSAGES/ckan.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-12-16 14:55+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Jorge Rocha \n" "Language-Team: Portuguese (Portugal) (http://www.transifex.com/okfn/ckan/language/pt_PT/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/ro/LC_MESSAGES/ckan.po b/ckan/i18n/ro/LC_MESSAGES/ckan.po index 6253ffd8bbc..ea0a955c5eb 100644 --- a/ckan/i18n/ro/LC_MESSAGES/ckan.po +++ b/ckan/i18n/ro/LC_MESSAGES/ckan.po @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:21+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Romanian (http://www.transifex.com/okfn/ckan/language/ro/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/ru/LC_MESSAGES/ckan.po b/ckan/i18n/ru/LC_MESSAGES/ckan.po index 4777f51e8f5..cce2c39816f 100644 --- a/ckan/i18n/ru/LC_MESSAGES/ckan.po +++ b/ckan/i18n/ru/LC_MESSAGES/ckan.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-09-28 19:38+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Илья i <777_2005.87@mail.ru>\n" "Language-Team: Russian (http://www.transifex.com/okfn/ckan/language/ru/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/sk/LC_MESSAGES/ckan.po b/ckan/i18n/sk/LC_MESSAGES/ckan.po index 632c8bb605f..b1032408378 100644 --- a/ckan/i18n/sk/LC_MESSAGES/ckan.po +++ b/ckan/i18n/sk/LC_MESSAGES/ckan.po @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:24+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Slovak (http://www.transifex.com/okfn/ckan/language/sk/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/sl/LC_MESSAGES/ckan.po b/ckan/i18n/sl/LC_MESSAGES/ckan.po index 89339537383..a0af9f9d8d7 100644 --- a/ckan/i18n/sl/LC_MESSAGES/ckan.po +++ b/ckan/i18n/sl/LC_MESSAGES/ckan.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:24+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Slovenian (http://www.transifex.com/okfn/ckan/language/sl/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/sq/LC_MESSAGES/ckan.po b/ckan/i18n/sq/LC_MESSAGES/ckan.po index 22fac5ec66f..8e26d5f0559 100644 --- a/ckan/i18n/sq/LC_MESSAGES/ckan.po +++ b/ckan/i18n/sq/LC_MESSAGES/ckan.po @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-04-26 20:25+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Georges \n" "Language-Team: Albanian (http://www.transifex.com/okfn/ckan/language/sq/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/sr/LC_MESSAGES/ckan.po b/ckan/i18n/sr/LC_MESSAGES/ckan.po index 7c6629ec9a1..7db4dcdae4b 100644 --- a/ckan/i18n/sr/LC_MESSAGES/ckan.po +++ b/ckan/i18n/sr/LC_MESSAGES/ckan.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:22+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Serbian (http://www.transifex.com/okfn/ckan/language/sr/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po b/ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po index c9194620db5..3bc726d67a4 100644 --- a/ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po +++ b/ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:21+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Serbian (Latin) (http://www.transifex.com/okfn/ckan/language/sr@latin/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/sv/LC_MESSAGES/ckan.po b/ckan/i18n/sv/LC_MESSAGES/ckan.po index cfa7cd1d05a..0f7e11e4a18 100644 --- a/ckan/i18n/sv/LC_MESSAGES/ckan.po +++ b/ckan/i18n/sv/LC_MESSAGES/ckan.po @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:24+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Swedish (http://www.transifex.com/okfn/ckan/language/sv/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/th/LC_MESSAGES/ckan.po b/ckan/i18n/th/LC_MESSAGES/ckan.po index 4978780002e..49a9e157eaf 100644 --- a/ckan/i18n/th/LC_MESSAGES/ckan.po +++ b/ckan/i18n/th/LC_MESSAGES/ckan.po @@ -17,7 +17,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:23+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Thai (http://www.transifex.com/okfn/ckan/language/th/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/tr/LC_MESSAGES/ckan.po b/ckan/i18n/tr/LC_MESSAGES/ckan.po index 661d7135357..f3c153e787b 100644 --- a/ckan/i18n/tr/LC_MESSAGES/ckan.po +++ b/ckan/i18n/tr/LC_MESSAGES/ckan.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:18+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Turkish (http://www.transifex.com/okfn/ckan/language/tr/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/uk_UA/LC_MESSAGES/ckan.po b/ckan/i18n/uk_UA/LC_MESSAGES/ckan.po index eba95d98a6e..0673d5d51ac 100644 --- a/ckan/i18n/uk_UA/LC_MESSAGES/ckan.po +++ b/ckan/i18n/uk_UA/LC_MESSAGES/ckan.po @@ -6,7 +6,7 @@ # andy_pit , 2013 # dread , 2015 # Gromislav , 2013 -# vanuan , 2015 +# Vanya Yani , 2015 # Zoriana Zaiats, 2015 # Zoriana Zaiats, 2015 msgid "" @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-01-03 01:34+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Zoriana Zaiats\n" "Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/okfn/ckan/language/uk_UA/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/vi/LC_MESSAGES/ckan.po b/ckan/i18n/vi/LC_MESSAGES/ckan.po index 9d3c45d97af..ed97f26fbfd 100644 --- a/ckan/i18n/vi/LC_MESSAGES/ckan.po +++ b/ckan/i18n/vi/LC_MESSAGES/ckan.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2015-11-26 14:11+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: dread \n" "Language-Team: Vietnamese (http://www.transifex.com/okfn/ckan/language/vi/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/zh_CN/LC_MESSAGES/ckan.po b/ckan/i18n/zh_CN/LC_MESSAGES/ckan.po index acd7e7fbbec..e2320c801c1 100644 --- a/ckan/i18n/zh_CN/LC_MESSAGES/ckan.po +++ b/ckan/i18n/zh_CN/LC_MESSAGES/ckan.po @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-06-06 12:53+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Knut Hühne \n" "Language-Team: Chinese (China) (http://www.transifex.com/okfn/ckan/language/zh_CN/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/i18n/zh_TW/LC_MESSAGES/ckan.po b/ckan/i18n/zh_TW/LC_MESSAGES/ckan.po index 89d1bdcc1be..6873e11a476 100644 --- a/ckan/i18n/zh_TW/LC_MESSAGES/ckan.po +++ b/ckan/i18n/zh_TW/LC_MESSAGES/ckan.po @@ -17,7 +17,7 @@ msgstr "" "Project-Id-Version: CKAN\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-11-26 13:42+0000\n" -"PO-Revision-Date: 2016-07-06 05:14+0000\n" +"PO-Revision-Date: 2017-07-26 08:22+0000\n" "Last-Translator: Xaver Y.R. Chen \n" "Language-Team: Chinese (Taiwan) (http://www.transifex.com/okfn/ckan/language/zh_TW/)\n" "MIME-Version: 1.0\n" diff --git a/ckan/lib/helpers.py b/ckan/lib/helpers.py index cd48dc2465a..cfe64721428 100644 --- a/ckan/lib/helpers.py +++ b/ckan/lib/helpers.py @@ -19,8 +19,7 @@ from urllib import urlencode from paste.deploy.converters import asbool -from webhelpers.html import escape, HTML, literal, url_escape -from webhelpers.html.tools import mail_to +from webhelpers.html import HTML, literal, url_escape from webhelpers.html.tags import * from webhelpers import paginate from webhelpers.text import truncate @@ -47,6 +46,7 @@ from ckan.common import ( _, ungettext, g, c, request, session, json, OrderedDict ) +from markupsafe import Markup, escape MARKDOWN_TAGS = set([ @@ -347,6 +347,11 @@ def full_current_url(): return (url_for(request.environ['CKAN_CURRENT_URL'], qualified=True)) +def current_url(): + ''' Returns current url unquoted''' + return urllib.unquote(request.environ['CKAN_CURRENT_URL']) + + def lang(): ''' Return the language code for the current locale eg `en` ''' return request.environ.get('CKAN_LANG') @@ -1037,6 +1042,24 @@ def render_datetime(datetime_, date_format=None, with_hours=False): # if date_format was supplied we use it if date_format: + + # See http://bugs.python.org/issue1777412 + if datetime_.year < 1900: + year = str(datetime_.year) + + date_format = re.sub('(?{year}'.format(year=year[-2:]), + date_format) + date_format = re.sub('(?{year}'.format(year=year), + date_format) + + datetime_ = datetime.datetime(2016, datetime_.month, datetime_.day, + datetime_.hour, datetime_.minute, + datetime_.second) + + return datetime_.strftime(date_format) + return datetime_.strftime(date_format) # the localised date return formatters.localised_nice_date(datetime_, show_date=True, @@ -2134,6 +2157,13 @@ def license_options(existing_license_id=None): for license_id in license_ids] +def mail_to(email_address, name): + email = escape(email_address) + author = escape(name) + html = Markup(u'{1}'.format(email, author)) + return html + + # these are the functions that will end up in `h` template helpers __allowed_functions__ = [ # functions defined in ckan.lib.helpers @@ -2195,6 +2225,7 @@ def license_options(existing_license_id=None): 'debug_inspect', 'dict_list_reduce', 'full_current_url', + 'current_url', 'popular', 'debug_full_info_as_list', 'get_facet_title', @@ -2253,4 +2284,5 @@ def license_options(existing_license_id=None): 'check_config_permission', 'view_resource_url', 'license_options', + 'clean_html', ] diff --git a/ckan/logic/action/create.py b/ckan/logic/action/create.py index 6ef480331be..bed7f2462c8 100644 --- a/ckan/logic/action/create.py +++ b/ckan/logic/action/create.py @@ -306,8 +306,10 @@ def resource_create(context, data_dict): _get_action('package_update')(context, pkg_dict) context.pop('defer_commit') except ValidationError, e: - errors = e.error_dict['resources'][-1] - raise ValidationError(errors) + try: + raise ValidationError(e.error_dict['resources'][-1]) + except (KeyError, IndexError): + raise ValidationError(e.error_dict) ## Get out resource_id resource from model as it will not appear in ## package_show until after commit diff --git a/ckan/logic/action/update.py b/ckan/logic/action/update.py index 1ca9b9caa46..8bc3580e828 100644 --- a/ckan/logic/action/update.py +++ b/ckan/logic/action/update.py @@ -127,6 +127,7 @@ def resource_update(context, data_dict): resource = model.Resource.get(id) context["resource"] = resource + old_resource_format = resource.format if not resource: log.error('Could not find resource ' + id) @@ -164,14 +165,23 @@ def resource_update(context, data_dict): updated_pkg_dict = _get_action('package_update')(context, pkg_dict) context.pop('defer_commit') except ValidationError, e: - errors = e.error_dict['resources'][n] - raise ValidationError(errors) + try: + raise ValidationError(e.error_dict['resources'][-1]) + except (KeyError, IndexError): + raise ValidationError(e.error_dict) upload.upload(id, uploader.get_max_resource_size()) model.repo.commit() resource = _get_action('resource_show')(context, {'id': id}) + if old_resource_format != resource['format']: + _get_action('resource_create_default_resource_views')( + {'model': context['model'], 'user': context['user'], + 'ignore_auth': True}, + {'package': updated_pkg_dict, + 'resource': resource}) + for plugin in plugins.PluginImplementations(plugins.IResourceController): plugin.after_update(context, resource) diff --git a/ckan/logic/auth/create.py b/ckan/logic/auth/create.py index 0a89ae3749d..0457486c75b 100644 --- a/ckan/logic/auth/create.py +++ b/ckan/logic/auth/create.py @@ -211,7 +211,7 @@ def _check_group_auth(context, data_dict): groups = groups - set(pkg_groups) for group in groups: - if not authz.has_user_permission_for_group_or_org(group.id, user, 'update'): + if not authz.has_user_permission_for_group_or_org(group.id, user, 'manage_group'): return False return True diff --git a/ckan/logic/auth/update.py b/ckan/logic/auth/update.py index a5f4a0e24f1..8ee8dab0857 100644 --- a/ckan/logic/auth/update.py +++ b/ckan/logic/auth/update.py @@ -173,14 +173,15 @@ def group_edit_permissions(context, data_dict): user = context['user'] group = logic_auth.get_group_object(context, data_dict) - authorized = authz.has_user_permission_for_group_or_org(group.id, - user, - 'update') + authorized = authz.has_user_permission_for_group_or_org( + group.id, user, 'update') if not authorized: - return {'success': False, - 'msg': _('User %s not authorized to edit permissions of group %s') % - (str(user), group.id)} + return { + 'success': False, + 'msg': _('User %s not authorized to' + ' edit permissions of group %s') % + (str(user), group.id)} else: return {'success': True} diff --git a/ckan/model/package.py b/ckan/model/package.py index 9bd7d695c6e..35873401b04 100644 --- a/ckan/model/package.py +++ b/ckan/model/package.py @@ -227,16 +227,18 @@ def add_relationship(self, type_, related_package, comment=u''): if type_ in package_relationship.PackageRelationship.get_forward_types(): subject = self object_ = related_package + direction = "forward" elif type_ in package_relationship.PackageRelationship.get_reverse_types(): type_ = package_relationship.PackageRelationship.reverse_to_forward_type(type_) assert type_ subject = related_package object_ = self + direction = "reverse" else: raise KeyError, 'Package relationship type: %r' % type_ rels = self.get_relationships(with_package=related_package, - type=type_, active=False, direction="forward") + type=type_, active=False, direction=direction) if rels: rel = rels[0] if comment: diff --git a/ckan/model/user.py b/ckan/model/user.py index 2d2a37f4348..c75e2d6cd93 100644 --- a/ckan/model/user.py +++ b/ckan/model/user.py @@ -53,13 +53,8 @@ def by_email(cls, email): @classmethod def get(cls, user_reference): - # double slashes in an openid often get turned into single slashes - # by browsers, so correct that for the openid lookup - corrected_openid_user_ref = cls.DOUBLE_SLASH.sub('://\\1', - user_reference) query = meta.Session.query(cls).autoflush(False) query = query.filter(or_(cls.name == user_reference, - cls.openid == corrected_openid_user_ref, cls.id == user_reference)) return query.first() diff --git a/ckan/public/base/i18n/pl.js b/ckan/public/base/i18n/pl.js index aaecd725840..7e55ab7af7d 100644 --- a/ckan/public/base/i18n/pl.js +++ b/ckan/public/base/i18n/pl.js @@ -2,7 +2,7 @@ "": { "domain": "ckan", "lang": "pl", - "plural-forms": "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" + "plural-forms": "nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);" }, "Cancel": [ null, diff --git a/ckan/public/base/i18n/pl.min.js b/ckan/public/base/i18n/pl.min.js index 55d0bd69509..7916ebaee54 100644 --- a/ckan/public/base/i18n/pl.min.js +++ b/ckan/public/base/i18n/pl.min.js @@ -1 +1 @@ -{"":{"domain":"ckan","lang":"pl","plural-forms":"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"Cancel":[null,"Anuluj"],"Edit":[null,"Edycja"],"Loading...":[null,"Ładowanie..."],"URL":[null,"URL"],"Upload":[null,"Prześlij plik"],"Upload a file":[null,"Prześlij plik"]} \ No newline at end of file +{"":{"domain":"ckan","lang":"pl","plural-forms":"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"},"Cancel":[null,"Anuluj"],"Edit":[null,"Edycja"],"Loading...":[null,"Ładowanie..."],"URL":[null,"URL"],"Upload":[null,"Prześlij plik"],"Upload a file":[null,"Prześlij plik"]} \ No newline at end of file diff --git a/ckan/public/base/javascript/modules/autocomplete.js b/ckan/public/base/javascript/modules/autocomplete.js index ed7c676051f..a7b292d3c07 100644 --- a/ckan/public/base/javascript/modules/autocomplete.js +++ b/ckan/public/base/javascript/modules/autocomplete.js @@ -24,7 +24,7 @@ this.ckan.module('autocomplete', function (jQuery, _) { label: false, items: 10, source: null, - interval: 1000, + interval: 300, dropdownClass: '', containerClass: '', i18n: { diff --git a/ckan/public/base/javascript/modules/autocomplete.min.js b/ckan/public/base/javascript/modules/autocomplete.min.js index b6321b6976f..ba3d7dbc93d 100644 --- a/ckan/public/base/javascript/modules/autocomplete.min.js +++ b/ckan/public/base/javascript/modules/autocomplete.min.js @@ -1,4 +1,4 @@ -this.ckan.module('autocomplete',function(jQuery,_){return{options:{tags:false,key:false,label:false,items:10,source:null,interval:1000,dropdownClass:'',containerClass:'',i18n:{noMatches:_('No matches found'),emptySearch:_('Start typing…'),inputTooShort:function(data){return _('Input is too short, must be at least one character').ifPlural(data.min,'Input is too short, must be at least %(min)d characters');}}},initialize:function(){jQuery.proxyAll(this,/_on/,/format/);this.setupAutoComplete();},setupAutoComplete:function(){var settings={width:'resolve',formatResult:this.formatResult,formatNoMatches:this.formatNoMatches,formatInputTooShort:this.formatInputTooShort,dropdownCssClass:this.options.dropdownClass,containerCssClass:this.options.containerClass};if(!this.el.is('select')){if(this.options.tags){settings.tags=this._onQuery;}else{settings.query=this._onQuery;settings.createSearchChoice=this.formatTerm;} +this.ckan.module('autocomplete',function(jQuery,_){return{options:{tags:false,key:false,label:false,items:10,source:null,interval:300,dropdownClass:'',containerClass:'',i18n:{noMatches:_('No matches found'),emptySearch:_('Start typing…'),inputTooShort:function(data){return _('Input is too short, must be at least one character').ifPlural(data.min,'Input is too short, must be at least %(min)d characters');}}},initialize:function(){jQuery.proxyAll(this,/_on/,/format/);this.setupAutoComplete();},setupAutoComplete:function(){var settings={width:'resolve',formatResult:this.formatResult,formatNoMatches:this.formatNoMatches,formatInputTooShort:this.formatInputTooShort,dropdownCssClass:this.options.dropdownClass,containerCssClass:this.options.containerClass};if(!this.el.is('select')){if(this.options.tags){settings.tags=this._onQuery;}else{settings.query=this._onQuery;settings.createSearchChoice=this.formatTerm;} settings.initSelection=this.formatInitialValue;} else{if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1);if(ieversion<=7){return}}} var select2=this.el.select2(settings).data('select2');if(this.options.tags&&select2&&select2.search){select2.search.on('keydown',this._onKeydown);} diff --git a/ckan/public/base/javascript/modules/slug-preview.js b/ckan/public/base/javascript/modules/slug-preview.js index 63fb08d94e7..c82688cfb20 100644 --- a/ckan/public/base/javascript/modules/slug-preview.js +++ b/ckan/public/base/javascript/modules/slug-preview.js @@ -18,7 +18,7 @@ this.ckan.module('slug-preview-target', { // Watch for updates to the target field and update the hidden slug field // triggering the "change" event manually. - el.on('keyup.slug-preview', function (event) { + el.on('keyup.slug-preview input.slug-preview', function (event) { sandbox.publish('slug-target-changed', this.value); //slug.val(this.value).trigger('change'); }); diff --git a/ckan/public/base/javascript/modules/slug-preview.min.js b/ckan/public/base/javascript/modules/slug-preview.min.js index c9bb6f77f47..f7bb91ccd3a 100644 --- a/ckan/public/base/javascript/modules/slug-preview.min.js +++ b/ckan/public/base/javascript/modules/slug-preview.min.js @@ -1,3 +1,3 @@ -this.ckan.module('slug-preview-target',{initialize:function(){var sandbox=this.sandbox;var options=this.options;var el=this.el;sandbox.subscribe('slug-preview-created',function(preview){el.after(preview);});if(el.val()==''){sandbox.subscribe('slug-preview-modified',function(){el.off('.slug-preview');});el.on('keyup.slug-preview',function(event){sandbox.publish('slug-target-changed',this.value);});}}});this.ckan.module('slug-preview-slug',function(jQuery,_){return{options:{prefix:'',placeholder:'',i18n:{url:_('URL'),edit:_('Edit')}},initialize:function(){var sandbox=this.sandbox;var options=this.options;var el=this.el;var _=sandbox.translate;var slug=el.slug();var parent=slug.parents('.control-group');var preview;if(!(parent.length)){return;} +this.ckan.module('slug-preview-target',{initialize:function(){var sandbox=this.sandbox;var options=this.options;var el=this.el;sandbox.subscribe('slug-preview-created',function(preview){el.after(preview);});if(el.val()==''){sandbox.subscribe('slug-preview-modified',function(){el.off('.slug-preview');});el.on('keyup.slug-preview input.slug-preview',function(event){sandbox.publish('slug-target-changed',this.value);});}}});this.ckan.module('slug-preview-slug',function(jQuery,_){return{options:{prefix:'',placeholder:'',i18n:{url:_('URL'),edit:_('Edit')}},initialize:function(){var sandbox=this.sandbox;var options=this.options;var el=this.el;var _=sandbox.translate;var slug=el.slug();var parent=slug.parents('.control-group');var preview;if(!(parent.length)){return;} if(!parent.hasClass('error')){preview=parent.slugPreview({prefix:options.prefix,placeholder:options.placeholder,i18n:{'URL':this.i18n('url'),'Edit':this.i18n('edit')}});slug.keypress(function(){if(event.charCode){sandbox.publish('slug-preview-modified',preview[0]);}});sandbox.publish('slug-preview-created',preview[0]);if(jQuery('html').hasClass('ie7')){jQuery('.btn').on('click',preview,function(){jQuery('.controls').ie7redraw();});preview.hide();setTimeout(function(){preview.show();jQuery('.controls').ie7redraw();},10);}} sandbox.subscribe('slug-target-changed',function(value){slug.val(value).trigger('change');});}};}); \ No newline at end of file diff --git a/ckan/public/base/javascript/plugins/jquery.url-helpers.js b/ckan/public/base/javascript/plugins/jquery.url-helpers.js index 6ff9e6e4c7c..f92d62923da 100644 --- a/ckan/public/base/javascript/plugins/jquery.url-helpers.js +++ b/ckan/public/base/javascript/plugins/jquery.url-helpers.js @@ -119,14 +119,14 @@ '4f0 4f1 4f2 4f3 4f4 4f5 4f6 4f7 4f8 4f9 4fa 4fb 4fc 4fd 4fe 4ff ' + '50a 50b 50c 50d 50e 50f 51a 51b 51c 51d 53a 53b 53c 53d 53e 53f ' + '54a 54b 54c 54d 54e 54f 56a 56b 56c 56d 56e 56f 57a 57b 57c 57d ' + - '57e 57f').split(' '); + '57e 57f 5f').split(' '); var replacement = ('- 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I P Q R S T ' + 'U V W X Y a b c d e f g h i p q r s t u v w x y A a A a A a C c C c ' + 'D d E e E e E e E e G g G g H h H h I i I i IJ ij J j K k k L l L l ' + 'N n N n N n n O o OE oe R r R r R r S s T t T t T t U u U u U u W w ' + - 'Y y Y Z b B b b b b C C c D E F f G Y h i I K k A a A a E e E e I i ' + - 'R r R r U u U u S s n d 8 8 Z z A a E e O o Y y l n t j db qp < ? ? ' + + 'Y y Y Z b B b b b b C C c D E F f G Y h i I K k A a A a E e E e I i ' + + 'R r R r U u U u S s n d 8 8 Z z A a E e O o Y y l n t j db qp < ? ? ' + 'B U A E e J j a a a b c e d d e e g g g Y x u h h i i w m n n N o oe ' + 'm o r R R S f f f f t t u Z Z 3 3 ? ? 5 C O B a e i o u c d A ' + 'E H i A B r A E Z H O I E E T r E S I I J jb A B B r D E X 3 N N P ' + @@ -154,7 +154,7 @@ 'h H h E e E e I X x K k jt jt H h H h H h M m l A a A a AE ae E e ' + 'e e E e X X 3 3 3 3 N n N n O o O o O o E e Y y Y y Y y H h R r bI ' + 'bi F f X x X x H h G g T t Q q W w d r L Iu O y m o N U Y S d h l ' + - 'lu d y w 2 n u y un').split(' '); + 'lu d y w 2 n u y un _').split(' '); // Map the Unicode characters to their counterparts in an object. var map = {}; diff --git a/ckan/public/base/javascript/plugins/jquery.url-helpers.min.js b/ckan/public/base/javascript/plugins/jquery.url-helpers.min.js index bb194ff1d71..904a62a40ef 100644 --- a/ckan/public/base/javascript/plugins/jquery.url-helpers.min.js +++ b/ckan/public/base/javascript/plugins/jquery.url-helpers.min.js @@ -1,3 +1,3 @@ (function($,window){$.url={escape:function(string){return window.encodeURIComponent(string||'').replace(/%20/g,'+');},slugify:function(string,trim){var str='';var index=0;var length=string.length;var map=this.map;for(;index=?#/');assert.equal(target,'%26%3C%3E%3D%3F%23%2F');});it('should convert spaces to + rather than %20',function(){var target=jQuery.url.escape(' ');assert.equal(target,'+');});});describe('.slugify()',function(){it('should replace spaces with hyphens',function(){var target=jQuery.url.slugify('apples and pears');assert.equal(target,'apples-and-pears');});it('should lowecase all characters',function(){var target=jQuery.url.slugify('APPLES AND PEARS');assert.equal(target,'apples-and-pears');});it('should convert unknown characters to hyphens',function(){var target=jQuery.url.slugify('apples & pears');assert.equal(target,'apples-pears');});it('should nomalise hyphens',function(){var target=jQuery.url.slugify('apples---pears');assert.equal(target,'apples-pears','remove duplicate hyphens');target=jQuery.url.slugify('--apples-pears');assert.equal(target,'apples-pears','strip preceding hyphens');target=jQuery.url.slugify('apples-pears--');assert.equal(target,'apples-pears','strip trailing hyphens');});it('should try and asciify unicode characters',function(){var target=jQuery.url.slugify('éåøç');assert.equal(target,'eaoc');});});}); \ No newline at end of file +describe('jQuery.url',function(){describe('.escape()',function(){it('should escape special characters',function(){var target=jQuery.url.escape('&<>=?#/');assert.equal(target,'%26%3C%3E%3D%3F%23%2F');});it('should convert spaces to + rather than %20',function(){var target=jQuery.url.escape(' ');assert.equal(target,'+');});});describe('.slugify()',function(){it('should replace spaces with hyphens',function(){var target=jQuery.url.slugify('apples and pears');assert.equal(target,'apples-and-pears');});it('should lowecase all characters',function(){var target=jQuery.url.slugify('APPLES AND PEARS');assert.equal(target,'apples-and-pears');});it('should convert unknown characters to hyphens',function(){var target=jQuery.url.slugify('apples & pears');assert.equal(target,'apples-pears');});it('should nomalise hyphens',function(){var target=jQuery.url.slugify('apples---pears');assert.equal(target,'apples-pears','remove duplicate hyphens');target=jQuery.url.slugify('--apples-pears');assert.equal(target,'apples-pears','strip preceding hyphens');target=jQuery.url.slugify('apples-pears--');assert.equal(target,'apples-pears','strip trailing hyphens');});it('should try and asciify unicode characters',function(){var target=jQuery.url.slugify('éåøç');assert.equal(target,'eaoc');});it('should allow underscore characters',function(){var target=jQuery.url.slugify('apples_pears');assert.equal(target,'apples_pears');});});}); \ No newline at end of file diff --git a/ckan/templates/group/read.html b/ckan/templates/group/read.html index 865d13839bc..5abca7e114f 100644 --- a/ckan/templates/group/read.html +++ b/ckan/templates/group/read.html @@ -32,7 +32,12 @@ {% block secondary_content %} {{ super() }} - {% for facet in c.facet_titles %} - {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':c.group_dict.id}) }} - {% endfor %} +
+
+ {% for facet in c.facet_titles %} + {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':c.group_dict.id}) }} + {% endfor %} +
+ close +
{% endblock %} diff --git a/ckan/templates/group/snippets/group_item.html b/ckan/templates/group/snippets/group_item.html index ae69eb707c7..407f631825a 100644 --- a/ckan/templates/group/snippets/group_item.html +++ b/ckan/templates/group/snippets/group_item.html @@ -28,9 +28,9 @@

{{ group.display_name }}

{% endif %} {% endblock %} {% block datasets %} - {% if group.packages %} - {{ ungettext('{num} Dataset', '{num} Datasets', group.packages).format(num=group.packages) }} - {% elif group.packages == 0 %} + {% if group.package_count %} + {{ ungettext('{num} Dataset', '{num} Datasets', group.package_count).format(num=group.package_count) }} + {% elif group.package_count == 0 %} {{ _('0 Datasets') }} {% endif %} {% endblock %} diff --git a/ckan/templates/macros/form.html b/ckan/templates/macros/form.html index 934e1c9ba93..f434a43c1a0 100644 --- a/ckan/templates/macros/form.html +++ b/ckan/templates/macros/form.html @@ -118,7 +118,7 @@ {% macro markdown(name, id='', label='', value='', placeholder='', error="", classes=[], attrs={}, is_required=false) %} {% set classes = (classes|list) %} {% do classes.append('control-full') %} - {% set markdown_tooltip = "

__Bold text__ or _italic text_

# title
## secondary title
### etc

* list
* of
* items

http://auto.link.ed/

Full markdown syntax

Please note: HTML tags are stripped out for security reasons

" %} + {% set markdown_tooltip = "

__Bold text__ or _italic text_

# title
## secondary title
### etc

* list
* of
* items

http://auto.link.ed/

Full markdown syntax

Please note: HTML tags are stripped out for security reasons

" %} {%- set extra_html = caller() if caller -%} {% call input_block(id or name, label or name, error, classes, control_classes=["editor"], extra_html=extra_html, is_required=is_required) %} @@ -406,14 +406,14 @@ #} {% macro image_upload(data, errors, field_url='image_url', field_upload='image_upload', field_clear='clear_upload', is_url=false, is_upload=false, is_upload_enabled=false, placeholder=false, - url_label='', upload_label='') %} + url_label='', upload_label='', field_name='image_url') %} {% set placeholder = placeholder if placeholder else _('http://example.com/my-image.jpg') %} {% set url_label = url_label or _('Image URL') %} {% set upload_label = upload_label or _('Image') %} {% if is_upload_enabled %}
+ data-module-field_url="{{ field_url }}" data-module-field_upload="{{ field_upload }}" data-module-field_clear="{{ field_clear }}" data-module-upload_label="{{ upload_label }}" data-module-field_name="{{ field_name }}"> {% endif %} {{ input(field_url, label=url_label, id='field-image-url', placeholder=placeholder, value=data.get(field_url), error=errors.get(field_url), classes=['control-full']) }} diff --git a/ckan/templates/organization/read.html b/ckan/templates/organization/read.html index a0c08735a23..ecd1c4341a1 100644 --- a/ckan/templates/organization/read.html +++ b/ckan/templates/organization/read.html @@ -35,7 +35,12 @@ {% endblock %} {% block organization_facets %} - {% for facet in c.facet_titles %} - {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':c.group_dict.id}) }} - {% endfor %} +
+
+ {% for facet in c.facet_titles %} + {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':c.group_dict.id}) }} + {% endfor %} +
+ close +
{% endblock %} diff --git a/ckan/templates/package/resource_data.html b/ckan/templates/package/resource_data.html index c79d72a2947..f6ef536846c 100644 --- a/ckan/templates/package/resource_data.html +++ b/ckan/templates/package/resource_data.html @@ -71,7 +71,7 @@

{{ _('Upload Log') }}

{{ item.message | urlize }}
{{ h.time_ago_from_timestamp(item.timestamp) }} - {{ _('Details') }} + {{ _('Details') }}

diff --git a/ckan/templates/snippets/language_selector.html b/ckan/templates/snippets/language_selector.html index dfe62c1686a..fa48b643ce2 100644 --- a/ckan/templates/snippets/language_selector.html +++ b/ckan/templates/snippets/language_selector.html @@ -1,10 +1,9 @@ -{% set current_url = request.environ.CKAN_CURRENT_URL %} {% set current_lang = request.environ.CKAN_LANG %}