MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

Fix typo, follow up to #23473

Open Jojo-Schmitz opened this issue 1 year ago • 6 comments

We changed the style tag "Spatium" into "spatium" in #23473, but still write "Spatium" hard coded into the style files, this PR fixes that. On reading we already read both, so no extra action needed.

Jojo-Schmitz avatar Aug 14 '24 13:08 Jojo-Schmitz

Unfortunately now 545 occurences in unit test files would need to get amended, any clever idea how to not have to do it manually?

Sledghammer approach: find . -name '*-ref.mscx' -exec sed -i s/Spatium/spatium/ {} \; changed 363 of them

Jojo-Schmitz avatar Aug 14 '24 14:08 Jojo-Schmitz

Maybe something with a regular expression, to replace <Spatium>([0-9]+[.]?[0-9]*)</Spatium> with <spatium>$1</spatium>. I think you can do that in Visual Studio Code. There you can also specify that it should only look in *.mscz,*.mscx files.

cbjeukendrup avatar Aug 14 '24 15:08 cbjeukendrup

Hmm, let's see whether find . -name '*ref.mscx' -exec sed -i 's/Spatium>/spatium>/g' {} \; is any better... (changed 434 files)

Jojo-Schmitz avatar Aug 14 '24 15:08 Jojo-Schmitz

Better: for f in $(find . -name '*.mscx' | xargs grep -l 'museScore version="4.40"'); do sed -i 's/Spatium>/spatium>/g' $f; done, i.e. replacing "Spatium>" with "spatium>" in all 4.4 mscx files, 546 files, 674 occurences, yes, more than immediatelly needed, but should be on the futur-proof side.

Jojo-Schmitz avatar Aug 14 '24 16:08 Jojo-Schmitz

Any news about this? Should it go into 4.4? Or into 4.5, and if so along with bumping the mscVersion?

I suspect a lot of bit rot on this one the longer it sits unmerged, i.e. more failing unit tests... (Let's see what a rebase shows. Edit: indeed one more score to fix)

Jojo-Schmitz avatar Aug 21 '24 07:08 Jojo-Schmitz

No, it shouldn't go into 4.4. We'll have to wait for @mike-spa to review it first

RomanPudashkin avatar Aug 21 '24 08:08 RomanPudashkin

Rebased (to fix merge conflict) and refreshed (to include scores added since) Please consider a timely merge...

Jojo-Schmitz avatar Oct 09 '24 11:10 Jojo-Schmitz

How far back is MuseScore accepting <spatium> (not capitalized) on input? (Roughly)

I only ask because I've written a .mss exporter for Finale, and I will change it to emit <spatium> if it is recognized a reasonable number of versions back.

rpatters1 avatar Oct 10 '24 00:10 rpatters1

Since 4.4.0, some 3 months ago But <Spatium> is still accepted, so no need to change your exporter, it is now just not written anymore

Jojo-Schmitz avatar Oct 10 '24 05:10 Jojo-Schmitz