Making WordPress.org

Changeset 10444


Ignore:
Timestamp:
11/12/2020 06:35:17 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: i18n: Run translated on-the-fly translations through the gettext filter for compatibility with other translation plugins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php

    r10443 r10444  
    471471
    472472                // The translation by ID, Original by ID, or the marker if it was never actually marking a original translation.
    473                 return $translations[ $id ] ?? ( $originals[ $id ] ?? $marker );
     473                $translation = $translations[ $id ] ?? ( $originals[ $id ] ?? $marker );
     474
     475                // Run the gettext filter for simpler compat with translation plugins.
     476                return apply_filters( 'gettext', $translation, $originals[ $id ], 'dynamic-plugin-i18n' /* fake textdomain*/ );
    474477            },
    475478            $content
Note: See TracChangeset for help on using the changeset viewer.