<p></p>
<p><b>@gravitystorm</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r817940984">lib/osm_community_index/local_chapter.rb</a>:</p>
<pre style='color:#555'>> + next unless key == "type" && value == "osm-lc" && id != "OSMF"
+
+ raw_local_chapters.push({ :id => id, :resource => resource })
+ end
+ end
+ raw_local_chapters
+ end
+
+ def self.add_to_i18n
+ raw_local_chapters = load_raw_local_chapters
+ files = Dir.glob(Rails.root.join("node_modules/osm-community-index/i18n/*"))
+ files.each do |file|
+ locale = File.basename(file, ".yaml")
+ community_index_yaml = YAML.safe_load(File.read(file))[locale]
+ # rails wants en-GB but osm-community-index has en_GB
+ locale_rails = locale.split("_").join("-")
</pre>
<p dir="auto"><a href="https://ruby-doc.org/core-3.1.1/String.html#method-i-tr" rel="nofollow"><code>String#tr</code></a> instead of <code>String.split(foo).join(bar)</code></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/3301#pullrequestreview-897929707">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIH3JNZCJGXIMFMN5TU56R55ANCNFSM5CXUIRLQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIXT4CWWJP24QSP5STU56R55A5CNFSM5CXUIRL2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOGWCVD2Y.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/3301/review/897929707</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/3301#pullrequestreview-897929707",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3301#pullrequestreview-897929707",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>