Ticket #1262: zs15_fbennett_2008-12-18-1.patch

File zs15_fbennett_2008-12-18-1.patch, 1.8 KB (added by fbennett, 8 years ago)

Bugfix for pluralization failure with et al.

  • content/zotero/xpcom/csl.js

    diff -r -u chrome.orig/content/zotero/xpcom/csl.js chrome/content/zotero/xpcom/csl.js
    old new  
    2121*/ 
    2222 
    2323/* 
     24 * PATCHES: fbennett 
     25 * 
     26 * This version of cls.js reflects the following modification: 
     27 * 
     28 * (1) Fix bug in handling of label pluralizations with et al.: 
     29 *       Currently, the pluralization of labels used with names is 
     30 *     determined by the number of names in the formatted string. 
     31 *     For styles that call for showing only one name with et al., 
     32 *     this causes a singular label to be used in this case 
     33 *     (i.e. "John Doe et al. ed." rather than "John Doe et al. eds."). 
     34 * 
     35 *     The fbennett (1) change below addresses this issue. 
     36 */ 
     37 
     38 
     39/* 
    2440 * CSL: a class for creating bibliographies from CSL files 
    2541 * this is abstracted as a separate class for the benefit of anyone who doesn't 
    2642 * want to use the Scholar data model, but does want to use CSL in JavaScript 
     
    694710                                                } 
    695711                                        } else if(formattedString.format != "Sort" &&  
    696712                                                        name == "label" && variables[j] != "author") { 
    697                                                 newString.append(this._getTerm(variables[j], (maxCreators != 1), child["@form"].toString(), child["@include-period"] == "true"), child); 
     713/* 
     714 * fbennett (1): Force names with et al. to plural 
     715 */ 
     716                                               newString.append(this._getTerm(variables[j], (maxCreators != 1 || useEtAl), child["@form"].toString(), child["@include-period"] == "true"), child); 
     717/* 
     718 * fbennett: end 
     719 */ 
    698720                                        } 
    699721                                } 
    700722                                success = true;