Ticket #57: local-scripts.diff
| File local-scripts.diff, 1.4 KB (added by momo360modena, 2 years ago) |
|---|
-
scripts/recheck-warnings.php
10 10 $warnings = GP::$translation_warnings->check( $entry->singular, $entry->plural, $entry->translations, $locale ); 11 11 if ( $warnings != $entry->warnings ) { 12 12 $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"; 14 14 $translation->update( array('warnings' => $warnings) ); 15 15 } 16 16 } -
scripts/import-originals.php
12 12 $this->usage(); 13 13 } 14 14 $project = GP::$project->by_path( $this->options['p'] ); 15 if ( !$project ) $this->error( 'Project not found!');15 if ( !$project ) $this->error( __('Project not found!') ); 16 16 17 17 $translations = new PO(); 18 18 $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!') ); 20 20 21 21 GP::$original->import_for_project( $project, $translations ); 22 22 }
