[openstreetmap/openstreetmap-website] Allow localized & country-specific banners (PR #6851)

Daniele Santini notifications at github.com
Mon Mar 2 22:26:50 UTC 2026


<!--
Please read the contributing guidelines before making a PR:
  https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md

Pay particular attention to the section on how to present PRs:
  https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#pull-requests
-->

### Description
<!--Describe your changes in detail. If you have made changes to the UI, include screenshots. If your PR addresses a Github issue, please link to it.-->
Wikimedia Italia (italian local chapter) would like to show a temporary fundraising banner for only italian users. The OSMF board has [clarified that it is possible for local chapters as long as we manage to display the banner only to Italian speakers in Italy](https://osmfoundation.org/wiki/Board/Minutes/2025-06#Wikimedia_Italia's_enquiry_about_adding_a_fundraising_banner_on_osm.org). 
Also, in #6498 it was proposed to allow to show language-specific banners.
These changes implement these feature and propose the banner for Wikimedia Italia.

For now this is a draft to get early feedback while we sort out some problems:
* we will change the banner image and start/end dates (the currently proposed ones are just placeholders) 
* The new `it-IT` locale is identical to the existing `it` locale, but it's needed to make sure that the website distinguishes users with locale `it-IT` from other italian speaking users with locales like `it-CH`. I'm still trying to understand if there is a way to distinguish them without requiring a duplicate locale.
* I will test the behavior not only by changing the locale from the menu but also changing the browser locale and opening the website in a new incognito window to make sure that the correct behavior happens also on load 
* can you help me understand what this test failure is about ?
```
Failure:
LanguageTest#test_load [test/models/language_test.rb:24]:
Expected: 197
  Actual: 198

bin/rails test test/models/language_test.rb:16
```

### How has this been tested?
With the local dev server, changing the locale from the menu, the banner is shown only with the locale Italian (Italy)
<img width="1352" height="1010" alt="Screenshot 2026-03-02 210155" src="https://github.com/user-attachments/assets/7741171a-e790-49ef-b042-637b28ee7337" />
<img width="1350" height="1016" alt="Screenshot 2026-03-02 210116" src="https://github.com/user-attachments/assets/1f8953da-40f0-4162-a2c4-50949a47be88" />
<img width="1357" height="1022" alt="image" src="https://github.com/user-attachments/assets/e00f1d42-7f1f-4810-9e70-024607cbe4bb" />

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Allow localized & country-specific banners
  * Add Wikimedia Italia banner

-- File Changes --

    M FAQ.md (1)
    A app/assets/images/banners/5x1000_italy_2026.jpg (0)
    M app/helpers/banner_helper.rb (2)
    M config/banners.yml (12)
    M config/languages.yml (3)
    M config/locales/en.yml (1)
    A config/locales/it-IT.yml (3945)
    M config/ui_languages.yml (2)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/6851 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260302/e1c34c89/attachment-0001.htm>


More information about the rails-dev mailing list