[OSM-dev] extracting output text from api_controller

Xin Zheng xin at zxv.ltd.uk
Wed Jan 23 17:49:08 GMT 2008


Cool. I'm glad we can agree on this.
I'm working away at map method at the moment. I'll either apply the patch or
code in the functionalities before end of this week.

John,
The reason it's in a hash it because Ruby can load a yaml file straight into
it. A yaml file is basically a hash in file format. Imagine this in the
file:
en:
  this_text: "say something here"
  other_text: "say something else"
cn:
  this_text: "i'd type in chinese if I could"
  other_text: "some more stuff"

Ruby can then load all that into a hash to be easily used.

On 23/01/2008, Tom Hughes <tom at compton.nu> wrote:
>
> In message <e04cd2420801230920t7eec23e6q4d21e298c38130a3 at mail.gmail.com>
>         Xin Zheng <xin at zxv.ltd.uk> wrote:
>
> > My aim is to clean up the code so I can easily and safely add new
> > functionality. Extracting the output string like this takes a step in
> that
> > direction.
>
> Clearly this is not bad as such, and it doesn't do any significant
> damage beyond perhaps making certain types of edit to the code a bit
> more of a pain, so if you really want to do it then fine. I just don't
> think it's worth spending a lot of time on when there are better
> things to do.
>
> If you want to do something useful to the map call then review the
> patch at http://trac.openstreetmap.org/ticket/648 and consider
> applying it, and see if you can tidy things up now that we have
> the multi component key stuff - the version in amf_controller
> looks quite a lot nicer than the main map call now ;-)
>
> With that I think I'm going to tune out for a few days and let you
> three get on with whatever it is you're going to do and I'll look at
> what you come up with next week or something rather than trying to
> keep up in real time.
>
> Have fun, and try not to do too much damage guys!
>
> Tom
>
> --
> Tom Hughes (tom at compton.nu)
> http://www.compton.nu/
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080123/0934b314/attachment.html>


More information about the dev mailing list