r107933 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107932‎ | r107933 | r107934 >
Date:20:15, 3 January 2012
Author:grafzahl
Status:ok
Tags:
Comment:
Show error message if no score images were generated.
Modified paths:
  • /trunk/extensions/Score/Score.body.php (modified) (history)
  • /trunk/extensions/Score/Score.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Score/Score.i18n.php
@@ -40,6 +40,7 @@
4141 'score-invalidoggoverride' => 'The file you specified with override_ogg is invalid. Please specify the file name only, omit <nowiki>[[…]]</nowiki> and the "File:" prefix.',
4242 'score-noabcinput' => 'ABC source file $1 could not be created.',
4343 'score-nofactory' => 'Failed to create LilyPond factory directory.',
 44+ 'score-noimages' => 'No score images were generated. Please check your score code.',
4445 'score-noinput' => 'Failed to create LilyPond input file $1.',
4546 'score-noogghandler' => 'Ogg/Vorbis conversion requires an installed and configured OggHandler extension, see [//www.mediawiki.org/wiki/Extension:OggHandler Extension:OggHandler].',
4647 'score-nomidi' => 'No MIDI file generated despite being requested. If you are working in raw LilyPond mode, make sure to provide a proper \midi block.',
@@ -75,6 +76,7 @@
7677 'score-invalidoggoverride' => 'Displayed if the file specified with the override_ogg="…" attribute is invalid.',
7778 'score-noabcinput' => 'Displayed if an ABC source file could not be created for lang="ABC". $1 is the path to the file that could not be created.',
7879 'score-nofactory' => 'Displayed if the LilyPond/ImageMagick working directory cannot be created.',
 80+ 'score-noimages' => 'Displayed if no score images were rendered.',
7981 'score-noinput' => 'Displayed if the LilyPond input file cannot be created. $1 is the path to the input file.',
8082 'score-noogghandler' => 'Displayed if Ogg/Vorbis rendering was requested without the OggHandler extension installed.',
8183 'score-nomidi' => 'Displayed if MIDI file generation was requested but no MIDI file was generated.',
Index: trunk/extensions/Score/Score.body.php
@@ -329,9 +329,8 @@
330330 ) );
331331 }
332332 } else {
333 - /* No images; this may actually happen in raw lilypond mode */
334 - self::debug( "No output images $image or $multi1!\n" );
335 - $link = 'No image';
 333+ /* No images; this may happen in raw mode or when the user omits the score code */
 334+ throw new ScoreException( wfMessage( 'score-noimages' ) );
336335 }
337336 if ( $options['midi'] ) {
338337 $link = Html::rawElement( 'a', array( 'href' => $midiPath ), $link );

Status & tagging log