Fix punctuation for authors list in russian localization

Submitted by:   murray (slightly modified)
Discussed with: doceng (blackend, murray)
This commit is contained in:
Denis Peplin 2004-08-27 11:20:55 +00:00
parent ccec2a1da2
commit dc2e46123b
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=22136

View file

@ -2,7 +2,7 @@
The FreeBSD Russian Documentation Project
$FreeBSD$
$FreeBSDru: frdp/doc/ru_RU.KOI8-R/share/sgml/freebsd.dsl,v 1.11 2004/08/10 12:25:56 den Exp $
$FreeBSDru: frdp/doc/ru_RU.KOI8-R/share/sgml/freebsd.dsl,v 1.12 2004/08/27 11:17:52 den Exp $
Original revision: 1.20
-->
@ -275,6 +275,52 @@
(list (normalize "warning") ": ")
))
;; Fix punctuation for authors list in russian localization (original
;; version is in share/sgml/docbook/dsssl/modular/common/dbcommon.dsl).
(define (author-list-string #!optional (author (current-node)))
(let* ((author-node-list (select-elements
(descendants
(ancestor (normalize "authorgroup") author))
(normalize "author")))
(corpauthor-node-list (select-elements
(descendants
(ancestor (normalize "authorgroup") author))
(normalize "corpauthor")))
(othercredit-node-list (select-elements
(descendants
(ancestor (normalize "authorgroup") author))
(normalize "othercredit")))
(editor-node-list (select-elements
(descendants
(ancestor (normalize "authorgroup")))
(normalize "editor")))
(author-count (if (have-ancestor? (normalize "authorgroup") author)
(+ (node-list-length author-node-list)
(node-list-length corpauthor-node-list)
(node-list-length othercredit-node-list)
(node-list-length editor-node-list))
1))
(this-count (if (have-ancestor? (normalize "authorgroup") author)
(+ (node-list-length (preced author)) 1)
1)))
(string-append
(author-string author)
(if (> author-count 1)
(if (> (- author-count this-count) 1)
(gentext-listcomma)
(if (= (- author-count this-count) 1)
(gentext-lastlistcomma)
""))
"")
(if (and (> author-count 1)
(not (last-sibling? author)))
" "
""))))
</style-specification-body>
</style-specification>