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

translate_without_moirai raises if translation is missing #67

Open
simon-isler opened this issue Dec 3, 2024 · 2 comments
Open

translate_without_moirai raises if translation is missing #67

simon-isler opened this issue Dec 3, 2024 · 2 comments
Assignees

Comments

@simon-isler
Copy link
Member

def self.translate_without_moirai(key, locale, **)
    raise "Original backend is not set" unless original_backend

    original_backend.translate(locale, key, **)
end

we should probably check whether the translation exists first, or rescue I18n::MissingTranslation

@coorasse
Copy link
Member

coorasse commented Dec 3, 2024

This should indeed never happen, right @oliveranthony17 ? If you have moirai, you also have an original backend

@simon-isler
Copy link
Member Author

@coorasse it raises at original_backend.translate(locale, key, **) due to missing translations

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

3 participants