Revision 5f08d366
Added by Andreas Müller over 2 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/reference/TitleWithoutYearAndAuthorHelper.java | ||
---|---|---|
172 | 172 |
seriesPart = refSeriesPart; |
173 | 173 |
if (isNumeric(refSeriesPart)){ |
174 | 174 |
seriesPart = prefixBookSeries + blank + seriesPart; |
175 |
} |
|
176 |
if (needsComma){ |
|
175 |
}else if (needsComma){ |
|
177 | 176 |
seriesPart = comma + seriesPart; |
177 |
}else if (seriesPart.matches("^\\p{L}.*")){ // |
|
178 |
//for characters we expect a space |
|
179 |
seriesPart = " " + seriesPart; |
|
178 | 180 |
} |
179 | 181 |
needsComma = true; |
180 | 182 |
} |
cdmlib-model/src/test/java/eu/etaxonomy/cdm/format/reference/NomenclaturalSourceFormatterTest.java | ||
---|---|---|
276 | 276 |
//#6496 don't show pages in nom.ref. citations |
277 | 277 |
bookSection1.setPages("35-39"); |
278 | 278 |
Assert.assertEquals("in TT., My book, ser. 2: 55. 1975", formatter.format((Reference)bookSection1, detail1)); |
279 |
//separator if not a number only |
|
280 |
// ... letter |
|
281 |
book1.setSeriesPart("S\u00E9r. 2"); |
|
282 |
Assert.assertEquals("in TT., My book S\u00E9r. 2: 55. 1975", formatter.format((Reference)bookSection1, detail1)); |
|
283 |
// ... not a letter |
|
284 |
book1.setSeriesPart("-abc2"); |
|
285 |
Assert.assertEquals("in TT., My book-abc2: 55. 1975", formatter.format((Reference)bookSection1, detail1)); |
|
279 | 286 |
} |
280 | 287 |
|
281 | 288 |
@Test |
Also available in: Unified diff
ref #9914 add space before seriesPart in nom.refs.