Make WordPress Core


Ignore:
Timestamp:
11/08/2018 11:33:46 AM (6 years ago)
Author:
herregroen
Message:

I18N: Set translations for all WordPress packages scripts.

Calls wp_set_script_translations for all packages scripts that have translations. Also correctly sets the domain on the translations.

Props omarreiss, pento, ocean90.
Fixes #45161.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/class.wp-scripts.php

    r43859 r43878  
    533533
    534534        $output = '(function( translations ){' .
    535                       'wp.i18n.setLocaleData( translations.locale_data, "' . $domain . '" );' .
     535                      'translations.locale_data.messages[""].domain = "' . $domain . '";' .
     536                      'wp.i18n.setLocaleData( translations.locale_data.messages, "' . $domain . '" );' .
    536537                  '})(' . $json_translations . ');';
    537538
Note: See TracChangeset for help on using the changeset viewer.