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

Option to skip_locale #4

Open
nimmolo opened this issue Feb 16, 2024 · 1 comment
Open

Option to skip_locale #4

nimmolo opened this issue Feb 16, 2024 · 1 comment

Comments

@nimmolo
Copy link

nimmolo commented Feb 16, 2024

Would you accept a PR to add an option to skip_locale: true?

My site has 16 locales currently. In most cases I do want the default behavior of this gem — I don't want to forget to cache locale somewhere.

But I have also some nested fragments that are never translated: place names, scientific names (biology). It would be nice to be able to pass an option to cache to skip the 16 locales.

cache(key, skip_locale: true) do 
  tag.span(untranslated_string)
end

I think this will help people minimize on cache space, as this would produce only one cache fragment in these cases.

@igorkasyanchuk
Copy link
Owner

Yes, will accept

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

2 participants