www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 9c7d3c3c4e022927549e551c33cb16fb0a602248
parent f9978e8f026fa16315a76cfe3359bfef27de4f46
Author: aurimasv <aurimas.dev@gmail.com>
Date:   Sun, 27 Jan 2013 05:24:58 -0600

Consider type-specific "title" alternatives for validating web translations

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -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;