I like that. My inclination for this pull request is to add "label" to the
benefit hash and add an i18n card to the backlog. You and Adam can decide
if we should promote it to this sprint.

A related issue is units. For each instance, how will we choose units for
e.g. the "air quality" benefit or for a tree's diameter:

   1. Based on the instance's locale, or
   2. Allow each instance to configure units separately for each of many
   fields, or
   3. #1 by default with #2 optional
   4. Something else

Whatever the answer, we should add a card for setting up its plumbing. And
one for updating the benefits display to use appropriate units. For now
I'll change the benefits template to actually display the units.

-Rick


On Thu, Jul 25, 2013 at 3:40 PM, Justin Walgran <notifications@github.com>wrote:

> In opentreemap/treemap/templates/treemap/eco_benefits.html:
>
> > @@ -0,0 +1,13 @@
> > +<div>
> > +  <h2>Benefits</h2>
> > +  <table>
> > +    <tr><th>Benefit</th><th>Value</th></tr>
>
> This is one of the the first bits of template markup that we are probably
> not going to throw out once we get full prototype markup from the
> designers. As a result, we should consider replacing these literal English
> string with internationalized versions<https://docs.djangoproject.com/en/dev/topics/i18n/translation/>
> .
>
> I would suggest modifying _benefits_for_trees in ecobenefits/views.py to
> include a translated label for each benefit. A Spanish tree map would
> return something like this:
>
> {
>   ...
>   "airquality": {
>     value: 12
>     unit: "kg"
>     label: "Calidad del aire"
>   }
>   ...}
>
> This template can then be generalized to
>
> <tr><td>{{ benefits.airquality.label }}<td>{{ benefits.airquality.value }}</td></tr>
>
> and then simplified further into a loop that iterates over the keys in
> benefits
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/azavea/OTM2/pull/92/files#r5407842>
> .
>



-- 
Rick Mohr, Software Developer

Azavea |  340 N 12th St, Ste 402, Philadelphia, PA
rmohr@azavea.com  | T 215.701.7504  | F 215.925.2663
Web azavea.com <http://www.azavea.com/>  |  Blog
azavea.com/blogs<http://www.azavea.com/Blogs>
| Twitter @azavea <http://twitter.com/azavea>