From 86e392019c387bd7a85b80dbed94e5edb5a7520f Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 23 Aug 2007 15:54:22 +0000
Subject: [PATCH] Add support for overriding the user friendly singlular and plural names of components.
---
opendj-sdk/opends/resource/admin/preprocessor.xsl | 29 +++++++++++++++++++++++------
1 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/opendj-sdk/opends/resource/admin/preprocessor.xsl b/opendj-sdk/opends/resource/admin/preprocessor.xsl
index dee2c1e..c527e89 100644
--- a/opendj-sdk/opends/resource/admin/preprocessor.xsl
+++ b/opendj-sdk/opends/resource/admin/preprocessor.xsl
@@ -1061,14 +1061,31 @@
</xsl:choose>
</xsl:variable>
<xsl:variable name="this-ufn">
- <xsl:call-template name="name-to-ufn">
- <xsl:with-param name="value" select="$this-name" />
- </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="/adm:managed-object/adm:user-friendly-name">
+ <xsl:value-of
+ select="normalize-space(/adm:managed-object/adm:user-friendly-name)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="name-to-ufn">
+ <xsl:with-param name="value" select="$this-name" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<xsl:variable name="this-ufpn">
- <xsl:call-template name="name-to-ufn">
- <xsl:with-param name="value" select="$this-plural-name" />
- </xsl:call-template>
+ <xsl:choose>
+ <xsl:when
+ test="/adm:managed-object/adm:user-friendly-plural-name">
+ <xsl:value-of
+ select="normalize-space(/adm:managed-object/adm:user-friendly-plural-name)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="name-to-ufn">
+ <xsl:with-param name="value" select="$this-plural-name" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<xsl:variable name="_this">
<xsl:call-template name="pre-process-managed-object" />
--
Gitblit v1.10.0