Plugin Directory

Changeset 1989422


Ignore:
Timestamp:
12/08/2018 06:16:38 PM (7 years ago)
Author:
al5dy
Message:

Update translations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • yamap-block-gutenberg/trunk/yamap-block-gutenberg.php

    r1989393 r1989422  
    122122            'editor_style'  => 'guyamap-editor-style'
    123123        ) );
    124        
     124
    125125
    126126        if(function_exists('wp_set_script_translations')) {
     
    142142            $locale_data = $this->get_jed_locale_data( 'guyamap' );
    143143            wp_add_inline_script(
    144                 'wp-i18n',
    145                 'wp.i18n.setLocaleData( ' . json_encode( $locale_data ) . ',  \'guyamap\' );'
     144                'guyamap-editor-script',
     145                '(function( translations ){translations.locale_data.messages[""].domain = "guyamap";wp.i18n.setLocaleData( translations.locale_data.messages, "guyamap" );})({"domain": "messages","locale_data": {"messages": ' . json_encode( $locale_data ) . '}});',
     146                'before'
    146147            );
    147148
Note: See TracChangeset for help on using the changeset viewer.