Making WordPress.org


Ignore:
Timestamp:
06/21/2016 09:32:38 AM (7 years ago)
Author:
ocean90
Message:

Plugin Directory: Import translations on initial commit.

See #1691.

File:
1 edited

Legend:

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

    r3507 r3515  
    8888        }
    8989
    90         parent::set_glotpress_for_plugin( $this->plugin, 'code' );
     90        $result = $this->set_glotpress_for_plugin( $this->plugin, 'code' );
     91        if ( is_wp_error( $result ) ) {
     92            throw new Exception( $result->get_error_message() );
     93        }
    9194
    9295        $branch = ( 'trunk' === $tag ) ? 'dev' : 'stable';
    93         parent::import_pot_to_glotpress_project( $this->plugin, $branch, $pot_file );
     96        $this->import_pot_to_glotpress_project( $this->plugin, $branch, $pot_file );
    9497
    95         // @todo: Import translations only once.
     98        // Import translations on initial import.
     99        if ( 'created' === $result ) {
     100            $this->import_translations_to_glotpress_project( $export_directory, $this->plugin, $branch );
     101        }
    96102    }
    97103}
Note: See TracChangeset for help on using the changeset viewer.