Score by default returns a rather large error message when it can't format the value.
Instead of returning that to the user we want to return a single string i18n message.
Instead of:
Just return "Unable to compile LilyPond input file"
Addshore | |
Feb 5 2019, 4:21 PM |
F28240197: image.png | |
Feb 18 2019, 3:00 PM |
F28127610: image.png | |
Feb 5 2019, 4:21 PM |
Score by default returns a rather large error message when it can't format the value.
Instead of returning that to the user we want to return a single string i18n message.
Instead of:
Just return "Unable to compile LilyPond input file"
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
beautify lilypond error message output | mediawiki/extensions/Score | master | +125 -7 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T198233 Allow musical notation to be expressed in Wikidata, with rendering and maybe playback | |||
Open | None | T91505 [Epic] Adding new datatypes to Wikidata (tracking) | |||
Resolved | Lydia_Pintscher | T208489 [Story] Create LilyPond datatype | |||
Resolved | • alaa_wmde | T215287 Return nice error messages from Score extension when Lilypond formatting fails |
The current error message is not user-friendly indeed, but dropping the line
.../file.ly:12:9: error: unrecognized string, not in text script or \lyricmode safkjsanfkjsfjsafsaf
would make finding the error a lot harder, so this should be preserved somehow (the best would be to convert the line/column numbers so that they correspond to the position of the error in the wikitext).
I came up with this so far.. it looks nicer and more concise (the code is the opposite 😄 but will try to improve some stuff)
Change 491261 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Score@master] beautify lilypond error message output
Change 491261 merged by jenkins-bot:
[mediawiki/extensions/Score@master] beautify lilypond error message output