short_options .= 'f:'; $this->usage = '-f ' . $this->usage . ' [--disable-propagating]'; parent::__construct(); } function action_on_translation_set( $translation_set ) { $po = new PO(); $po->import_from_file( $this->options['f'] ); $disable_propagating = isset( $this->options['disable-propagating'] ); if ( $disable_propagating ) { add_filter( 'enable_propagate_translations_across_projects', '__return_false' ); } $added = $translation_set->import( $po ); if ( $disable_propagating ) { remove_filter( 'enable_propagate_translations_across_projects', '__return_false' ); } printf( _n( "%s translation were added\n", "%s translations were added\n", $added ), $added ); } } $gp_script_import = new GP_Script_Import; $gp_script_import->run();