Skip to content

Curious about what the maintainer thinks about this gist #714

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

Open
martijnenco opened this issue May 10, 2025 · 0 comments
Open

Curious about what the maintainer thinks about this gist #714

martijnenco opened this issue May 10, 2025 · 0 comments

Comments

@martijnenco
Copy link

Hello!

For an application I needed to add variations in my translation files, the way I see most people do it is creating just more locale files like en_formal.yml & en_informal.yml. I kinda find that very very ugly and not at all DRY. So that why I made this initializer that partly overrides this gem.

Here is the gist, with my code and explanation: I18n Variations

TL:DR;
It's making this work:

en:
  some_translation_that_does_not_have_variations: "Hello world, I say my greetings to everyone the same way!"
  some_translation_that_has_variations:
    formal: "I am being very polite here"
    informal: "I am not, deal with it."

If people maintainers think this is awesome or might be a good fight I would like to implement it to the gem.

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