Loading rxq/html.xqm +3 −2 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ declare %private function max.html:buildSubMenu($projectId, $pageId){ <ul class="nav navbar-nav">{ for $se in $subEntries let $target := $docMenu//entry[./id=$se/text()]/target/text() let $label := max.i18n:getText($projectId, "menu." || $se/id) let $label := max.i18n:getText($projectId, "menu." || $docMenu//entry[./id=$se/text()]/id/text()) return <li><a href="{$target}">{if(not($label='menu.')) then $label else $se/text()}</a></li> } </ul> Loading @@ -362,7 +362,8 @@ declare %private function max.html:buildSubMenu($projectId, $pageId){ <ul class="nav navbar-nav">{ for $c in $parentEntry/subentry let $target := $c/target/text() return <li><a href="{$target}">{$c/text()}</a></li> let $label := max.i18n:getText($projectId, "menu." || $c/id/text()) return <li><a href="{$target}">{if(not($label='menu.')) then $label else $c/text()}</a></li> } </ul> </div> Loading rxq/i18n.xqm +5 −4 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ The fact that you are presently reading this means that you have had knowledge of the CeCILL-B license and that you accept its terms. :) module namespace max.i18n = 'pddn/max/i18n'; import module namespace max.util = 'pddn/max/util' at 'util.xqm'; declare variable $max.i18n:DEFAULT_FILE := "../ui/i18n/I18n.xml"; declare function max.i18n:getText($projectId as xs:string, $key as xs:string){ Loading @@ -87,11 +87,11 @@ declare function max.i18n:getText($projectId as xs:string, $key as xs:string){ declare function max.i18n:getText($projectId as xs:string, $key as xs:string, $locale as xs:string ?) { let $i18nResourceFile := if($locale) then "../i18n/I18n" || $locale || ".xml" then max.util:maxHome() ||"/ui/i18n/I18n" || $locale || ".xml" else $max.i18n:DEFAULT_FILE let $projectI18nFile := if($locale) then "../editions/" || $projectId || "/ui/i18n/I18n" || $locale || ".xml" else "../editions/" || $projectId || "/ui/i18n/I18n.xml" then max.util:maxHome() ||"/editions/" || $projectId || "/ui/i18n/I18n" || $locale || ".xml" else max.util:maxHome() ||"/editions/" || $projectId || "/ui/i18n/I18n.xml" return try{ Loading @@ -106,4 +106,5 @@ declare function max.i18n:getText($projectId as xs:string, $key as xs:string, $l then doc($i18nResourceFile)//entry[@key=$key]/text() else $key } }; No newline at end of file Loading
rxq/html.xqm +3 −2 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ declare %private function max.html:buildSubMenu($projectId, $pageId){ <ul class="nav navbar-nav">{ for $se in $subEntries let $target := $docMenu//entry[./id=$se/text()]/target/text() let $label := max.i18n:getText($projectId, "menu." || $se/id) let $label := max.i18n:getText($projectId, "menu." || $docMenu//entry[./id=$se/text()]/id/text()) return <li><a href="{$target}">{if(not($label='menu.')) then $label else $se/text()}</a></li> } </ul> Loading @@ -362,7 +362,8 @@ declare %private function max.html:buildSubMenu($projectId, $pageId){ <ul class="nav navbar-nav">{ for $c in $parentEntry/subentry let $target := $c/target/text() return <li><a href="{$target}">{$c/text()}</a></li> let $label := max.i18n:getText($projectId, "menu." || $c/id/text()) return <li><a href="{$target}">{if(not($label='menu.')) then $label else $c/text()}</a></li> } </ul> </div> Loading
rxq/i18n.xqm +5 −4 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ The fact that you are presently reading this means that you have had knowledge of the CeCILL-B license and that you accept its terms. :) module namespace max.i18n = 'pddn/max/i18n'; import module namespace max.util = 'pddn/max/util' at 'util.xqm'; declare variable $max.i18n:DEFAULT_FILE := "../ui/i18n/I18n.xml"; declare function max.i18n:getText($projectId as xs:string, $key as xs:string){ Loading @@ -87,11 +87,11 @@ declare function max.i18n:getText($projectId as xs:string, $key as xs:string){ declare function max.i18n:getText($projectId as xs:string, $key as xs:string, $locale as xs:string ?) { let $i18nResourceFile := if($locale) then "../i18n/I18n" || $locale || ".xml" then max.util:maxHome() ||"/ui/i18n/I18n" || $locale || ".xml" else $max.i18n:DEFAULT_FILE let $projectI18nFile := if($locale) then "../editions/" || $projectId || "/ui/i18n/I18n" || $locale || ".xml" else "../editions/" || $projectId || "/ui/i18n/I18n.xml" then max.util:maxHome() ||"/editions/" || $projectId || "/ui/i18n/I18n" || $locale || ".xml" else max.util:maxHome() ||"/editions/" || $projectId || "/ui/i18n/I18n.xml" return try{ Loading @@ -106,4 +106,5 @@ declare function max.i18n:getText($projectId as xs:string, $key as xs:string, $l then doc($i18nResourceFile)//entry[@key=$key]/text() else $key } }; No newline at end of file