<p dir="auto">This PR moves name and attribution i18n from <code class="notranslate">L.OSM.Map.initialize</code> to the new <code class="notranslate">MapLayers</code> lib from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2922707157" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5809" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5809/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5809">#5809</a>.<br>
So I could remove <code class="notranslate">layerConstructor</code> redefinitions and simplify the generation of the map's <code class="notranslate">baseLayers</code> by using <code class="notranslate">OSM.LAYER_DEFINITIONS.map()</code>.<br>
There might be a better place for the translations I moved from <code class="notranslate">javascripts.map</code> to <code class="notranslate">site.index.map</code> but I couldn't find one.</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/5832'>https://github.com/openstreetmap/openstreetmap-website/pull/5832</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5832/commits/2a746fe45e84be92ceb20796e49d5f8a23afb7c9" class="commit-link">2a746fe</a> Translate names in MapLayers lib</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5832/commits/e893f27968002aebb7370377757841d61c4ad8df" class="commit-link">e893f27</a> Build attribution in MapLayers lib</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5832/commits/805802cda032f0dff48d8697bc1b467a50c1c632" class="commit-link">805802c</a> Refactor map base layer initialization</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5832/files">3 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5832/files#diff-f060eef487077b042f45b3a12e7a2cbd54a446f8c744cdb98405a1295430e8b9">app/assets/javascripts/leaflet.map.js</a>
(69)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5832/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
(41)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5832/files#diff-e34d4641ba9894ccb3b643428fbd894a61bd2ec7c49ebde859e8af8e6ffa800b">lib/map_layers.rb</a>
(32)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5832.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5832.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5832.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5832.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/5832">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPXSUPMFIHF43XZVJT2VO53LAVCNFSM6AAAAABZPJQHDGVHI2DSMVQWIX3LMV43ASLTON2WKOZSHEZTONJVG4YTINI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLZVV4XAVOSXOWZ6I32VO53LA5CNFSM6AAAAABZPJQHDGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHK6F4QTE.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/5832</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/5832",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5832",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>