Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize tool with inconsistent results? #1134

Open
pama opened this issue Nov 9, 2024 · 0 comments
Open

Normalize tool with inconsistent results? #1134

pama opened this issue Nov 9, 2024 · 0 comments

Comments

@pama
Copy link
Collaborator

pama commented Nov 9, 2024

Our normalize tool is supposed to remove double quotes from YAML values, but it's not behaving consistently. In some cases, double quotes get swapped for single quotes. For instance:

activerecord:
  errors:
    messages:
      record_invalid: "Validation failed: %{errors}"
      restrict_dependent_destroy:
        has_one: "Cannot delete record because a dependent %{record} exists"
        has_many: "Cannot delete record because dependent %{record} exist"

gets normalized to:

activerecord:
  errors:
    messages:
      record_invalid: 'Validation failed: %{errors}'
      restrict_dependent_destroy:
        has_one: Cannot delete record because a dependent %{record} exists
        has_many: Cannot delete record because dependent %{record} exist

record_invalid ends up with single quotes instead of double quotes, and has_many loses the quotes entirely.

I personally think we should not remove the double quotes to keep our translations similar to the locale files from the Rails project.

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

No branches or pull requests

1 participant