[openstreetmap/openstreetmap-website] Fallback processing for community name i18n (Issue #3814)

Andy Allan notifications at github.com
Tue Nov 29 11:16:31 UTC 2022


Thanks for the links @1ec5 

So as far as I understand it, the solution is to take the resource, and look up the (English-language) default `community:` string, e.g.

```
{
  "id": "fr-chapter",
  "type": "osm-lc",
  "locationSet": {"include": ["fr"]},
  "languageCodes": ["fr"],
  "order": 1,
  "strings": {
    "community": "OpenStreetMap France",
    "description": "We help grow and improve OpenStreetMap in France.",
    "url": "https://www.openstreetmap.fr/"
  }
```

So we have `community: "OpenStreetMap France"`. Then we have to "[simplify](https://github.com/osmlab/osm-community-index/blob/d31da8c976ce589c79d01b1a7bd6ac924610a1df/lib/simplify.js)" that value, to get the "openstreetmapfrance" key, and use that key to look up the fallback translations.

Thanks for the clues! I would not have thought of doing it that way.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3814#issuecomment-1330469637
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/3814/1330469637 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221129/6cb879ab/attachment.htm>


More information about the rails-dev mailing list