<p dir="auto"><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #3816.">Fix</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1462252019" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3816" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3816/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/3816">#3816</a> by not constructing sentences and not having combined i18n strings.</p>
<p dir="auto">I don't think sentences are expected in map key, so instead of this:<br>
<a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/efe18e2e-e5d6-4fc1-a6b6-cb0197069ba4">image.png (view on web)</a><br>
we can connect terms by dots, like we do with <em>secondary actions</em> ("Download XML ·View History" on element pages etc):<br>
<a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/654078b9-7fe3-4104-8f1d-e946532db78c">image.png (view on web)</a></p>
<p dir="auto">Don't group locale strings in site.key.table.entry. Instead of this:</p>
<pre class="notranslate"><code class="notranslate"> cable:
- Cable car
- chair lift
</code></pre>
<p dir="auto">have this:</p>
<pre class="notranslate"><code class="notranslate"> cable_car: "Cable car"
chair_lift: "Chair lift"
</code></pre>
<p dir="auto">Group them in <code class="notranslate">key.yml</code>, depending on layer. Instead of this:</p>
<pre class="notranslate"><code class="notranslate">- { min_zoom: 12, name: cable, image: cable.png }
</code></pre>
<p dir="auto">have this:</p>
<pre class="notranslate"><code class="notranslate">- { min_zoom: 12, name: [cable_car, chair_lift], image: cable.png }
</code></pre>
<hr>
<p dir="auto">The advantage is that if features are grouped differently on various layers, their names can be translated independently. For example, mapnik has different colors for parks and allotments with two different entries in <code class="notranslate">key.yml</code>:</p>
<pre class="notranslate"><code class="notranslate">- { min_zoom: 10, name: park, width: 26, height: 10, fill: "#c8facc" }
- { min_zoom: 10, name: allotments, width: 26, height: 10, fill: "#d4e6cc" }
</code></pre>
<p dir="auto">Opnvkarte renders parks and allotments the same, they can have one entry:</p>
<pre class="notranslate"><code class="notranslate">- { min_zoom: 12, name: [park, allotments], width: 26, height: 10, fill: "#c2d89a" }
</code></pre>
<p dir="auto">And there can be two independent locale strings:</p>
<pre class="notranslate"><code class="notranslate">park: "Park"
allotments: "Allotments"
</code></pre>
<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/4425'>https://github.com/openstreetmap/openstreetmap-website/pull/4425</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4425/commits/07954549b95340a35ab7eec4a17e15dcb50b3164" class="commit-link">0795454</a> Allow arrays of names in map key entries</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4425/files">4 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4425/files#diff-c7e7144de4dcf44dbb148d4acc6aa4a9d8581c6a581966a0bbfb598e79730f14">app/controllers/site_controller.rb</a>
(3)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4425/files#diff-1ed86bfa2aa7755d8f1f78574beceeb01b246a86beed16f43eb4d286f35667a9">app/views/site/key.html.erb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4425/files#diff-8abf575bd6f979f2421ac257b066a1abb2e9162fdc0b0d3c8bd609f94059cab1">config/key.yml</a>
(44)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4425/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
(47)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4425.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4425.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4425.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4425.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/4425">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJVXROB5AS36R4O7DLYKI5FRAVCNFSM6AAAAABA4BVABSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2DSNRWGUZDANQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJQ4IXCFUIF3BIF6BDYKI5FRA5CNFSM6AAAAABA4BVABSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHUK3IWY.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/4425</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/4425",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4425",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>