<p></p>
<p><b>@atomoil</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730483526">lib/osm_community_index/local_chapter.rb</a>:</p>
<pre style='color:#555'>> +    def self.local_chapters_with_locale(locale)
+      @localised_chapters[locale] ||= load_local_chapters(locale)
+    end
+
+    protected
+
+    def self.load_local_chapters(locale)
+      community_index = OsmCommunityIndex.community_index
+      localised_strings = OsmCommunityIndex.localised_strings(locale)
+      local_chapters = []
+      community_index["resources"].each do |id, resource|
+        resource.each do |key, value|
+          next unless key == "type" && value == "osm-lc" && id != "OSMF"
+
+          strings = resource["strings"]
+          name = localised_strings.dig(id, "name") || strings["name"] || strings["community"]
</pre>
<p>I raised this with the osm-community-index team, and this code was the result of our conversation here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="978428320" data-permission-text="Title is private" data-url="https://github.com/osmlab/osm-community-index/issues/483" data-hovercard-type="issue" data-hovercard-url="/osmlab/osm-community-index/issues/483/hovercard" href="https://github.com/osmlab/osm-community-index/issues/483">osmlab/osm-community-index#483</a>.</p>
<p>Would it help to add a comment referencing this github issue?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730483526">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNORFMKT4Z72TKKVKDUHNB6RANCNFSM5CXUIRLQ">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>.
<img src="https://github.com/notifications/beacon/AAK2OLJUBX2IDFDFYVVSSHDUHNB6RA5CNFSM5CXUIRL2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOF2KKU3I.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730483526",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3301#discussion_r730483526",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>