<span style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">
<p dir="auto">As far as I can see so far, we have a few issues here.</p>
<ul dir="auto">
<li>We can't translate every sentence that contains a duration, future time or past time separately. We have <a href="https://github.com/openstreetmap/openstreetmap-website/blob/432fa57e61c5535eb955ee50529aa43b18787fe4/config/locales/en.yml#L165-L201">13 different types of time</a>, and each of those need a language-dependent number of translations (normally 2-4) and we use dates in many different places on the website. So some sort of consolidation and interpolation is necessary.</li>
<li>rails has a few <a href="https://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html" rel="nofollow">time helpers</a>, and by default they use the same translation scope for every helper. (Some of the helpers are also slightly misleadingly named).</li>
<li>We currently have two sources of time translations:
<ul dir="auto">
<li>rails-i18n, which we use for durations and future times</li>
<li>our own <a href="https://github.com/openstreetmap/openstreetmap-website/blob/432fa57e61c5535eb955ee50529aa43b18787fe4/config/locales/en.yml#L164">distance_in_words_ago</a> which <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/app/helpers/application_helper.rb#L28-L34%5D(https://github.com/openstreetmap/openstreetmap-website/blob/432fa57e61c5535eb955ee50529aa43b18787fe4/app/helpers/application_helper.rb#L28-L34)">we use for past times</a></li>
</ul>
</li>
<li>I think the problem might be that some translations in rails-i18n are correct for past times, and therefore not durations or future times (e.g. slovakian, see <a href="https://github.com/svenfuchs/rails-i18n/blob/5e37210c8d3506f8b6925c67752d85fbee15a2a4/rails/locale/sk.yml#L77">sk</a>) but others are correct for durations/future times (e.g. <a href="https://github.com/svenfuchs/rails-i18n/blob/5e37210c8d3506f8b6925c67752d85fbee15a2a4/rails/locale/de.yml#L96">de</a>), see also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="455177100" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2255" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/2255/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/2255">#2255</a>.</li>
</ul>
<p dir="auto">So to resolve this I think we need to do the following:</p>
<ul dir="auto">
<li>Agree to stop using rails-i18n for time durations. Their translations are not grammatically consistent between languages as to whether they represent durations or past times.</li>
<li>We already have our own translations for <code class="notranslate">distance_in_words_ago</code>. But do we need separate sets of translations for <code class="notranslate">distance_in_words_duration</code> and <code class="notranslate">distance_in_words_in_future</code>? Or are they the same in each language?</li>
<li>Do we need separate translations for <code class="notranslate">distance_in_words_in_future</code> and <code class="notranslate">distance_in_words_in_future_in_a_sentence</code>?</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/issues/5769#issuecomment-2717518252">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPRESI5RGOIBTIIX3L2UAJMRAVCNFSM6AAAAABYSD47LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJXGUYTQMRVGI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJBQPJZ47X4FQ3OSKD2UAJMRA5CNFSM6AAAAABYSD47LCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTVB7IE2Y.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/issues/5769/2717518252</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
</span>
<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img alt="gravitystorm" height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/360803?s=20&v=4" /><strong>gravitystorm</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5769#issuecomment-2717518252">(openstreetmap/openstreetmap-website#5769)</a></div>
<p dir="auto">As far as I can see so far, we have a few issues here.</p>
<ul dir="auto">
<li>We can't translate every sentence that contains a duration, future time or past time separately. We have <a href="https://github.com/openstreetmap/openstreetmap-website/blob/432fa57e61c5535eb955ee50529aa43b18787fe4/config/locales/en.yml#L165-L201">13 different types of time</a>, and each of those need a language-dependent number of translations (normally 2-4) and we use dates in many different places on the website. So some sort of consolidation and interpolation is necessary.</li>
<li>rails has a few <a href="https://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html" rel="nofollow">time helpers</a>, and by default they use the same translation scope for every helper. (Some of the helpers are also slightly misleadingly named).</li>
<li>We currently have two sources of time translations:
<ul dir="auto">
<li>rails-i18n, which we use for durations and future times</li>
<li>our own <a href="https://github.com/openstreetmap/openstreetmap-website/blob/432fa57e61c5535eb955ee50529aa43b18787fe4/config/locales/en.yml#L164">distance_in_words_ago</a> which <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/app/helpers/application_helper.rb#L28-L34%5D(https://github.com/openstreetmap/openstreetmap-website/blob/432fa57e61c5535eb955ee50529aa43b18787fe4/app/helpers/application_helper.rb#L28-L34)">we use for past times</a></li>
</ul>
</li>
<li>I think the problem might be that some translations in rails-i18n are correct for past times, and therefore not durations or future times (e.g. slovakian, see <a href="https://github.com/svenfuchs/rails-i18n/blob/5e37210c8d3506f8b6925c67752d85fbee15a2a4/rails/locale/sk.yml#L77">sk</a>) but others are correct for durations/future times (e.g. <a href="https://github.com/svenfuchs/rails-i18n/blob/5e37210c8d3506f8b6925c67752d85fbee15a2a4/rails/locale/de.yml#L96">de</a>), see also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="455177100" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2255" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/2255/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/2255">#2255</a>.</li>
</ul>
<p dir="auto">So to resolve this I think we need to do the following:</p>
<ul dir="auto">
<li>Agree to stop using rails-i18n for time durations. Their translations are not grammatically consistent between languages as to whether they represent durations or past times.</li>
<li>We already have our own translations for <code class="notranslate">distance_in_words_ago</code>. But do we need separate sets of translations for <code class="notranslate">distance_in_words_duration</code> and <code class="notranslate">distance_in_words_in_future</code>? Or are they the same in each language?</li>
<li>Do we need separate translations for <code class="notranslate">distance_in_words_in_future</code> and <code class="notranslate">distance_in_words_in_future_in_a_sentence</code>?</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/issues/5769#issuecomment-2717518252">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPRESI5RGOIBTIIX3L2UAJMRAVCNFSM6AAAAABYSD47LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJXGUYTQMRVGI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJBQPJZ47X4FQ3OSKD2UAJMRA5CNFSM6AAAAABYSD47LCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTVB7IE2Y.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/issues/5769/2717518252</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/issues/5769#issuecomment-2717518252",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/5769#issuecomment-2717518252",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>