[ckan-changes] [okfn/ckan] ee1c68: Fix some ckanext/multilingual issues
GitHub
noreply at github.com
Wed Apr 18 15:49:10 UTC 2012
Branch: refs/heads/feature-1821-multilingual-extension
Home: https://github.com/okfn/ckan
Commit: ee1c68cd5348dadd922f9c0b9bf6b5d578be1615
https://github.com/okfn/ckan/commit/ee1c68cd5348dadd922f9c0b9bf6b5d578be1615
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2012-04-18 (Wed, 18 Apr 2012)
Changed paths:
M ckan/templates/facets.html
M ckan/templates/group/read.html
M ckanext/multilingual/plugin.py
Log Message:
-----------
Fix some ckanext/multilingual issues
that were introduced when I merged (fast-forward) master into
feature-1821-multilingual-extension just now.
diff --git a/ckan/templates/facets.html b/ckan/templates/facets.html
index 2d89241..6a382de 100644
--- a/ckan/templates/facets.html
+++ b/ckan/templates/facets.html
@@ -30,7 +30,7 @@
how a facet-item's count is displayed.
-->
-<py:def function="facet_div(name, title, limit=5, label_function=lambda item: item.display_name, if_empty=None, count_label=lambda c: ' (%d)'%c)">
+<py:def function="facet_div(name, title, limit=10, label_function=lambda item: item.display_name, if_empty=None, count_label=lambda c: ' (%d)'%c)">
<div py:if="if_empty is not None or h.unselected_facet_items(name, limit)" class="facet-box">
<h2>${h.facet_title(title)}</h2>
<ul class="facet-options">
diff --git a/ckan/templates/group/read.html b/ckan/templates/group/read.html
index f08cf99..c2c9270 100644
--- a/ckan/templates/group/read.html
+++ b/ckan/templates/group/read.html
@@ -5,8 +5,8 @@
<xi:include href="../facets.html" />
- <py:def function="page_title">${c.group.display_name}</py:def>
- <py:def function="page_heading">${c.group.display_name}</py:def>
+ <py:def function="page_title">${c.group_dict.display_name}</py:def>
+ <py:def function="page_heading">${c.group_dict.display_name}</py:def>
<py:if test="c.group.image_url">
<py:def function="page_logo">${c.group.image_url}</py:def>
</py:if>
diff --git a/ckanext/multilingual/plugin.py b/ckanext/multilingual/plugin.py
index e8521bd..a4696bd 100644
--- a/ckanext/multilingual/plugin.py
+++ b/ckanext/multilingual/plugin.py
@@ -173,7 +173,7 @@ def before_search(self, search_params):
def after_search(self, search_results, search_params):
# Translate the unselected search facets.
- facets = search_results.get('new_facets')
+ facets = search_results.get('search_facets')
if not facets:
return search_results
@@ -255,7 +255,8 @@ class MultilingualGroup(SingletonPlugin):
implements(IGroupController, inherit=True)
def before_view(self, data_dict):
- return translate_data_dict(data_dict)
+ translated_data_dict = translate_data_dict(data_dict)
+ return translated_data_dict
class MultilingualTag(SingletonPlugin):
'''The MultilingualTag plugin translates tag names on tag read pages and
================================================================
More information about the ckan-changes
mailing list