Wordpress/tests/phpunit/tests/l10n
Dominik Schilling (ocean90) e2f67203bb I18N: Add an additional caching layer for _load_textdomain_just_in_time().
Previously, if no translation files exist for a text domain, `_load_textdomain_just_in_time()` went through the entire process each time it was called. This results in an increased call to `get_locale()` and its `locale` filter.
This change splits the logic into `_get_path_to_translation()` and `_get_path_to_translation_from_lang_dir()`. The former, which is used by `_load_textdomain_just_in_time()`, caches the result of the latter. It also removes some non-working code from `WP_Locale_Switcher::load_translations()`.

Props jrf, swissspidy, sharkomatic, ocean90.
Fixes #37997.

git-svn-id: https://develop.svn.wordpress.org/trunk@39330 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 16:06:38 +00:00
..
getLocale.php I18N: Don't initialize WP_Locale_Switcher in wp_load_translations_early(). 2016-10-29 11:22:50 +00:00
getUserLocale.php I18N: Add $user_id argument to get_user_locale(). 2016-10-26 14:14:44 +00:00
loadTextdomain.php I18N: Use the user's locale when loading text domains in the admin. 2016-11-03 20:07:08 +00:00
loadTextdomainJustInTime.php I18N: Add an additional caching layer for _load_textdomain_just_in_time(). 2016-11-21 16:06:38 +00:00
localeSwitcher.php I18N: Add an additional caching layer for _load_textdomain_just_in_time(). 2016-11-21 16:06:38 +00:00