summaryrefslogtreecommitdiff
path: root/chimere/rss
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2010-11-20 02:22:28 +0100
committerÉtienne Loks <etienne.loks@peacefrogs.net>2010-11-20 02:22:28 +0100
commit00697996e885044314cc297b72aaa86d69d2a219 (patch)
tree8134eb21d80a1ed92b021ca99a26fe19bf53ba49 /chimere/rss
parent18980694a24e3cc28e6e99e3582613c3cd623f40 (diff)
downloadChimère-00697996e885044314cc297b72aaa86d69d2a219.tar.bz2
Chimère-00697996e885044314cc297b72aaa86d69d2a219.zip
Better labels - french traduction (fixes #65)
Diffstat (limited to 'chimere/rss')
-rw-r--r--chimere/rss/feeds.py12
-rw-r--r--chimere/rss/templates/rss.html19
-rw-r--r--chimere/rss/views.py2
3 files changed, 19 insertions, 14 deletions
diff --git a/chimere/rss/feeds.py b/chimere/rss/feeds.py
index 870d00c..1bb1a76 100644
--- a/chimere/rss/feeds.py
+++ b/chimere/rss/feeds.py
@@ -19,6 +19,7 @@
# See the file COPYING for details.
+from django.utils.translation import ugettext as _
from django.contrib.syndication.feeds import Feed
from django.contrib.syndication.feeds import FeedDoesNotExist
from chimere.main.models import Category, SubCategory, Marker, Area
@@ -128,13 +129,13 @@ class LatestPOIs(BaseFeed):
description_template = "rss_descr.html"
def title(self):
- return u"%s - Last POIs" % settings.PROJECT_NAME
+ return settings.PROJECT_NAME + u" - " + _(u"Last points of interest")
def link(self):
return settings.BASE_URL + 'rss/categories/'
def description(self):
- return "Latest POIs from Chimere"
+ return _("Latest points of interest from ") + settings.PROJECT_NAME
def items(self):
q = Marker.objects.filter(status__exact='A',
@@ -179,7 +180,8 @@ class LatestPOIsByZone(BaseFeed):
return areaBox
def title(self, obj):
- return u"%s - Last POIs by area" % settings.PROJECT_NAME
+ return settings.PROJECT_NAME + u" - " +\
+ _(u"Last points of interest by area")
def link(self, obj):
"""
@@ -198,7 +200,6 @@ class LatestPOIsByZone(BaseFeed):
which is requested.
This returns a list of the 15 last markers/POIs ordering by date
"""
- print obj
q = Marker.objects.filter(point__contained=obj, status__exact='A',
available_date__isnull=False).order_by('-available_date')[:15]
return q
@@ -216,7 +217,8 @@ class LatestPOIsByZoneID(BaseFeed):
return Area.objects.get(id__exact=bits[0])
def title(self, obj):
- return u"%s - Last POIs of %s" % (settings.PROJECT_NAME, obj.name)
+ return settings.PROJECT_NAME + u" - " + \
+ _(u"Last points of interest") + u" - " + obj.name
def link(self, obj):
if not obj:
diff --git a/chimere/rss/templates/rss.html b/chimere/rss/templates/rss.html
index c28b3db..0c895ed 100644
--- a/chimere/rss/templates/rss.html
+++ b/chimere/rss/templates/rss.html
@@ -17,16 +17,17 @@
<label for="rss_category">{% trans "Type of RSS feed" %}</label>
<select name='rss_category' id='rss_category' onchange='document.forms["rss_form"].submit();'>
<option value=""> ---- </option>
- <option value="global">{% trans "All the new points of interest" %}</option>
- <option value="poi">{% trans "Category of point of interest" %}</option>
- <option value="area">{% trans "Area" %}</option>
+ <option value="global">{% trans "All new points of interest" %}</option>
+ <option value="poi">{% trans "New points of interest by category" %}</option>
+ <option value="area">{% trans "New points of interest by area" %}</option>
</select>
</div>
{% endif %}
{%ifequal category_rss_feed "category" %}
+<h3>{% trans "New points of interest by category" %}</h3>
<div class="fieldWrapper">
- <label for="id_subcategory">{% trans "Category of POI" %}</label>
+ <label for="id_subcategory">{% trans "Choose a category" %}</label>
<select name='subcategory' id='subcategory' onchange='document.forms["rss_form"].submit();'>
{% for cat_subcat in sub_categories %}
<option value ="cat_{{cat_subcat.0.id}}"> ---- {{cat_subcat.0.name}} ----
@@ -40,9 +41,10 @@
{% endifequal %}
{%ifequal category_rss_feed "area" %}
+<h3>{% trans "New points of interest by area" %}</h3>
{% if area_id %}
<div class="fieldWrapper">
- <label for="id_area">{% trans "Pre-defined areas:" %}</label>
+ <label for="id_area">{% trans "Choose a pre-defined areas" %}</label>
<select name='id_area' id='id_area' onchange='document.forms["rss_form"].submit();'>
<option value="" selected="selected"> ---- </option>
{% for areaID in area_id %}
@@ -55,12 +57,13 @@
<form method='post' action=''>
{% endif %}
+<div class='fieldWrapper'>
+<label>{% trans "Or select the area by zooming and panning this map" %}</label>
<div class="map">
-
-<label>{% trans "Or select the area by zooming an panning this map:" %}</label>
{{form.area}}
</div>
-<p><input type="submit" value="{% trans "Submit" %}" /></p>
+</div>
+<p><input type="submit" value="{% trans "Validate" %}" /></p>
{% endifequal %}
</form>
diff --git a/chimere/rss/views.py b/chimere/rss/views.py
index 5dd9797..04d69dc 100644
--- a/chimere/rss/views.py
+++ b/chimere/rss/views.py
@@ -70,7 +70,7 @@ def rss(request, area_name=''):
return render_to_response('rss.html', response_dct)
# Error when submitting the form
else:
- error = _("Please choose a correct choice in the list")
+ error = _("Incorrect choice in the list")
response_dct.update({'error_message':error,
'category_rss_feed':'category',
'sub_categories':SubCategory.getAvailable(['M', 'B'])})