[openstreetmap/openstreetmap-website] Advanced preferences, language dropdown in basic preferences (PR #6024)
Anton Khorev
notifications at github.com
Sun May 18 12:51:06 UTC 2025
@AntonKhorev commented on this pull request.
> +
+ {
+ :code => code,
+ :native_name => native_name
+ }
+end
+
+AVAILABLE_LANGUAGES.sort_by! do |entry|
+ # https://stackoverflow.com/a/74029319
+ diactrics = [*0x1DC0..0x1DFF, *0x0300..0x036F, *0xFE20..0xFE2F].pack("U*")
+ entry[:native_name]
+ .downcase
+ .unicode_normalize(:nfd)
+ .tr(diactrics, "")
+ .unicode_normalize(:nfc)
+end
dumped to `config/ui_languages.yml`
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6024#discussion_r2094515345
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6024/review/2848942756 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250518/0ec22de3/attachment.htm>
More information about the rails-dev
mailing list