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

Fix private method called for warn deprecated #513

Merged

Conversation

BrankoDordevic
Copy link
Contributor

I have encountered a problem when trying to translate from Portuguese ("pt") to English without using the Portuguese sub locale ("pt-pt"). Which caused a private method 'warn_deprecated' called for I18n::Tasks::BaseTask

The use of module_function in i18n/tasks/logging.rb causes the methods to be made private and therefore makes it unable to call the warn_deprecated method in for example /tasks/translators/deepl_translator.rb and /tasks/translators/google_translator.rb.

This change could potentially fix the issue in #348 as well.

…e existing translation files to include the 'pt-pt' as its locale in stead of simply 'pt'
@glebm
Copy link
Owner

glebm commented Jul 13, 2023

Thanks! Can you please fix the lint error?

@glebm glebm merged commit 7500aff into glebm:main Jul 13, 2023
kerim1510 pushed a commit to ansdelft/i18n-tasks that referenced this pull request Jul 13, 2023
Co-authored-by: Branko Dordevic <branko@ans.app>
@benjaminwols benjaminwols deleted the fix-private-method-called-for-warn-deprecated branch October 17, 2023 18:51
@benjaminwols benjaminwols restored the fix-private-method-called-for-warn-deprecated branch October 17, 2023 18:51
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.

2 participants