Issue Details (XML | Word | Printable)

Key: MBS-1798
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Kuno Woudt
Reporter: nikki
Votes: 17
Watchers: 10
Operations

If you were logged in you would be able to see more operations.
MusicBrainz Server

Lyrics language for works

Created: 02/May/11 02:42 AM   Updated: 21/Jun/12 07:11 AM   Resolved: 15/May/12 07:40 PM
Component/s: Schema Change
Affects Version/s: None
Fix Version/s: Schema change, 2012-05-15

Issue Links:
Depends
Relates
 


 Description  « Hide

I thought I'd already made a ticket for this, but it seems I haven't.

I think it would be nice if works had a language attribute corresponding to the lyrics language. It would let us do several things:
1. For "X is a translated version of Y", we would know the source and target languages and in theory we could display that when showing that relationship.
2. Picard could enter correct data in the TLAN frame, instead of assuming the tracklist language is the same as the lyrics language.
3. We could use the code zxx ("No linguistic content") to mark works with no lyrics, i.e. instrumentals. (this doesn't give us a way to say something is an instrumental performance of a work that normally has lyrics, but it's a start).



Sort Order: Ascending order - Click to sort in descending order
Benji99 added a comment - 19/May/11 01:08 AM

I agree. Furthermore, there should be an option transliteration lyrics (IE: Japanese lyrics written in Romaji rather than Japanese script)


nikki added a comment - 19/May/11 06:01 AM

Benji99: I think you've misunderstood what this ticket is for. It's about the language the lyrics are sung in. How they're written down depends on the release the song is used on (a work can be used for numerous recordings on numerous releases).


Johannes Weißl added a comment - 06/Aug/11 04:48 AM

+1 This would make works much for useful!


patate12 added a comment - 08/Aug/11 07:45 AM

OK for a language but I disagree on using this to determine if it's an instrumental because I call this a hack.

What would we do with scat songs ?
These are sung (→not instrumental), but no language.
So we would set them not as MBS-2766 type instrumental (either song or new type "scat").
And set the MBS-1798 language as "none".

For instrumental we need a new type (MBS-2766), not hacking this new language attribute.


Johannes Weißl added a comment - 08/Aug/11 07:52 AM

But the "instrumental" is orthogonal to all other types, isn't it? Every current work type can either be instrumental or not, so it is wrong to add it as new type. If the language hack really isn't sufficient (I personally haven't thought about songs with vocals but no language), it should be an attribute of the work (like language), but not a new type. What do you think?


T Dilation added a comment - 17/Aug/11 12:01 PM

It'd be great if multiple languages could be specified. I can think of a few examples where more than one language is used on the same track.


patate12 added a comment - 24/Oct/11 08:31 AM

Please an admin unlink MBS-2766 as it is unrelated.


Robert Kaye added a comment - 18/Nov/11 07:04 AM

I support the idea of implemeting MBS-3296 instead of this. With the dynamic work types we could simply create an attribute "lyrics language" among a whole bunch of things that would make works finally useful.


nikki added a comment - 18/Nov/11 10:45 AM

Will MBS-3296 let us use other tables in the database as a list of possible values for that attribute then?


Oliver Charles added a comment - 28/Dec/11 12:14 AM

Setting due date based on when this task was moved to 12mo bucket.


nikki added a comment - 06/Mar/12 12:53 AM

As per http://blog.musicbrainz.org/?p=1301 :

I'm not aware of any objections to storing the lyrics language of a work. This ticket has a number of votes and comments, so I'll take that to mean there is a consensus that we should implement it in some form.

My proposal is:

We should be able to specify a language for a work which will represent the primary lyrics language. The available languages should be taken from the existing language table. As with release languages, the ISO 639-2/T code (language.iso_code_3t) should be used when displaying the full name of the language isn't desirable (e.g. in the WS or where space is limited).

The language should be settable from the add work (/work/create) or edit work (/work/MBID/edit) page.
The language should be shown as part of the add work and edit work edits when the language is being added, edited or removed.
The language should be shown on the work page (/work/MBID) in the sidebar.
The language should be shown in the works table for an artist (/artist/MBID/works).
The language should be returned in any relevant WS queries (e.g. anywhere that other work attributes such as ISWC or type would be included should also include the language)

I don't know what supporting documentation, if any, would be needed.

Notes:

1. I don't think we should implement multiple languages right now since it's more complex and opens up more issues. That doesn't mean we can't do it later on (once we have some actual experience dealing with such cases). The upgrade path for such a change in the future (once we know how we want it to work) should be fairly straightforward. This is also consistent with how we currently handle release languages.

2. Whether or not zxx should be used for instrumentals is an issue for the style list.

3. Support for multiple languages, Picard support and any improvements to the display should be given separate tickets if this is accepted as it is.

4. This would be best implemented alongside MBS-1799, but does not depend on it.


Valeriy Orlov added a comment - 17/Mar/12 09:56 AM

I completely agree with this ticket.
About showing the language of work. It would be very useful to show the work's language also:
1) on the release's page (/release/MBID) for the recordings on the work's title line in brackets after the title itself:
performance of: Work Title (Language)
2) on the recording's page (/recording/MBID):
in the section "Relationships":
performance of: Work Title (Date, Language)
or in the section "Related works" as a line after writer's line(s):
language: Language


Frederic Da Vitoria added a comment - 18/Mar/12 12:02 PM

I agree that a way to set a language for a Work is important, but I also agree with T Dilation that one language will sometimes not be enough.

Also, Robert's idea of implementing it as dynamic attributes is elegant, but Nikki is right that it should be used only if dynamic attributes values can be limited to the values from a reference table.


Robert Kaye added a comment - 19/Mar/12 09:15 PM

This ticket is under consideration for the May 15h schema change release. However, it is under specified at this point in time. In order to keep this ticket in consideration for the release, please do the following:

  • Specify exactly what the user interface changes will be. Mock ups would be great. Due date: April 2
  • Specify exactly what the database changes will be. We will need to have an exact database table change proposal. Exactly which columns will be added/removed/modified and what new tables will be created. If you cannot specify the changes to be done, chase down a developer to specify them for you. Due date: March 26
  • This ticket is considered contentious and requires more community review. I will post a blog entry highlighting this ticket for more review.

nikki added a comment - 19/Mar/12 10:59 PM

User interface changes: Copy the display of "Type" in all the places I already specified.

Database changes: Add one column to the work table (call it whatever you like). Add a foreign key linking the new column to language.id.


Philip Jägenstedt added a comment - 20/Mar/12 04:31 PM

I think this would be a useful addition, I've been doing this with tags vocal-lang-* up until now, see e.g. this song in Mandarin and Cantonese:
http://musicbrainz.org/recording/3303f828-d459-4d81-a3c1-bc41413900db
http://musicbrainz.org/recording/0945051f-4c02-4019-9386-08b18543e7dc

These are also recordings that I've tagged as being in multiple languages, e.g. http://musicbrainz.org/recording/0abc13b3-06aa-44ec-82fd-d16cb98a040c

For at least Chinese, ISO 639-3 is a must, since the distinction to be made is between Mandarin, Cantonese and Taiwanese, not between the writing systems (simplified or traditional Chinese).


nikki added a comment - 20/Mar/12 05:55 PM

Chinese is exactly what I was thinking of when I said this would be best implemented alongside MBS-1799. I already included those three when I was listing some codes to enable straightaway, if you have any more it would be best to add them to that ticket.


Alexander Dupuy added a comment - 21/Mar/12 05:18 AM

Note that as an interim solution for multiple languages, the ISO 639-2/-3 code "mul" for multiple languages can be used, just as it is for track listings.


Lukáš Lalinský added a comment - 21/Mar/12 08:20 AM

I don't think this necessarily needs to wait for the dynamic attributes. Migrating it later should be easy enough.


Oliver Charles added a comment - 27/Mar/12 11:50 AM

If nikki is suggesting the following:

ALTER TABLE work ADD COLUMN language INTEGER;
ALTER TABLE work ADD CONSTRAINT work_fk_language FOREIGN KEY (language) REFERENCES language (id);

Then this seems fine.


Robert Kaye added a comment - 02/Apr/12 06:58 PM

This ticket is in danger of being rejected from the upcoming schema change release. Please provide UI mock-ups today.


Nicolás Tamargo added a comment - 02/Apr/12 07:44 PM

As nikki already said earlier: "User interface changes: Copy the display of "Type" in all the places I already specified."

Those places are:

The language should be settable from the add work (/work/create) or edit work (/work/MBID/edit) page. (so, dropdown like the Type one)
The language should be shown as part of the add work and edit work edits when the language is being added, edited or removed. (so, as with Type)
The language should be shown on the work page (/work/MBID) in the sidebar. (so, as with Type)
The language should be shown in the works table for an artist (/artist/MBID/works). (so, as with Type - although I guess the table is a bit crammed, but a two/three-letter column for language codes should be enough if there's no space)
The language should be returned in any relevant WS queries (e.g. anywhere that other work attributes such as ISWC or type would be included should also include the language)


Oliver Charles added a comment - 03/Apr/12 11:23 AM

I feel this ticket is well defined (in terms of the DB and the UI) to be included as is.


Oliver Charles added a comment - 03/Apr/12 11:33 AM

How will this be shown in the web service? Will we use a <language> element, which has previously been for the language of written text rather than content, or do we introduce a new element?


Paul Taylor added a comment - 09/May/12 10:13 AM

Searching for work by language is failing with stack trace ,

http://test.musicbrainz.org/search?query=lang%3Ajpn&type=work&limit=25&method=advanced

gives

Attribute (language) does not pass the type constraint because: Validation failed for 'Language' with value "jpn" at constructor MusicBrainz::Server::Entity::Work::new (defined at lib/MusicBrainz/Server/Entity/Work.pm line 84) line 87
MusicBrainz::Server::Entity::Work::new('MusicBrainz::Server::Entity::Work', 'HASH(0xc895318)') called at lib/MusicBrainz/Server/Data/Search.pm line 593
.....

(underlying search works correctly http://test.musicbrainz.org/ws/2/work/?query=lang:jpn)