Merge pull request #237 from aurimasv/web-title
Consider type-specific "title" alternatives for validating web translations
This commit is contained in:
commit
548a6db761
1 changed files with 4 additions and 0 deletions
|
@ -578,6 +578,10 @@ Zotero.Translate.Sandbox = {
|
|||
item.accessDate = "CURRENT_TIMESTAMP";
|
||||
}
|
||||
|
||||
//consider type-specific "title" alternatives
|
||||
var altTitle = Zotero.ItemFields.getName(Zotero.ItemFields.getFieldIDFromTypeAndBase(item.itemType, 'title'));
|
||||
if(altTitle && item[altTitle]) item.title = item[altTitle];
|
||||
|
||||
if(!item.title) {
|
||||
translate.complete(false, new Error("No title specified for item"));
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue