Access resource data via a web API with powerful query
support. Further information in the main
+ href="http://docs.ckan.org/en/latest/using-data-api.html" target="_blank">main
CKAN Data API and DataStore documentation.
diff --git a/ckan/templates/js_strings.html b/ckan/templates/js_strings.html
index 76a0d7e580f..a22ea2fed0b 100644
--- a/ckan/templates/js_strings.html
+++ b/ckan/templates/js_strings.html
@@ -13,61 +13,62 @@
/*
* Used in application.js.
*/
- CKAN.Strings.checking = "${_('Checking...')}";
- CKAN.Strings.urlIsTooShort = "${_('Type at least two characters...')}";
- CKAN.Strings.urlIsUnchanged = "${_('This is the current URL.')}";
- CKAN.Strings.urlIsAvailable = "${_('This URL is available!')}";
- CKAN.Strings.urlIsNotAvailable = "${_('This URL is already used, please use a different one.')}";
- CKAN.Strings.failedToSave = "${_('Failed to save, possibly due to invalid data ')}";
- CKAN.Strings.addDataset = "${_('Add Dataset')}";
- CKAN.Strings.addGroup = "${_('Add Group')}";
- CKAN.Strings.youHaveUnsavedChanges = "${_("You have unsaved changes. Make sure to click 'Save Changes' below before leaving this page.")}";
- CKAN.Strings.loading = "${_('Loading...')}";
- CKAN.Strings.noNameBrackets = "${_('(no name)')}";
- CKAN.Strings.deleteThisResourceQuestion = "${_('Delete the resource \'%name%\'?')}";
- CKAN.Strings.previewNotAvailableForDataType = "${_('Preview not available for data type: ')}";
- CKAN.Strings.failedToGetCredentialsForUpload = "${_('Failed to get credentials for storage upload. Upload cannot proceed')}";
- CKAN.Strings.checkingUploadPermissions = "${_('Checking upload permissions ...')}";
- CKAN.Strings.uploadingFile = "${_('Uploading file ...')}";
- CKAN.Strings.dataFile = "${_('Data File')}";
- CKAN.Strings.api = "${_('API')}";
- CKAN.Strings.visualization = "${_('Visualization')}";
- CKAN.Strings.image = "${_('Image')}";
- CKAN.Strings.metadata = "${_('Metadata')}";
- CKAN.Strings.documentation = "${_('Documentation')}";
- CKAN.Strings.code = "${_('Code')}";
- CKAN.Strings.example = "${_('Example')}";
+ CKAN.Strings = ${
+ h.json.dumps(dict(
+ checking = _('Checking...'),
+ urlIsTooShort = _('Type at least two characters...'),
+ urlIsUnchanged = _('This is the current URL.'),
+ urlIsAvailable = _('This URL is available!'),
+ urlIsNotAvailable = _('This URL is already used, please use a different one.'),
+ failedToSave = _('Failed to save, possibly due to invalid data '),
+ addDataset = _('Add Dataset'),
+ addGroup = _('Add Group'),
+ youHaveUnsavedChanges = _("You have unsaved changes. Make sure to click 'Save Changes' below before leaving this page."),
+ loading = _('Loading...'),
+ noNameBrackets = _('(no name)'),
+ deleteThisResourceQuestion = _('Delete the resource \'%name%\'?'),
+ previewNotAvailableForDataType = _('Preview not available for data type: '),
+ failedToGetCredentialsForUpload = _('Failed to get credentials for storage upload. Upload cannot proceed'),
+ checkingUploadPermissions = _('Checking upload permissions ...'),
+ uploadingFile = _('Uploading file ...'),
+ dataFile = _('Data File'),
+ api = _('API'),
+ visualization = _('Visualization'),
+ image = _('Image'),
+ metadata = _('Metadata'),
+ documentation = _('Documentation'),
+ code = _('Code'),
+ example = _('Example'),
+
+ upload = _('Upload'),
+ cancel = _('Cancel'),
+ name = _('Name'),
+ description = _('Description'),
+ url = _('Url'),
+ format = _('Format'),
+ resourceType = _('Resource Type'),
+ datastoreEnabled = _('DataStore enabled'),
+ sizeBracketsBytes = _('Size (Bytes)'),
+ mimetype = _('Mimetype'),
+ created = _('Created'),
+ lastModified = _('Last Modified'),
+ mimetypeInner = _('Mimetype (Inner)'),
+ hash = _('Hash'),
+ id = _('ID'),
+ doneEditing = _('Done'),
+ resourceHasUnsavedChanges = _('This resource has unsaved changes.'),
+ edit = _('Edit'),
+ preview = _('Preview'),
+ resourceFormatPlaceholder = _('e.g. csv, html, xls, rdf, ...'),
+ unknown = _('Unknown'),
+ extraFields = _('Extra Fields'),
+ addExtraField = _('Add Extra Field'),
+ deleteResource = _('Delete Resource'),
+ youCanUseMarkdown = _('You can use %aMarkdown formatting%b here.'),
+ shouldADataStoreBeEnabled = _('Should a %aDataStore table and Data API%b be enabled for this resource?'),
+ datesAreInISO = _('Dates are in %aISO Format%b — eg. %c2012-12-25%d or %c2010-05-31T14:30%d.'),
+ dataFileUploaded = _('Data File (Uploaded)')
+ ), indent=4)}
- /*
- * Used in templates.js.
- */
- CKAN.Strings.upload = "${_('Upload')}";
- CKAN.Strings.cancel = "${_('Cancel')}";
- CKAN.Strings.name = "${_('Name')}";
- CKAN.Strings.description = "${_('Description')}";
- CKAN.Strings.url = "${_('Url')}";
- CKAN.Strings.format = "${_('Format')}";
- CKAN.Strings.resourceType = "${_('Resource Type')}";
- CKAN.Strings.datastoreEnabled = "${_('DataStore enabled')}";
- CKAN.Strings.sizeBracketsBytes = "${_('Size (Bytes)')}";
- CKAN.Strings.mimetype = "${_('Mimetype')}";
- CKAN.Strings.created = "${_('Created')}";
- CKAN.Strings.lastModified = "${_('Last Modified')}";
- CKAN.Strings.mimetypeInner = "${_('Mimetype (Inner)')}";
- CKAN.Strings.hash = "${_('Hash')}";
- CKAN.Strings.id = "${_('ID')}";
- CKAN.Strings.doneEditing = "${_('Done')}";
- CKAN.Strings.resourceHasUnsavedChanges = "${_('This resource has unsaved changes.')}";
- CKAN.Strings.edit = "${_('Edit')}";
- CKAN.Strings.preview = "${_('Preview')}";
- CKAN.Strings.resourceFormatPlaceholder = "${_('e.g. csv, html, xls, rdf, ...')}";
- CKAN.Strings.unknown = "${_('Unknown')}";
- CKAN.Strings.extraFields = "${_('Extra Fields')}";
- CKAN.Strings.addExtraField = "${_('Add Extra Field')}";
- CKAN.Strings.deleteResource = "${_('Delete Resource')}";
- CKAN.Strings.youCanUseMarkdown = "${_('You can use %aMarkdown formatting%b here.')}";
- CKAN.Strings.shouldADataStoreBeEnabled = "${_('Should a %aDataStore table and Data API%b be enabled for this resource?')}";
- CKAN.Strings.datesAreInISO = "${_('Dates are in %aISO Format%b — eg. %c2012-12-25%d or %c2010-05-31T14:30%d.')}";
- CKAN.Strings.dataFileUploaded = "${_('Data File (Uploaded)')}";
diff --git a/ckanext/multilingual/plugin.py b/ckanext/multilingual/plugin.py
index a4696bd175b..c050f57e17d 100644
--- a/ckanext/multilingual/plugin.py
+++ b/ckanext/multilingual/plugin.py
@@ -75,7 +75,7 @@ def translate_data_dict(data_dict):
translated_flattened[key] = fallback_translations.get(
value, value)
- elif isinstance(value, int):
+ elif isinstance(value, (int, dict)):
translated_flattened[key] = value
else:
diff --git a/doc/solr-setup.rst b/doc/solr-setup.rst
index 3c158b27ce3..395da67e0a9 100644
--- a/doc/solr-setup.rst
+++ b/doc/solr-setup.rst
@@ -50,13 +50,12 @@ and the admin site::
http://localhost:8983/solr/admin
-.. note:: If you get the message `Could not start Jetty servlet engine because no Java Development Kit (JDK) was found.` then you will have to edit /etc/profile and add this line to the end such as this to the end (adjusting the path for your machine's jdk install):
+.. note:: If you get the message ``Could not start Jetty servlet engine because no Java Development Kit (JDK) was found.`` then you will have to edit the ``JAVA_HOME`` setting in ``/etc/default/jetty`` (adjusting the path for your machine's JDK install):
``JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/``
Now run::
- export JAVA_HOME
sudo service jetty start