-
Notifications
You must be signed in to change notification settings - Fork 815
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
I18n: get_locale calls involve much boilerplate code #2707
Comments
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation. |
I think that is still very much an issue:
@zinigor @ice9js Do you think this could be a mini project for Garage? Maybe we could retire the Compat package, and have a proper common class and methods one can use to fetch a site locale, with an option to get a WordPress.com-compatible locale, and use that everywhere. The class and methods should be in a package that's available to the Jetpack plugin, to the mu-wpcom plugin, and others. I don't know if that's worth creating a new package though? |
When calling
get_locale
Jetpack code often checks for existence of theGL_Locales
class and requires the file if it's not defined. This code is used in several places and can be abstracted to make everything more DRY:The text was updated successfully, but these errors were encountered: