add dialect support

I think i would like to go that route.
If I've understood correctly you're saying that if someone spams the app
with symbols locales which aren't actually valid we would have symbols for
those fake locals forever.
I want to go whichever way reduces memory and computation strain in long
run
On 30/07/2014 7:51 pm, "Robert Guthrie" <notifications@github.com> wrote:

> In app/helpers/locales_helper.rb:
>
> > @@ -0,0 +1,112 @@
> > +require 'http_accept_language'
> > +
>
> If you use symbols then code climate will tell us we have a problem.
> Because of how symbols are handled in ruby (ie: not garbage collected) it's
> possible to consume all the memory with symbols and stop the app. So
> converting user input strings (in this case locale identifiers) into
> symbols creates a vulnerability, if done unchecked. You cannot avoid doing
> this unless you convert all of the locale symbols into strings, and
> validate that the input locale string is included in the valid locales
> before converting it into a symbol. But I'm ok with doing that, if you
> wanna go that way.
> … <#1478640b74a8aab6_>
> On Wed, Jul 30, 2014 at 7:30 PM, mix irving <notifications@github.com>
> wrote: In app/helpers/locales_helper.rb: > @@ -0,0 +1,112 @@ > +require
> 'http_accept_language' > + @robguthrie <https://github.com/robguthrie> <
> https://github.com/robguthrie> can you look over this file please. I've
> shifted everything towards using symbols (rather than strings). Also
> decided to use dashes in locales as this is what browsers speak in (
> :'pt-BR' vs. :pt_BR ) — Reply to this email directly or view it on GitHub <
> https://github.com/loomio/loomio/pull/1571/files#r15569570>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/loomio/loomio/pull/1571/files#r15570253>.
>