Skip to content

Commit

Permalink
[EM] Don't include tags unless called as a child translator
Browse files Browse the repository at this point in the history
  • Loading branch information
aurimasv committed Nov 13, 2014
1 parent 57c02d6 commit 7af44c3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Embedded Metadata.js
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2014-08-15 02:36:16"
"lastUpdated": "2014-11-13 09:26:43"
}

/*
Expand Down Expand Up @@ -711,7 +711,7 @@ function finalDataCleanup(doc, newItem) {
* This will deal with multiple tags, some of them comma delimited,
* some semicolon, some individual
*/
if (newItem.tags.length) {
if (newItem.tags.length && !Zotero.parentTranslator) {

This comment has been minimized.

Copy link
@fbennett

fbennett Nov 14, 2014

Contributor

Is this backwards?

This comment has been minimized.

Copy link
@adam3smith

adam3smith Nov 14, 2014

Collaborator

yup, I'm fixing it.

This comment has been minimized.

Copy link
@aurimasv

aurimasv Nov 14, 2014

Author Contributor

ooops

var tags = [];
for (var i in newItem.tags) {
newItem.tags[i] = newItem.tags[i].trim();
Expand All @@ -726,6 +726,10 @@ function finalDataCleanup(doc, newItem) {
if (tags[i] === "") tags.splice(i, 1);
}
newItem.tags = tags;
} else {
// Unless called from another translator, don't include automatic tags,
// because most of the time they are not right
newItem.tags = [];
}

//Cleanup DOI
Expand Down Expand Up @@ -857,7 +861,7 @@ var testCases = [
],
"date": "2011/10/17",
"DOI": "10.4314/thrb.v13i4.63347",
"ISSN": "1821 0 9241",
"ISSN": "1821-9241",
"abstractNote": "Knowledge, treatment seeking and preventive practices in respect of malaria among patients with HIV at the Lagos University Teaching Hospital",
"extra": "The synergistic interaction between Human Immunodeficiency virus (HIV) disease and Malaria makes it mandatory for patients with HIV to respond appropriately in preventing and treating malaria. Such response will help to control the two diseases. This study assessed the knowledge of 495 patients attending the HIV clinic, in Lagos University Teaching Hospital, Nigeria.  Their treatment seeking, preventive practices with regards to malaria, as well as the impact of socio – demographic / socio - economic status were assessed. Out of these patients, 245 (49.5 %) used insecticide treated bed nets; this practice was not influenced by socio – demographic or socio – economic factors.  However, knowledge of the cause, knowledge of prevention of malaria, appropriate use of antimalarial drugs and seeking treatment from the right source increased with increasing level of education (p < 0.05). A greater proportion of the patients, 321 (64.9 %) utilized hospitals, pharmacy outlets or health centres when they perceived an attack of malaria. Educational intervention may result in these patients seeking treatment from the right place when an attack of malaria fever is perceived.",
"issue": "4",
Expand Down Expand Up @@ -1207,7 +1211,7 @@ var testCases = [
},
{
"type": "web",
"url": "http://www.volokh.com/2013/12/22/northwestern-cant-quit-asa-boycott-member/",
"url": "http://volokh.com/2013/12/22/northwestern-cant-quit-asa-boycott-member/",
"items": [
{
"itemType": "blogPost",
Expand All @@ -1222,9 +1226,8 @@ var testCases = [
"date": "12/22/2013",
"abstractNote": "Northwestern University recently condemned the American Studies Association boycott of Israel. Unlike some other schools that quit their institutional membership in the ASA over the boycott, Northwestern has not. Many of my Northwestern colleagues were about to start urging a similar withdrawal.\nThen we learned from our administration that despite being listed as in institutional member by the ASA, the university has, after checking, concluded it has no such membership, does not plan to get one, and is unclear why the ASA would list us as institutional member.\nApparently, at least several other schools listed by the ASA as institutional members say they have no such relationship.\nThe ASA has been spending a great deal of energy on political activism far from its mission, but apparently cannot keep its books in order. The association has yet to explain how it has come to list as institutional members so many schools that know nothing about such a membership. The ASA’s membership rolls may get much shorter in the coming weeks even without any quitting.\nHow this confusion came to arise is unclear. ASA membership, like that of many academic organizations, comes with a subscription to their journal. Some have suggested that perhaps the ASA also counts as members any institution whose library happened to subscribe to the journal, ie tacking on membership to a subscription, rather than vice versa. This would not be fair on their part. A library may subscribe to all sorts of journals for academic research purposes (ie Pravda), without endorsing the organization that publishes it. That is the difference between subscription and membership.\nI eagerly await the ASA’s explanation of the situation. [...]",
"accessDate": "CURRENT_TIMESTAMP",
"libraryCatalog": "www.volokh.com",
"publicationTitle": "The Volokh Conspiracy",
"url": "http://www.volokh.com/2013/12/22/northwestern-cant-quit-asa-boycott-member/",
"blogTitle": "The Volokh Conspiracy",
"url": "http://volokh.com/2013/12/22/northwestern-cant-quit-asa-boycott-member/",
"attachments": [
{
"title": "Snapshot"
Expand Down

0 comments on commit 7af44c3

Please sign in to comment.