<h3 dir="auto">Description</h3>
<p dir="auto">This PR includes the following two changes:</p>
<ul dir="auto">
<li>
<p dir="auto">Dynamic loading using Turbo: instead of rendering the language selection for every page, this is now done on demand only, when clicking on the language selection button.</p>
<ul dir="auto">
<li>Some sidebar navigation steps don't automatically reload the header section, which is why I have to evaluate and possibly update the turbo frame "src" link in Javascript. This happens e.g. when navigating from a changeset to an element.</li>
<li>Rails controller name and path names may be confusing. I'm open for better ideas.</li>
</ul>
</li>
<li>
<p dir="auto">Search field: since the list of languages is a bit long, I have added a type ahead search at the top of popup window. It's doing some case-insensitive sub-string matching, and filters out any non-matching entries.</p>
</li>
</ul>
<p dir="auto">Here's how the overall result looks like:</p>
<a href="https://github.com/user-attachments/assets/663f8e2d-050d-450f-8ca5-1295725bf673">image.png (view on web)</a>
<a href="https://github.com/user-attachments/assets/68285295-3c3e-4689-b079-987ee3023ce0">image.png (view on web)</a>
<p dir="auto">or as screen recording:</p>
<p dir="auto"><a href="https://github.com/user-attachments/assets/4deaf116-a7c0-4454-962f-0a17a10d5e7d">https://github.com/user-attachments/assets/4deaf116-a7c0-4454-962f-0a17a10d5e7d</a></p>
<h3 dir="auto">How has this been tested?</h3>
<p dir="auto">Local test</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/6412'>https://github.com/openstreetmap/openstreetmap-website/pull/6412</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/commits/b0900092c7f7524b012e040f1cebc72e32198ff6" class="commit-link">b090009</a> Language selection enhancements</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files">9 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-debf59904131dc89a88ab44cbb1d6deaaa5a7d70c0507f674080df62f7c8e41f">app/abilities/ability.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-0e145ba000e96b1a45d230275e350e4e8514efb4db7dbcfa228fe1003896c9b4">app/assets/javascripts/application.js</a>
(30)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-02ab92c7f21cf5a14fd51f6d4189444e26f973657d7a2a3c641158adcfba5018">app/controllers/languages_controller.rb</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-6d2ef58207c92d1533287af551a075122ba98240a861819047a2ae77b7674f0b">app/views/layouts/_header.html.erb</a>
(24)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-9f84554383f840e8a48ea239674a50010388664db1f3da9eb7893f7d88198656">app/views/layouts/_select_language_list.html.erb</a>
(23)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-d59bd87d7155ef156484ffafa5f9f38c2e702902fd9080e13f1c6b54077f54b1">app/views/layouts/_select_language_list_frame.html.erb</a>
(11)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
(1)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-959bc9abc46a55332bb64d5155a79323afa75a50ec1a2137ddd22d926f62c6c5">config/routes.rb</a>
(1)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412/files#diff-44a185df20feebf26015ae37dad28a0ad989fc1e2990cf3c5744ebb32fb2dcc9">test/system/select_language_test.rb</a>
(10)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6412.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/6412.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6412.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/6412.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLM7MGZTD7HXAVJ3AK33UAZCTAVCNFSM6AAAAACHGBLHKCVHI2DSMVQWIX3LMV43ASLTON2WKOZTGQ2DEMBVHAZDQNI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOFFCWDP6VIKVKI5UD3UAZCTA5CNFSM6AAAAACHGBLHKCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHM2KNEFU.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6412</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6412",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6412",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>