[openstreetmap/openstreetmap-website] Add links to diaries in preferred languages (PR #4451)

Anton Khorev notifications at github.com
Tue Jan 2 05:45:16 UTC 2024


Adds a link requested in #2657 to https://www.openstreetmap.org/diary
Actually adds links for all preferred languages, using candidates logic https://github.com/openstreetmap/openstreetmap-website/blob/c95e2870f3310a68f8287bddcec6d0117b5f8961/lib/locale.rb#L44-L53

![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/cd763ea9-3306-4e00-877d-f09786ac06fc)

---

#2657 also requested:

> users could tick a box to in their settings, which would make the diary page default to their preferred language url

I don't think this is necessary. You can always bookmark diary pages in any specific language or subscribe to that language feed.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4451

-- Commit Summary --

  * Fix indent
  * Add links to diaries in preferred languages

-- File Changes --

    M app/controllers/diary_entries_controller.rb (2)
    M app/views/diary_entries/index.html.erb (18)
    M test/system/diary_entry_test.rb (13)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4451.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4451.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4451
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4451 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240101/94b0d806/attachment.htm>


More information about the rails-dev mailing list