⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@thdaraujo
Copy link
Contributor

@thdaraujo thdaraujo commented Mar 11, 2025

Motivation / Background

Closes #3158

  • Adds rake task to reformat all locales using the existing yaml formatter
  • Reformats the existing locales

Additional information

Running the reformat_locales task again will generate lots of changes because I skipped most of the changes below:

  • single quotes being formatted to double quotes
  • whitespace removal
  • some files removed the single quotes '' for a few items but not all of them, especially phone number/cell phone formats
  • the compass.cardinal.abbreviation added double quotes to "N" only
  • kept the original comments
  • kept regex patterns as they are (the task changes them from '\d{3,19}#' to "\\d{3,19}#", for example.

To keep this PR as small as it can possibly be, I skipped these scenarios (exception: I included a few of these changes in this separate commit bc15476). I reviewed the files twice and tested generators with locales. A few locales have tests, which was helpful.

@thdaraujo thdaraujo self-assigned this Mar 11, 2025
@thdaraujo thdaraujo changed the title Add reformat locale rake task Add reformat locale rake task (WIP) May 4, 2025
@stefannibrasil stefannibrasil force-pushed the ta/reformat-locales branch 3 times, most recently from ec50eea to 7d5e9c2 Compare January 8, 2026 00:40
@stefannibrasil
Copy link
Contributor

The tests seem to be flaky. I will investigate tomorrow.

@stefannibrasil stefannibrasil changed the title Add reformat locale rake task (WIP) Add reformat locales rake task Jan 8, 2026
@stefannibrasil stefannibrasil marked this pull request as ready for review January 8, 2026 18:57
@stefannibrasil
Copy link
Contributor

@thdaraujo I pushed some commits to this branch. Do you mind taking a look when you can? Thanks! 🙇🏼‍♀️

Copy link
Contributor Author

@thdaraujo thdaraujo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me!

@thdaraujo thdaraujo assigned thdaraujo and unassigned thdaraujo Jan 14, 2026
thdaraujo and others added 3 commits January 13, 2026 19:39
This task reformats all YAML locales.
These files have been formatted using the new rake task.

Note that I skipped the files that had changes such as single quotes
vs quotes, and whitespace removal to keep this PR as small as it can
possibly be.

I did encounter a flaky test with the fr locale compass test. It got fixed
when I edited the values to keep the quotes around them.

Running the task again will remove whitespaces, comments, ident with two spaces,
and other small things. Ideally, we won't need to run it again for all files, though.
To keep moving forward with the next steps, I didn't fix the task to encounter for these
small scenarios.
@stefannibrasil stefannibrasil merged commit 6c82cde into main Jan 14, 2026
9 checks passed
@stefannibrasil stefannibrasil deleted the ta/reformat-locales branch January 14, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize YML files

3 participants