In message <[EMAIL PROTECTED]>
        Xin Zheng <[EMAIL PROTECTED]> wrote:

> I am working on api_controller at the moment. I'd like to suggest we take
> out the output strings and put that in a YAML file.
>
> So rather than:
>
> unless bbox and bbox.count(',') == 3
>       report_error("The parameter bbox is required, and must be of the form
> min_lon,min_lat,max_lon,max_lat")
>       return
> end
>
> We can have:
> unless bbox and bbox.count(',') == 3
>       report_error(TEXT['boundary_parameter_required']
>       return
> end
>
> It separates logic from presentation.
>
> The yaml file can be /config/output_texts/en.yml.
>
> It is loaded from this intializer script:
> TEXT = YAML.load(File.read(RAILS_ROOT + "/config/text_outputs/en.yml"))
>
> Doing this will also be a step closer to having outputs in different
> languages.
>
> What does everyone think?

I think unless we have a full solution to the I18N problem there is
no point in wasting time on half measures which may need to be redone
when we settle on a final solution.

Present me with a solution that includes how to do I18N for the view
templates (without making them unreadable) as well as for the tiny
amount of text output directly by the controllers and I will be a very
happy bunny.

As it stands I think this is a waste of time.

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Reply via email to