Wordpress/tests/phpunit/data
Dominik Schilling 9e83d04f84 I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths.
Previously, when using `switch_to_locale()` all current loaded text domains were unloaded and added to the `$l10n_unloaded` global. This prevented the just-in-time loading for text domains after a switch. The just-in-time loading was also only possible if the translations were stored in `WP_LANG_DIR`. Both issues have been fixed.

* Adds `WP_Textdomain_Registry` to keep track of the language directory paths for all plugins and themes.
* Updates all `load_*_textdomain()`  functions to store the path in `WP_Textdomain_Registry`.
* Adds `$reloadable` parameter to `unload_textdomain()` to define whether a text domain can be loaded just-in-time again. This is used by `WP_Locale_Switcher::load_translations()`.
* Extends `_load_textdomain_just_in_time()` to also support text domains of plugins and themes with custom language directories.
* Fixes the incorrect `test_plugin_translation_after_switching_locale_twice()` test which should have catch this issue earlier.
* Adds a new test plugin/theme to test the loading of translations with a custom language directory.
* Deprecates the now unused and private `_get_path_to_translation()` and `_get_path_to_translation_from_lang_dir()` functions.

Props yoavf, swissspidy, dd32, ocean90.
See #26511.
Fixes #39210.

git-svn-id: https://develop.svn.wordpress.org/trunk@49236 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 16:03:58 +00:00
..
blocks Block Editor: Update the WordPress Packages to the latest version. 2020-10-20 13:33:02 +00:00
export Ensure svn:eol-style is consistently set for all files (part 2). 2019-10-25 19:27:49 +00:00
formatting Administration: Capitalize Trash consistently in various messages and comments. 2020-02-10 04:10:09 +00:00
images Media: Fix wp_image_file_matches_image_meta() to also match when the original image URL is used. 2020-07-12 21:18:38 +00:00
languages I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2020-10-20 16:03:58 +00:00
plugins I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2020-10-20 16:03:58 +00:00
pomo Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
theme-file-child Themes: Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes. 2016-09-08 22:53:57 +00:00
theme-file-parent Themes: Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes. 2016-09-08 22:53:57 +00:00
themedir1 I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2020-10-20 16:03:58 +00:00
uploads Ensure svn:eol-style is consistently set for all files (part 2). 2019-10-25 19:27:49 +00:00
WPHTTP-testcase-redirection-script.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00