Index: trunk/extensions/Score/Score.i18n.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | 'score-invalidoggoverride' => 'The file you specified with override_ogg is invalid. Please specify the file name only, omit <nowiki>[[…]]</nowiki> and the "File:" prefix.', |
42 | 42 | 'score-noabcinput' => 'ABC source file $1 could not be created.', |
43 | 43 | 'score-nofactory' => 'Failed to create LilyPond factory directory.', |
| 44 | + 'score-noimages' => 'No score images were generated. Please check your score code.', |
44 | 45 | 'score-noinput' => 'Failed to create LilyPond input file $1.', |
45 | 46 | 'score-noogghandler' => 'Ogg/Vorbis conversion requires an installed and configured OggHandler extension, see [//www.mediawiki.org/wiki/Extension:OggHandler Extension:OggHandler].', |
46 | 47 | '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 @@ |
76 | 77 | 'score-invalidoggoverride' => 'Displayed if the file specified with the override_ogg="…" attribute is invalid.', |
77 | 78 | '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.', |
78 | 79 | 'score-nofactory' => 'Displayed if the LilyPond/ImageMagick working directory cannot be created.', |
| 80 | + 'score-noimages' => 'Displayed if no score images were rendered.', |
79 | 81 | 'score-noinput' => 'Displayed if the LilyPond input file cannot be created. $1 is the path to the input file.', |
80 | 82 | 'score-noogghandler' => 'Displayed if Ogg/Vorbis rendering was requested without the OggHandler extension installed.', |
81 | 83 | '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 @@ |
330 | 330 | ) ); |
331 | 331 | } |
332 | 332 | } 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' ) ); |
336 | 335 | } |
337 | 336 | if ( $options['midi'] ) { |
338 | 337 | $link = Html::rawElement( 'a', array( 'href' => $midiPath ), $link ); |