<p dir="auto">Avoid accidental changes to <code class="notranslate">I18n.locale</code> when a request is made as a logged in user with a different language preference.</p>
<p dir="auto"><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #6075.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3107626191" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/6075" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/6075/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/6075">#6075</a>.</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/6077'>https://github.com/openstreetmap/openstreetmap-website/pull/6077</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/6077/commits/d9b758267c169f29560c824dee81f8ace77de11d" class="commit-link">d9b7582</a> Protect I18n.locale around tests which may change it</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6077/files">2 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6077/files#diff-6b476071fcf4306b28f8c165abfc4e495f158933d80b007ab125954124e4fa01">test/controllers/preferences/advanced_preferences_controller_test.rb</a>
(20)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6077/files#diff-262ebdd7a1c28e17378a877865386b859fa07647c390f6c3a4fe050675efc551">test/controllers/preferences/basic_preferences_controller_test.rb</a>
(24)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6077.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/6077.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6077.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/6077.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/6077">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLUNSU2ARZR57PCJIT3BNIX5AVCNFSM6AAAAAB6LNLLGKVHI2DSMVQWIX3LMV43ASLTON2WKOZTGEYDONZTGA4DENA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLVPE4CVVUZRRTYMJL3BNIX5A5CNFSM6AAAAAB6LNLLGKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHLSPBVRA.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/6077</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/6077",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6077",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>