[openstreetmap/openstreetmap-website] Allow various hard-coded strings to be translated (PR #6583)

Andy Allan notifications at github.com
Wed Dec 3 12:00:07 UTC 2025


This is part of a larger project to enable the ("No Hardcoded Strings"](https://github.com/Shopify/erb_lint/tree/main?tab=readme-ov-file#hardcodedstring) linter in erb_lint. Before I resolve some edge cases with that linter, I'm submitting this PR to fix some hardcoded strings that it found in our views.

For the `layouts.project_name.h1` key (see first commit) I checked every translation and validated that, if the translation existed, it matched the `layouts.project_name.title` key. This is true for all locales. I don't think there was ever a good reason to have two translations available for this.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6583

-- Commit Summary --

  * Remove duplicate project_name translation
  * Allow various hardcoded strings to be translated

-- File Changes --

    M app/views/browse/_relation.html.erb (2)
    M app/views/export/show.html.erb (2)
    M app/views/layouts/_header.html.erb (2)
    M app/views/layouts/error.html.erb (2)
    M app/views/layouts/user_mailer.html.erb (4)
    M config/locales/en.yml (6)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6583.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6583.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6583
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6583 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251203/20dfda12/attachment.htm>


More information about the rails-dev mailing list