[openstreetmap/openstreetmap-website] Add yalphabetize for yaml normalisation (PR #3459)

Sam Jenkins notifications at github.com
Tue Feb 15 12:46:26 UTC 2022


This PR introduces [yalphabetize](https://github.com/samrjenkins/yalphabetize) to the project. I would love to hear your thoughts/feedback.

It provides us with the ability to quickly normalise/alphabetise YAML files such as locales and to maintain this normalisation into the future.

Advantages of alphabetising YAML include:
- easier to locate specific keys in large files
- easier to spot duplicate keys
- easier to compare equivalent locale YAMLs for different languages

Yalphabetize can also be integrated into CI to ensure that future PRs maintain the alphabetisation of locale files.

I am slightly unsure how to handle alphabetisation of the other languages because the CONTRIBUTION guidelines state that these files are maintained via a 3rd party. Is it ok to sort these other locales in the same way as en.yml?
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * add yalphabetize for locale normalisation
  * add yalphabetize to CI
  * normalise en.yml

-- File Changes --

    M .github/workflows/lint.yml (24)
    A .yalphabetize.yml (2)
    M Gemfile (1)
    M Gemfile.lock (2)
    M config/locales/en.yml (3557)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/3459 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220215/39a7bbd6/attachment.htm>


More information about the rails-dev mailing list