murdos / musicbrainz-userscripts

Collection of userscripts for MusicBrainz, by various authors
535 stars 89 forks source link

Restore work language list #536

Closed jesus2099 closed 1 year ago

jesus2099 commented 1 year ago

Load language list from /release/add page, as it is no longer available from /work/create page.

This would fix #175.

jesus2099 commented 1 year ago

the field name has changed from language_id to languages.#

I fixed and force pushed languages.0 already, when I was testing the script.

Thanks for all your helps. I will read them all now and check them later. 😁👍

jesus2099 commented 1 year ago

Currently being tested and several fixes are planned.

jesus2099 commented 1 year ago

Clever idea to simply use the select input from the release page!

I just mimicked how it was done, I would have not found it alone, maybe. :)

But now I will call /work/create?edit-work.languages.0=486, or even smaller page /dialog?path=%2Fwork%2Fcreate%3Fedit-work.languages.0%3D486 like Bitmap did, to get the full work language list, including [No lyrics], properly localised!

Ach, no, it's also loaded dynamically, there...

jesus2099 commented 1 year ago

I have changed all requested stuff, @kellnerd. :)

jesus2099 commented 1 year ago

For info, instead of work language list's [No lyrics] we have the release language list's No linguistic content which has the same key, anyway.

I prefer that rather than hard-coding [No lyrics] in the code, that would slightly break language consistency for non-English MB editors. :)

jesus2099 commented 1 year ago

I guess it's easier to merge this one. And then to merge #535. Isn't it?

kellnerd commented 1 year ago

Sure, I was just wondering about the version number, of which I don't really understand the fourth component 2023.6.30.19 and which version the other PR will get. But maybe I should simply merge this PR now and you can assign the "final" version of #535 a ".1" as the fourth number again like 2023.6.31.1 (fake date) or 2023.7.1.1 since that will probably the last release for a few months/years again.

jesus2099 commented 1 year ago

19 was for 00:19. I think currently, timestamp for the other PR is more recent, so I think it's easier to merge here first, then the other. 😉