[openstreetmap/openstreetmap-website] Don't show native language name if it's the same as English name (PR #4452)

Anton Khorev notifications at github.com
Tue Jan 2 06:26:46 UTC 2024


Languages have names in the format of "English name (native name)". These names are used in diary entry language links and inputs.

![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/b1290132-9d92-48b5-83c3-20f847344427)

Sometimes *native name* is exactly the same as *English name*, so the same thing is displayed twice:

![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/2c23bdae-692a-4e54-841a-1e08a6feeab1)

I think we don't need "(native name)" in this case:

![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/c7b2da51-5880-436f-94ff-a094f8336a40)

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

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

-- Commit Summary --

  * Don't show native language name if it's the same as English name

-- File Changes --

    M app/models/language.rb (2)
    M test/models/language_test.rb (5)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list