WordPress/wp-includes/l10n
Pascal Birchler 3af51954e0 I18N: Improve singular lookup of pluralized strings.
Ensures that string lookup in MO files only uses the singular string.

This matches expected behavior with gettext files and improves compatibility for cases where for example both `__( 'Product' )` and `_n( 'Product', 'Products’, num )` are used in a project, where both will use the same translation for the singular version. Maintains backward compatibility and feature parity with the pomo library and the PHP translation file format.

Replaces [57386], which was reverted in [57505], with a more accurate and performant solution.

See #59656.
Built from https://develop.svn.wordpress.org/trunk@57513


git-svn-id: http://core.svn.wordpress.org/trunk@57014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 11:45:16 +00:00
..
class-wp-translation-controller.php I18N: Rename WP_Translation_Controller::instance() method to get_instance(). 2024-01-25 07:53:17 +00:00
class-wp-translation-file-mo.php I18N: Improve singular lookup of pluralized strings. 2024-02-01 11:45:16 +00:00
class-wp-translation-file-php.php I18N: Improve singular lookup of pluralized strings. 2024-02-01 11:45:16 +00:00
class-wp-translation-file.php I18N: Revert [57386] pending further investigation. 2024-01-31 21:51:14 +00:00
class-wp-translations.php I18N: Improve singular lookup of pluralized strings. 2024-02-01 11:45:16 +00:00