[openstreetmap/openstreetmap-website] Further rework lego messages for trace notification emails (Issue #4012)

Andy Allan notifications at github.com
Thu Apr 20 12:53:36 UTC 2023


Thanks @Pikse for pointing this out.

The tricky part here is that the long trace descriptions (there are two variations, one with tags and one without) are used in two different sentences, one positive (with countable variations) and one negative.

```yaml
gpx_description:
  description_with_tags_html: "It looks like your GPX file %{trace_name} with the description %{trace_description} and the following tags: %{tags}"
  description_with_no_tags_html: "It looks like your GPX file %{trace_name} with the description %{trace_description} and no tags"
gpx_failure:
  failed_to_import: "failed to import. Here is the error:"
gpx_success:
  loaded:
    one: "loaded successfully with %{trace_points} out of a possible %{count} point."
    other: "loaded successfully with %{trace_points} out of a possible %{count} points."
```

One solution would be maintain the current structure of the translations, but use interpolation e.g. `%{gpx_description} failed to import.` I don't know whether this would be suitable for all languages though, perhaps some of the descriptions need different grammar depending on whether the sentence is positive or negative.

An alternative solution would be to have four full sentence to translate (two failures, two successes). That has a lot of duplication between the sentences, but allows full control over both the word order and also any grammar changes needed to the description based on the positive/negative grammar of the sentence.



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

Message ID: <openstreetmap/openstreetmap-website/issues/4012/1516276044 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230420/88a09fd4/attachment.htm>


More information about the rails-dev mailing list