[openstreetmap/openstreetmap-website] Add locale selector (PR #5201)
Anton Khorev
notifications at github.com
Wed Oct 23 13:06:36 UTC 2024
@AntonKhorev commented on this pull request.
> + <% Locale.available
+ .map { |locale| Language.find_by(:code => locale.to_s) }
+ .select { |locale| locale }
+ .sort_by { |locale| locale[:english_name] }
+ .each do |language| %>
+ <option class="form-select" value="<%= language.code %>" <%= "selected" if I18n.locale.to_s == language.code %>><%= language.name %></option>
> Translating language names using i18n and not having one source for them
i18n is going to be their *one source*
> may cause duplicate translations or inconsistency (because of multiple functionalities using language names).
We already have two different functionalities using two different sets of languages: i18n and languages of diary entries.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5201#discussion_r1812724030
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5201/review/2388625475 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241023/83eb7a31/attachment-0001.htm>
More information about the rails-dev
mailing list