Skip to content
Snippets Groups Projects

Add translation of tei:surface/@n

Merged Michelle Weidling requested to merge feature/#125-translation-of-surface-n into develop
1 file
+ 1
30
Compare changes
  • Side-by-side
  • Inline
@@ -547,7 +547,7 @@ element xhtml:li {
|| "&page=" || $surface
|| "&target=" || $id
},
local:translate-surface($surface),
f-misc:n-translate($surface),
if($count eq 1) then ()
else (" ", <xhtml:span title="Anzahl an Vorkommnissen auf dieser Seite">({$count})</xhtml:span>)
}
@@ -558,35 +558,6 @@ element xhtml:li {
}
};
(:~
: An auxiliary function that translates English tei:surface/@n to their German
: equivalents. Necessary for having a consistent German labeling in the edition.
:
: @author Michelle Weidling
: @param The current tei:surface/@n/string()
: @return A translated version of tei:surface/@n/string() where required
:)
declare function local:translate-surface($surface as xs:string) as xs:string {
switch ($surface)
case "outer_front_cover" return "Vorderer Buchdeckel (außen)"
case "inner_front_cover" return "Vorderer Buchdeckel (innen)"
case "outer_back_cover" return "Hinterer Buchdeckel (außen)"
case "inner_back_cover" return "Hinterer Buchdeckel (innen)"
case "spine" return "Buchrücken"
default return
(: e.g. "front_endpaper_Iv" :)
if(matches($surface, "endpaper")) then
let $page := functx:substring-after-last($surface, "_")
let $label := "Vorsatzblatt "
return
if(matches($surface, "front")) then
$label || $page
else
"Hinteres " || $label || $page
else
$surface
};
(:~
: prepares a link to the current entry
: @param $id The xml:id of the currently processed element
Loading