Ticket #57: local-scripts.diff

File local-scripts.diff, 1.4 KB (added by momo360modena, 2 years ago)

Changes in scripts

  • scripts/recheck-warnings.php

     
    1010                        $warnings = GP::$translation_warnings->check( $entry->singular, $entry->plural, $entry->translations, $locale ); 
    1111                        if ( $warnings != $entry->warnings ) { 
    1212                                $translation = new GP_Translation( array('id' => $entry->id) ); 
    13                                 echo "Updating warnings for $entry->id\n"; 
     13                                echo sprintf( __("Updating warnings for %s"), $entry->id ) . "\n"; 
    1414                                $translation->update( array('warnings' => $warnings) ); 
    1515                        } 
    1616                } 
  • scripts/import-originals.php

     
    1212                        $this->usage(); 
    1313                } 
    1414                $project = GP::$project->by_path( $this->options['p'] ); 
    15                 if ( !$project ) $this->error( 'Project not found!' ); 
     15                if ( !$project ) $this->error( __('Project not found!') ); 
    1616                 
    1717                $translations = new PO(); 
    1818                $translations->import_from_file( $this->options['f'] ); 
    19                 if ( !$translations ) $this->error( 'Error importing from POT file!' ); 
     19                if ( !$translations ) $this->error( __('Error importing from POT file!') ); 
    2020                 
    2121                GP::$original->import_for_project( $project, $translations ); 
    2222        }