Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFixes U #1332
Conversation
owcz
and others
added some commits
Mar 13, 2017
zuphilip
referenced this pull request
Jun 17, 2017
Open
Spanish author names break splitting multiple authors heuristic in EM translators #1333
adam3smith
reviewed
Jun 22, 2017
Some small requests & questions |
translator.setTranslator("951c027d-74ac-47d4-a107-9c3069ab7b48"); | ||
translator.setHandler("itemDone", function(obj, item) { | ||
var type = ZU.xpathText(doc, '//meta[@name="DC.type"]/@content'); | ||
if (itemTypes[type]!=null) item.itemType = itemTypes[type]; |
This comment has been minimized.
This comment has been minimized.
@@ -96,8 +139,13 @@ var testCases = [ | |||
"creatorType": "author" | |||
}, | |||
{ | |||
"firstName": "Miguel Angel", | |||
"lastName": "Ahumada Sempoal", | |||
"firstName": "Ahumada", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jun 22, 2017
Collaborator
how confident are you that we can fix the author issue in EM? Seems a bit tricky because we do also find multiple creators in a single DC tag. If we think it might be hard to fix in EM, we'll probably want to parse authors here separately. Your call -- I don't mind taking this while we're working on EM.
This comment has been minimized.
This comment has been minimized.
zuphilip
Jun 22, 2017
Author
Collaborator
I am not sure if we can , but it would make most sense to try to fix this in EM translator. Therefore I created this issue #1333 to think further afterwards/besides. In the example here we have 9 DC tags each contains only one comma. This could also influence whether to split things up.
if (creators[i].indexOf(", ")>-1) { | ||
item.creators.push(ZU.cleanAuthor(creators[i], "author")); | ||
} else { | ||
item.creators.push({'lastName': creators[i], 'creatorType': 'author'}); |
This comment has been minimized.
This comment has been minimized.
"title": "The Struggle for Trade Union Democracy, December 1947", | ||
"creators": [ | ||
{ | ||
"lastName": "Supreme Commander for the Allied Powers. Economic and Scientific Section. Director for Labor. Labor Division. 8/22/1949-4/28/1952 ", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jun 22, 2017
Collaborator
are we sure author fields of that length don't break sync? @dstillman -- what's the max length for creators in sync?
Can
This comment has been minimized.
This comment has been minimized.
zuphilip
Jun 24, 2017
Author
Collaborator
I tried it out. The maximum length for this field which still will sync is 255. I will check that and shorten if needed.
"title": "Alien Case File for Francisca Torre Vda De Garcia", | ||
"creators": [ | ||
{ | ||
"lastName": "Department of Justice. Immigration and Naturalization Service. 6/14/1940-3/1/2003 ", |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jun 22, 2017
Collaborator
looking at these examples, we should at least be able to remove the dates, no?
This comment has been minimized.
This comment has been minimized.
Please have a look at the new version. |
adam3smith
merged commit 4067d6b
into
zotero:master
Jun 24, 2017
1 check passed
This comment has been minimized.
This comment has been minimized.
Thanks! |
zuphilip commentedJun 17, 2017
I included and expand the fix #1267 by @owcz for USgamer.