Add localization support for www/<lang>/usergroups.html.
- www/<lang>/share/sgml/templates.usergroups.xsl: customization layer for each language. - www/<lang>/share/sgml/usergroups.xml: translation of www/share/sgml/usergroups.xml. The translation teams can simply copy it from the language-independent directory and keep the translated items only; items which are not in the translated file are automatically inserted from the original file on the fly (so old items in the translated file are harmful).
This commit is contained in:
parent
23ae664013
commit
66229ed32d
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=25689
5 changed files with 71 additions and 13 deletions
ja
share
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/ja/Makefile,v 1.67 2004/12/09 19:48:57 rushani Exp $
|
||||
# $FreeBSD: www/ja/Makefile,v 1.68 2004/12/30 17:53:44 hrs Exp $
|
||||
# The FreeBSD Japanese Documentation Project
|
||||
# Original revision: 1.114
|
||||
|
||||
|
@ -31,6 +31,10 @@ DOCS+= y2kbug.sgml
|
|||
# Japanese-only file
|
||||
DOCS+= jabout.sgml
|
||||
|
||||
XMLDOCS+= usergroups:${XSL_USERGROUPS}:${XML_USERGROUPS}:
|
||||
DEPENDSET.usergroups=transtable usergroups
|
||||
PARAMS.usergroups= --param pagename "'FreeBSD User Groups'"
|
||||
|
||||
# These will be directly installed.
|
||||
|
||||
#DATA= favicon.ico
|
||||
|
|
15
ja/share/sgml/templates.usergroups.xsl
Normal file
15
ja/share/sgml/templates.usergroups.xsl
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="euc-jp"?>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
|
||||
exclude-result-prefixes="cvs">
|
||||
|
||||
<!-- must point to master copy, www/share/sgml/templates.usergroups.xsl -->
|
||||
<xsl:import href="../../../share/sgml/templates.usergroups.xsl" />
|
||||
|
||||
<xsl:output type="xml" encoding="euc-jp"
|
||||
indent="yes"/>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -1,5 +1,5 @@
|
|||
# doc.xml.mk
|
||||
# $FreeBSD$
|
||||
# $FreeBSD: www/share/mk/doc.xml.mk,v 1.1 2005/09/18 04:33:46 hrs Exp $
|
||||
|
||||
XML_CATALOG_FILES= file://${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog.xml \
|
||||
file://${DOC_PREFIX}/share/sgml/catalog.xml \
|
||||
|
@ -42,7 +42,7 @@ XML_TRANSTABLE= ${DOC_PREFIX}/share/sgml/transtable.xml
|
|||
_DEPENDSET.mirrors= ${XSL_MIRRORS} ${XML_MIRRORS}
|
||||
_PARAMS.mirrors= --param mirrors.xml "'${XML_MIRRORS}'"
|
||||
XML_MIRRORS_MASTER= ${DOC_PREFIX}/share/sgml/mirrors.xml
|
||||
XML_MIRRORS= ${.OBJDIR}/${DOC_PREFIX:S,^${.CURDIR}/,,}/${LANGCODE}/share/sgml/mirrors.xml
|
||||
XML_MIRRORS= ${DOC_PREFIX}/${LANGCODE}/share/sgml/mirrors.xml
|
||||
XSL_MIRRORS_MASTER= ${DOC_PREFIX}/share/sgml/mirrors-master.xsl
|
||||
.if exists(${DOC_PREFIX}/${LANGCODE}/share/sgml/mirrors-local.xsl)
|
||||
XSL_MIRRORS= ${DOC_PREFIX}/${LANGCODE}/share/sgml/mirrors-local.xsl
|
||||
|
@ -78,9 +78,22 @@ CLEANFILES+= ${XML_MIRRORS}.sort
|
|||
CLEANFILES+= ${XML_MIRRORS}.sort.tmp
|
||||
|
||||
# DEPENDSET: usergroups ......................................................
|
||||
_DEPENDSET.usergroups= ${XML_USERGROUPS} ${XSL_USERGROUPS}
|
||||
XML_USERGROUPS= ${WEB_PREFIX}/share/sgml/usergroups.xml
|
||||
_DEPENDSET.usergroups= ${XML_USERGROUPS} ${XML_USERGROUPS_LOCAL} \
|
||||
${XSL_USERGROUPS_MASTER} ${XSL_USERGROUPS}
|
||||
_PARAMS.usergroups= --param usergroups.xml "'${XML_USERGROUPS}'" \
|
||||
--param usergroups-local.xml "'${XML_USERGROUPS_LOCAL}'"
|
||||
XML_USERGROUPS= ${WEB_PREFIX}/share/sgml/usergroups.xml
|
||||
.if exists(${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/usergroups.xml)
|
||||
XML_USERGROUPS_LOCAL= ${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/usergroups.xml
|
||||
.else
|
||||
XML_USERGROUPS_LOCAL= ${WEB_PREFIX}/share/sgml/usergroups.xml
|
||||
.endif
|
||||
XSL_USERGROUPS_MASTER= ${WEB_PREFIX}/share/sgml/templates.usergroups.xsl
|
||||
.if exists(${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/templates.usergroups.xsl)
|
||||
XSL_USERGROUPS= ${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/templates.usergroups.xsl
|
||||
.else
|
||||
XSL_USERGROUPS= ${WEB_PREFIX}/share/sgml/templates.usergroups.xsl
|
||||
.endif
|
||||
|
||||
# DEPENDSET: news ............................................................
|
||||
_DEPENDSET.news= ${XML_NEWS_NEWS_MASTER} ${XML_NEWS_NEWS} \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
|
||||
<!-- $FreeBSD: www/share/sgml/includes.misc.xsl,v 1.21 2005/04/19 21:20:55 brueffer Exp $ -->
|
||||
<!-- $FreeBSD: www/share/sgml/includes.misc.xsl,v 1.22 2005/07/16 09:58:17 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
|
@ -100,6 +100,7 @@
|
|||
|
||||
<xsl:template name="html-usergroups-list-entries">
|
||||
<xsl:param name="usergroups.xml" select="'usergroups.xml'" />
|
||||
<xsl:param name="usergroups-local.xml" select="'usergroups-local.xml'" />
|
||||
|
||||
<xsl:for-each select="document($usergroups.xml)//entry[
|
||||
generate-id() =
|
||||
|
@ -119,9 +120,29 @@
|
|||
<xsl:for-each select="key('html-usergroups-regions-key', @continent)">
|
||||
<xsl:sort select="name" order="ascending"/>
|
||||
|
||||
<dt><a name="{$id}-{@id}" href="{url}"><xsl:value-of select="name" /></a></dt>
|
||||
<xsl:param name="origid"><xsl:value-of select="@id" /></xsl:param>
|
||||
|
||||
<dd><p><xsl:value-of select="description" /></p></dd>
|
||||
<!-- XXX: need optimization -->
|
||||
<xsl:param name="lname">
|
||||
<xsl:copy-of select="document($usergroups-local.xml)//*[@id=$origid]/name" />
|
||||
</xsl:param>
|
||||
|
||||
<xsl:param name="ldesc">
|
||||
<xsl:copy-of select="document($usergroups-local.xml)//*[@id=$origid]/description" />
|
||||
</xsl:param>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$lname">
|
||||
<dt><a name="{$id}-{@id}" href="{url}"><xsl:value-of select="$lname" /></a></dt>
|
||||
|
||||
<dd><p><xsl:value-of select="$ldesc" /></p></dd>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<dt><a name="{$id}-{@id}" href="{url}"><xsl:value-of select="name" /></a></dt>
|
||||
|
||||
<dd><p><xsl:value-of select="description" /></p></dd>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:for-each>
|
||||
|
@ -138,8 +159,6 @@
|
|||
and must offer a short description.</p>
|
||||
|
||||
<h3>Regions:</h3>
|
||||
|
||||
<xsl:call-template name="html-usergroups-list-regions" />
|
||||
</xsl:template>
|
||||
|
||||
<!-- template: "misc-format-date-string"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.usergroups.xsl,v 1.1 2005/07/16 09:58:17 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<xsl:import href="includes.xsl" />
|
||||
|
||||
<xsl:output method="xml" encoding="iso-8859-1"
|
||||
<xsl:output method="xml"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
|
||||
|
||||
|
@ -28,8 +28,15 @@
|
|||
|
||||
<xsl:call-template name="html-usergroups-list-header" />
|
||||
|
||||
<xsl:call-template name="html-usergroups-list-entries" />
|
||||
<xsl:call-template name="html-usergroups-list-regions">
|
||||
<xsl:with-param name="usergroups.xml" select="$usergroups.xml" />
|
||||
<xsl:with-param name="usergroups-local.xml" select="$usergroups-local.xml" />
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:call-template name="html-usergroups-list-entries">
|
||||
<xsl:with-param name="usergroups.xml" select="$usergroups.xml" />
|
||||
<xsl:with-param name="usergroups-local.xml" select="$usergroups-local.xml" />
|
||||
</xsl:call-template>
|
||||
<xsl:copy-of select="$footer"/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue