Localize et al. in the middle pane

(Heromyth's PR #358, #360, #361)
This commit is contained in:
gracile-fr 2013-08-15 23:15:02 +02:00
parent 723e8a4e30
commit f3137099bc
3 changed files with 6 additions and 4 deletions

View file

@ -204,7 +204,7 @@ Zotero.Item.prototype.getField = function(field, unformatted, includeBaseMapped)
} else if(creators.length === 2) { } else if(creators.length === 2) {
return creators[0].ref.lastName+" "+Zotero.getString('general.and')+" "+creators[1].ref.lastName; return creators[0].ref.lastName+" "+Zotero.getString('general.and')+" "+creators[1].ref.lastName;
} else if(creators.length > 3) { } else if(creators.length > 3) {
return creators[0].ref.lastName+" et al." return creators[0].ref.lastName+" "+Zotero.getString('general.etAl');
} }
} else if (field === 'id' || Zotero.Items.isPrimaryField(field)) { } else if (field === 'id' || Zotero.Items.isPrimaryField(field)) {
var privField = '_' + field; var privField = '_' + field;

View file

@ -628,6 +628,7 @@ Zotero.Items = new function() {
/* This whole block is to get the firstCreator */ /* This whole block is to get the firstCreator */
var localizedAnd = Zotero.getString('general.and'); var localizedAnd = Zotero.getString('general.and');
var localizedEtAl = Zotero.getString('general.etAl');
var sql = "COALESCE(" + var sql = "COALESCE(" +
// First try for primary creator types // First try for primary creator types
"CASE (" + "CASE (" +
@ -665,7 +666,7 @@ Zotero.Items = new function() {
"LEFT JOIN itemTypeCreatorTypes ITCT " + "LEFT JOIN itemTypeCreatorTypes ITCT " +
"ON (IC.creatorTypeID=ITCT.creatorTypeID AND ITCT.itemTypeID=I.itemTypeID) " + "ON (IC.creatorTypeID=ITCT.creatorTypeID AND ITCT.itemTypeID=I.itemTypeID) " +
"WHERE itemID=I.itemID AND primaryField=1 ORDER BY orderIndex LIMIT 1)" + "WHERE itemID=I.itemID AND primaryField=1 ORDER BY orderIndex LIMIT 1)" +
" || ' et al.' " + " || ' " + localizedEtAl + "' " +
") " + ") " +
"END, " + "END, " +
@ -691,7 +692,7 @@ Zotero.Items = new function() {
"SELECT " + "SELECT " +
"(SELECT lastName FROM itemCreators NATURAL JOIN creators NATURAL JOIN creatorData " + "(SELECT lastName FROM itemCreators NATURAL JOIN creators NATURAL JOIN creatorData " +
"WHERE itemID=I.itemID AND creatorTypeID IN (3) ORDER BY orderIndex LIMIT 1)" + "WHERE itemID=I.itemID AND creatorTypeID IN (3) ORDER BY orderIndex LIMIT 1)" +
" || ' et al.' " + " || ' " + localizedEtAl + "' " +
") " + ") " +
"END, " + "END, " +
@ -717,7 +718,7 @@ Zotero.Items = new function() {
"SELECT " + "SELECT " +
"(SELECT lastName FROM itemCreators NATURAL JOIN creators NATURAL JOIN creatorData " + "(SELECT lastName FROM itemCreators NATURAL JOIN creators NATURAL JOIN creatorData " +
"WHERE itemID=I.itemID AND creatorTypeID IN (2) ORDER BY orderIndex LIMIT 1)" + "WHERE itemID=I.itemID AND creatorTypeID IN (2) ORDER BY orderIndex LIMIT 1)" +
" || ' et al.' " + " || ' " + localizedEtAl + "' " +
") " + ") " +
"END" + "END" +
") AS firstCreator"; ") AS firstCreator";

View file

@ -30,6 +30,7 @@ general.no = No
general.passed = Passed general.passed = Passed
general.failed = Failed general.failed = Failed
general.and = and general.and = and
general.etAl = et al.
general.accessDenied = Access Denied general.accessDenied = Access Denied
general.permissionDenied = Permission Denied general.permissionDenied = Permission Denied
general.character.singular = character general.character.singular = character