Units translation

18 views
Skip to first unread message

Ricard Roca Munárriz

unread,
Jul 21, 2016, 2:15:49 PM7/21/16
to opentreemap-user
Hello, I have nearly all my OTM project translated to catalan. Now I seek to translate the units to european standards.
I tried to change the display_units in default_settings.py but then my app crashes.

Is there a way to do it???

thank you


Nico Aliotta

unread,
Jul 24, 2016, 1:26:02 AM7/24/16
to opentreemap-user

I've the same problem.
Don't know where to change units of measure.



Rick Mohr

unread,
Aug 1, 2016, 12:54:53 PM8/1/16
to opentree...@googlegroups.com
Overrides to the default units are stored in the "config" field of the "Instance" model. The "config" field contains JSON data for various instance attributes.

Here's an example of how to specify metric overrides for units (make sure you preserve
any existing data in the config JSON):

{
   "value_display":{  
      "eco":{  
         "co2storage":{  
            "units":"kg"
         },
         "co2":{  
            "units":"kg/year"
         },
         "airquality":{  
            "units":"kg/year"
         },
         "stormwater":{  
            "units":"L/year"
         }
      },
      "plot":{
         "width":{
            "units":"cm"
         },
         "length":{
            "units":"cm"
         }
      },
      "tree":{  
         "diameter":{  
            "units":"cm"
         },
         "height":{  
            "units":"m"
         },
         "canopy_height":{  
            "units":"m"
         }
      }
   },

   ... other settings ...

}


On Sat, Jul 23, 2016 at 10:26 PM, Nico Aliotta <nicoa...@gmail.com> wrote:

I've the same problem.
Don't know where to change units of measure.



--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rick Mohr, Software Developer
Azavea  |  990 Spring Garden Street, 5th Floor, Philadelphia, PA
215.701.7504  |  Web azavea.com  |  @azavea
Reply all
Reply to author
Forward
0 new messages