diff --git a/ru_RU.KOI8-R/share/sgml/freebsd.dsl b/ru_RU.KOI8-R/share/sgml/freebsd.dsl index 26d1f99795..1a43fc1074 100644 --- a/ru_RU.KOI8-R/share/sgml/freebsd.dsl +++ b/ru_RU.KOI8-R/share/sgml/freebsd.dsl @@ -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))) + " " + "")))) +