From owner-p4-projects@FreeBSD.ORG Wed Apr 29 21:27:11 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7D7021065672; Wed, 29 Apr 2009 21:27:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3E66106564A for ; Wed, 29 Apr 2009 21:27:10 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B0E6E8FC1D for ; Wed, 29 Apr 2009 21:27:10 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n3TLRAQl064637 for ; Wed, 29 Apr 2009 21:27:10 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n3TLRAoJ064635 for perforce@freebsd.org; Wed, 29 Apr 2009 21:27:10 GMT (envelope-from rene@FreeBSD.org) Date: Wed, 29 Apr 2009 21:27:10 GMT Message-Id: <200904292127.n3TLRAoJ064635@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Cc: Subject: PERFORCE change 161356 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2009 21:27:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=161356 Change 161356 by rene@rene_self on 2009/04/29 21:26:45 IFC Affected files ... .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/developers-handbook/l10n/chapter.sgml#4 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml#13 integrate .. //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/x11/chapter.sgml#10 integrate .. //depot/projects/docproj_nl/share/sgml/man-refs.ent#16 integrate .. //depot/projects/docproj_nl/www/en/releases/7.2R/Makefile#3 integrate .. //depot/projects/docproj_nl/www/en/releases/7.2R/announce.sgml#1 branch .. //depot/projects/docproj_nl/www/en/releases/7.2R/errata.html#1 branch .. //depot/projects/docproj_nl/www/en/releases/7.2R/hardware.html#1 branch .. //depot/projects/docproj_nl/www/en/releases/7.2R/readme.html#1 branch .. //depot/projects/docproj_nl/www/en/releases/7.2R/relnotes-detailed.html#1 branch .. //depot/projects/docproj_nl/www/en/releases/7.2R/relnotes.sgml#1 branch Differences ... ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/developers-handbook/l10n/chapter.sgml#4 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -221,6 +221,60 @@ #ifndef WITHOUT_NLS catclose(catalog); #endif + + + Reducing Strings to Localize + + There is a good way of reducing the strings that + need to be localized by using libc + error messages. This is also useful to just avoid duplication + and provide consistent error messages for the common errors + that can be encountered by a great many of programs. + + First, here is an example that does not use + libc error messages: + + +#include <err.h> +... +if (!S_ISDIR(st.st_mode)) + err(1, "argument is not a directory"); + + + This can be transformed to print an error message by + reading errno and printing an error message + accordingly: + + +#include <err.h> +#include <errno.h> +... +if (!S_ISDIR(st.st_mode)) { + errno = ENOTDIR; + err(1, NULL); +} + + + In this example, the custom string is eliminated, thus + translators will have less work when localizing the program + and users will see the usual Not a directory + error message when they encounter this error. This message + will probably seem more familiar to them. Please note that + it was necessary to include errno.h in order to directly + access errno. + + It is worth to note that there are cases when + errno is set automatically by a preceding + call, so it is not necessary to set it explicitly: + + +#include <err.h> +... +if ((p = malloc(size)) == NULL) + err(1, NULL); + + ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml#13 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -80,7 +80,7 @@ How to keep your documentation up to date with - CVSup. @@ -959,6 +959,236 @@ &prompt.root; make FORMATS='html html-split' install clean + + + + + Marc + Fonvieille + Based on the work of + + + + + Using Documentation Ports + + Updating and Upgrading + + + documentation package + Updating and Upgrading + + + In the previous section, we have presented a method for + updating the &os; documentation from sources. Source based + updates may not be feasible or practical for all &os; systems + though. Building the documentation sources requires a fairly + large collection of tools and utilities, the + documentation toolchain, a certain level of + familiarity with CVS and source + checkouts from a repository, and a few manual steps to build the + checked out sources. In this section, we describe an + alternative way of updating the installed copies of the &os; + documentation; one that uses the Ports Collection and makes + it possible to: + + + + Download and install pre-built snaphots of the + documentation, without having to locally build anything + (eliminating this way the need for an installation of the + entire documentation toolchain). + + + + Download the documentation sources and build them + through the ports framework (making the checkout and build + steps a bit eaiser). + + + + These two methods of updating the &os; documentation are + supported by a set of documentation ports, + updated by the &a.doceng; on a monthly basis. These are listed + in the &os; Ports Collection, under the virtual category + named docs. + + + Building and Installing Documentation Ports + + The documentation ports use the ports building framework + to make documentation builds easier. They automate the + process of checking out the documentation source, running + &man.make.1; with the appropriate environment settings and + command-line options, and they make the installation or + deinstallation of documentation as easy as the installation of + any other &os; port or package. + + + As an extra feature, when the documentation ports are + built locally, they record a dependency to the + documentation toolchain ports, so the + latter is automatically installed too. + + + Organization of the documentation ports is as follows: + + + + There is a master port, misc/freebsd-doc-en, where the + documentation port files can be found. It is the base of + all documentation ports. By default, it builds the + English documentation only. + + + + There is an all in one port, misc/freebsd-doc-all, and it + builds and installs all documentation in all available + languages. + + + + Finally, there is a slave port for + each translation, e.g.: misc/freebsd-doc-hu for the + Hungarian-language documents. All of them depend on the + master port and install the translated documentation of + the respective language. + + + + To install a documentation port from source, issue the + following commands (as root): + + &prompt.root; cd /usr/ports/misc/freebsd-doc-en +&prompt.root; make install clean + + This will build and install the English documentation in + split HTML format (the same as used on ) in the /usr/local/share/doc/freebsd + directory. + + + Common Knobs and Options + + There are many options for modifying the default + behavior of the documentation ports. The following is just + a short list: + + + + WITH_HTML + + + Allows the build of the HTML format: a single HTML + file per document. The formatted documentation is + saved to a file called + article.html, or + book.html, as appropriate, plus + images. + + + + + WITH_PDF + + + Allows the build of the &adobe; Portable Document + Format, for use with &adobe; &acrobat.reader;, + Ghostscript or other PDF + readers. The formatted documentation is saved to a + file called article.pdf or + book.pdf, as appropriate. + + + + + DOCBASE + + + Where to install the documentation. It defaults + to /usr/local/share/doc/freebsd. + + + Notice that the default target directory + differs from the directory used by the + CVSup method. This is + because we are installing a port, and ports are + usually installed under the /usr/local directory. + This can overriden, by adding the + PREFIX variable. + + + + + + Here is a brief example on how to use the variables + mentioned above to install the Hungarian documentation in + Portable Document Format: + + &prompt.root; cd /usr/ports/misc/freebsd-doc-hu +&prompt.root; make -DWITH_PDF DOCBASE=share/doc/freebsd/hu install clean + + + + + Using Documentation Packages + + Building the documentation ports from source, as described + in the previous section, requires a local installation of the + documentation toolchain and a bit of disk space for the build + of the ports. When resources are not available to install the + documentation toolchain, or because the build from sources + would take too much disk space), it is still possible to + install pre-built snapshots of the documentation ports. + + The &a.doceng; prepares monthly snapshots of the &os; + documentation packages. These binary packages can be used + with any of the bundled package tools, like &man.pkg.add.1;, + &man.pkg.delete.1;, and so on. + + + When binary packages are used, the &os; documentation + will be installed in all available + formats for the given language. + + + For example, the following command will install the latest + pre-built package of the Hungarian documentation: + + &prompt.root; pkg_add -r hu-freebsd-doc + + + Packages have the following name format that differs + from the corresponding port's name: + lang-freebsd-doc. + Here lang is the short format of + the language code, i.e. hu for + Hungarian, or zh_cn for Simplified + Chinese. + + + + + Updating Documentation Ports + + To update a previously installed documentation port, any + tool suitable for updating ports is sufficient. For example, + the following command updates the installed Hungarian + documentation via the ports-mgmt/portupgrade tool by + using packages only: + + &prompt.root; portupgrade -PP hu-freebsd-doc + + + ==== //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/x11/chapter.sgml#10 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -3753,6 +3753,7 @@ + ==== //depot/projects/docproj_nl/www/en/releases/7.2R/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: www/en/releases/7.2R/Makefile,v 1.3 2009/04/10 13:07:15 blackend Exp $ +# $FreeBSD: www/en/releases/7.2R/Makefile,v 1.5 2009/04/29 18:01:34 hrs Exp $ .if exists(../Makefile.conf) .include "../Makefile.conf" @@ -7,6 +7,12 @@ .include "../Makefile.inc" .endif -DOCS= schedule.sgml +DOCS= announce.sgml relnotes.sgml schedule.sgml + +DATA= docbook.css +DATA+= errata.html +DATA+= hardware.html +DATA+= readme.html +DATA+= relnotes-detailed.html .include "${WEB_PREFIX}/share/mk/web.site.mk"