<p></p>
<p><b>@gravitystorm</b> requested changes on this pull request.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Strubbl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Strubbl">@Strubbl</a> thank you for your PR. I've marked this as a draft, since it is only partially implemented and not suitable for merging.</p>
<p dir="auto">You asked where the interpolation values would come from, and one example is here:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/blob/e9e4b10473fa536cdb840303ee4afccf71c69329/app/mailers/user_mailer.rb#L143-L147">https://github.com/openstreetmap/openstreetmap-website/blob/e9e4b10473fa536cdb840303ee4afccf71c69329/app/mailers/user_mailer.rb#L143-L147</a></p>
<p dir="auto">You can see how the <code class="notranslate">commenter</code> variable is set. You need to do something similar for e.g. <code class="notranslate">note_id</code>. You can access the note id in this context in various ways, e.g. <code class="notranslate">comment.note.id</code>.</p>
<p dir="auto">You will also need to adjust the tests, or write new ones, to make sure the subject line is filled in correctly.</p><hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3952#discussion_r1229613936">config/locales/en.yml</a>:</p>
<pre style='color:#555'>> @@ -1585,8 +1585,8 @@ en:
anonymous: An anonymous user
greeting: "Hi,"
commented:
- subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes"
- subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in"
+ subject_own: "[OpenStreetMap] %{commenter} has commented on your note %{note_id}"
+ subject_other: "[OpenStreetMap] %{commenter} has commented on note %{note_id} you are interested in"
your_note: "%{commenter} has left a comment on one of your map notes near %{place}."
</pre>
<p dir="auto">You will also need to change the other <code class="notranslate">subject_own</code> and <code class="notranslate">subject_other</code> translations further down this file - there are separate subjects for "commented" "closed" and "reopened" events.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3952#discussion_r1229617525">config/locales/en.yml</a>:</p>
<pre style='color:#555'>> @@ -1611,8 +1611,8 @@ en:
hi: "Hi %{to_user},"
greeting: "Hi,"
commented:
- subject_own: "[OpenStreetMap] %{commenter} has commented on one of your changesets"
- subject_other: "[OpenStreetMap] %{commenter} has commented on a changeset you are interested in"
+ subject_own: "[OpenStreetMap] %{commenter} has commented on your changeset %{changeset_id}"
+ subject_other: "[OpenStreetMap] %{commenter} has commented on changeset %{changeset_id} you are interested in"
your_changeset: "%{commenter} left a comment at %{time} on one of your changesets"
</pre>
<p dir="auto">Unfortunately, for technical reasons explained below, you can't change the interpolation variables in a translation, without also changing the key.</p>
<p dir="auto">The technical reason is that the interpolation variables must be exactly the same in all translations for the same key. It can take several weeks, or longer, for all the translators to update their translations, and in the meantime the code would not work in those languages. So if you change the interpolations in a value, you need to change the key (e.g. <code class="notranslate">subject_own</code>) to something else too.</p>
<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/3952#pullrequestreview-1479439738">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJZN22EV6BPH63E7ITXLG4AXANCNFSM6AAAAAAVMTC4EM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLL4RBORJA5UOPXHFO3XLG4AXA5CNFSM6AAAAAAVMTC4EOWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTSYFZ2XU.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/3952/review/1479439738</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/3952#pullrequestreview-1479439738",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3952#pullrequestreview-1479439738",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>