Making WordPress.org


Ignore:
Timestamp:
06/21/2016 09:32:38 AM (10 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-readme-import.php

    r3507 r3515  
    3939         */
    4040        public function import_from_tag( $tag ) {
    41                 global $wpdb;
    42 
    4341                $files = SVN::ls( self::PLUGIN_SVN_BASE . "/{$this->plugin}/{$tag}" );
    4442                if ( ! $files ) {
    … …  
    151149                }
    152150
    153                 parent::set_glotpress_for_plugin( $this->plugin, 'readme' );
     151                $result = $this->set_glotpress_for_plugin( $this->plugin, 'readme' );
     152                if ( is_wp_error( $result ) ) {
     153                        throw new Exception( $result->get_error_message() );
     154                }
    154155
    155156                $branch = ( 'trunk' === $tag ) ? 'dev' : 'stable';
    156                 parent::import_pot_to_glotpress_project( $this->plugin, $branch, $pot_file, $str_priorities );
     157                $this->import_pot_to_glotpress_project( $this->plugin, $branch, $pot_file, $str_priorities );
    157158        }
    158159
    … …  
    166167         * @return array
    167168         */
    168         function handle_translator_comment( $array, $key, $val ) {
     169        private function handle_translator_comment( $array, $key, $val ) {
    169170                $val = trim( preg_replace( '/[^a-z0-9]/i', ' ', $val ) ); // cleanup key names for display.
    170171
Note: See TracChangeset for help on using the changeset viewer.