www/ cleanup patch

Hiroki Sato hrs at FreeBSD.org
Sun Jul 16 15:10:40 UTC 2006


Gábor Kövesdán <gabor at freebsd.org> wrote
  in <44BA4B57.7060602 at FreeBSD.org>:

ga> Hiroki Sato wrote:
ga> >     To activate the side navigation bar, we need the following line
ga> >     only in the DOCTYPE declaration now:
ga> >
ga> >     <!ENTITY % include.nav.FOO "INCLUDE">
ga> >
ga> >     Actually FOO is replaced with "about", "community", "developers",
ga> >     and so on.
ga> >   
ga> This is a great idea, but how this applies to translations? Do they 
ga> still need a bunch of custom include files or can we add files like 
ga> navibar.lang.ent to share/sgml?

 Simply putting the localized navibar.ent into
 www/<lang>/share/sgml/navibar.l10n.ent will do the trick.
 No change is needed for each *.sgml/*.xml file.

 Definitions in that file overrides the English ones; this means that
 entities both in www/<lang>/share/sgml/navibar.l10n.ent and in
 www/share/sgml/navibar.ent are always used but ones in the former are
 preferentially used when they exist on per-entity basis.

ga> For these tree sections, is there a good way to use the English xml 
ga> files in translations? Since some translations have very limited human 
ga> resources, translated news is hard to keep up-to-date. The Hungarian 
ga> translation will be such thing, since only I am working on that, and we 
ga> don't even have a Hungarian committer. I looked at the French codebase, 
ga> they just take the English xml from the Makefile:
ga> 
ga> newsflash.html: newsflash.xsl news.xml\
ga>                         includes.xsl ${XML_INCLUDES}
ga>         ${XSLTPROC} ${XSLTPROCOPTS} -o ${.TARGET} \
ga>                 --param "news.project.xml-master" 
ga> "'${XML_NEWS_NEWS_MASTER}'" \
ga>                 --param "news.project.xml" "'${XML_NEWS_NEWS}'" \
ga>                 --param "transtable.xml" "'${XML_TRANSTABLE}'" \
ga>                 ${.CURDIR}/newsflash.xsl ${.CURDIR}/news.xml
ga> 
ga> Accordingly, the French webpages have to be rebuilt always when somebody 
ga> commits some news to www/en to be up-to-date. Do you have any idea how 
ga> this can be done better?

 This Makefile does not mean the French webpages use the English version
 of news.xml.  The reason why the English news items are used is that
 changes for picking up partial translation were committed in 2004 (see
 www/share/sgml/includes.misc.xsl rev.1.14 and other related changes).
 More specifically, if a translated entry exists in www/<lang>/news/news.xml,
 it will be used.  If not, the English entry will be used.
 This selection will be done automatically and no need to have duplicated
 copy of the English entries in the localized news.xml.

 So what you have to do is putting a translated news.xml file into
 www/<lang>/news/news.xml.  Note that the translated news.xml
 needs to contain translated part only.  Items which are not
 translated yet will be inserted into newsflash.html and so on
 when the English version is updated (after rebuilding the localized
 tree, of course).

-- 
| Hiroki SATO



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20060717/89d10bf6/attachment.sig>


More information about the freebsd-doc mailing list