Date: Wed, 29 Apr 2009 21:27:10 GMT From: Rene Ladan <rene@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 161356 for review Message-ID: <200904292127.n3TLRAoJ064635@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 @@ <!-- The FreeBSD Documentation Project - $FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/l10n/chapter.sgml,v 1.12 2009/03/21 02:38:53 gabor Exp $ + $FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/l10n/chapter.sgml,v 1.13 2009/04/29 17:46:49 gabor Exp $ --> <chapter id="l10n"> @@ -221,6 +221,60 @@ #ifndef WITHOUT_NLS catclose(catalog); #endif</programlisting> + + <sect3> + <title>Reducing Strings to Localize</title> + + <para>There is a good way of reducing the strings that + need to be localized by using <application>libc</application> + 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.</para> + + <para>First, here is an example that does not use + <application>libc</application> error messages:</para> + + <programlisting> +#include <err.h> +... +if (!S_ISDIR(st.st_mode)) + err(1, "argument is not a directory"); + </programlisting> + + <para>This can be transformed to print an error message by + reading <varname>errno</varname> and printing an error message + accordingly:</para> + + <programlisting> +#include <err.h> +#include <errno.h> +... +if (!S_ISDIR(st.st_mode)) { + errno = ENOTDIR; + err(1, NULL); +} + </programlisting> + + <para>In this example, the custom string is eliminated, thus + translators will have less work when localizing the program + and users will see the usual <quote>Not a directory</quote> + error message when they encounter this error. This message + will probably seem more familiar to them. Please note that + it was necessary to include <filename + class="headerfile">errno.h</filename> in order to directly + access <varname>errno</varname>.</para> + + <para>It is worth to note that there are cases when + <varname>errno</varname> is set automatically by a preceding + call, so it is not necessary to set it explicitly:</para> + + <programlisting> +#include <err.h> +... +if ((p = malloc(size)) == NULL) + err(1, NULL); + </programlisting> + </sect3> </sect2> <sect2 id="nls-mk"> ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml#13 (text+ko) ==== @@ -1,7 +1,7 @@ <!-- The FreeBSD Documentation Project - $FreeBSD: doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.240 2009/02/01 04:25:22 keramida Exp $ + $FreeBSD: doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.242 2009/04/29 19:57:23 pgj Exp $ --> <chapter id="updating-upgrading"> @@ -80,7 +80,7 @@ <listitem> <para>How to keep your documentation up to date with - <application>CVSup</application><!-- and + <application>CVSup</application> or documentation ports<!--, and <application>Docsnap</application>-->.</para> </listitem> @@ -959,6 +959,236 @@ &prompt.root; <userinput>make FORMATS='html html-split' install clean</userinput></screen> </sect2> + <sect2 id="doc-ports"> + <sect2info> + <authorgroup> + <author> + <firstname>Marc</firstname> + <surname>Fonvieille</surname> + <contrib>Based on the work of </contrib> + </author> + </authorgroup> + </sect2info> + + <title>Using Documentation Ports</title> + + <indexterm><primary>Updating and Upgrading</primary></indexterm> + + <indexterm> + <primary>documentation package</primary> + <see>Updating and Upgrading</see> + </indexterm> + + <para>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 + <emphasis>documentation toolchain</emphasis>, a certain level of + familiarity with <application>CVS</application> 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:</para> + + <itemizedlist> + <listitem> + <para>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).</para> + </listitem> + + <listitem> + <para>Download the documentation sources and build them + through the ports framework (making the checkout and build + steps a bit eaiser).</para> + </listitem> + </itemizedlist> + + <para>These two methods of updating the &os; documentation are + supported by a set of <emphasis>documentation ports</emphasis>, + updated by the &a.doceng; on a monthly basis. These are listed + in the &os; Ports Collection, under the virtual category + named <ulink + url="http://www.freshports.org/docs/">docs</ulink>.</para> + + <sect3 id="doc-ports-install-make"> + <title>Building and Installing Documentation Ports</title> + + <para>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.</para> + + <note> + <para>As an extra feature, when the documentation ports are + built locally, they record a dependency to the + <emphasis>documentation toolchain</emphasis> ports, so the + latter is automatically installed too.</para> + </note> + + <para>Organization of the documentation ports is as follows:</para> + + <itemizedlist> + <listitem> + <para>There is a <quote>master port</quote>, <filename + role="package">misc/freebsd-doc-en</filename>, where the + documentation port files can be found. It is the base of + all documentation ports. By default, it builds the + English documentation only.</para> + </listitem> + + <listitem> + <para>There is an <quote>all in one port</quote>, <filename + role="package">misc/freebsd-doc-all</filename>, and it + builds and installs all documentation in all available + languages.</para> + </listitem> + + <listitem> + <para>Finally, there is a <quote>slave port</quote> for + each translation, e.g.: <filename + role="package">misc/freebsd-doc-hu</filename> for the + Hungarian-language documents. All of them depend on the + master port and install the translated documentation of + the respective language.</para> + </listitem> + </itemizedlist> + + <para>To install a documentation port from source, issue the + following commands (as <username>root</username>):</para> + + <screen>&prompt.root; <userinput>cd /usr/ports/misc/freebsd-doc-en</userinput> +&prompt.root; <userinput>make install clean</userinput></screen> + + <para>This will build and install the English documentation in + split <acronym>HTML</acronym> format (the same as used on <ulink + url="http://www.FreeBSD.org"></ulink>) in the <filename + class="directory">/usr/local/share/doc/freebsd</filename> + directory.</para> + + <sect4 id="doc-ports-options"> + <title>Common Knobs and Options</title> + + <para>There are many options for modifying the default + behavior of the documentation ports. The following is just + a short list:</para> + + <variablelist> + <varlistentry> + <term><makevar>WITH_HTML</makevar></term> + + <listitem> + <para>Allows the build of the HTML format: a single HTML + file per document. The formatted documentation is + saved to a file called + <filename>article.html</filename>, or + <filename>book.html</filename>, as appropriate, plus + images.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><makevar>WITH_PDF</makevar></term> + + <listitem> + <para>Allows the build of the &adobe; Portable Document + Format, for use with &adobe; &acrobat.reader;, + <application>Ghostscript</application> or other PDF + readers. The formatted documentation is saved to a + file called <filename>article.pdf</filename> or + <filename>book.pdf</filename>, as appropriate.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><makevar>DOCBASE</makevar></term> + + <listitem> + <para>Where to install the documentation. It defaults + to <filename + class="directory">/usr/local/share/doc/freebsd</filename>.</para> + + <note> + <para>Notice that the default target directory + differs from the directory used by the + <application>CVSup</application> method. This is + because we are installing a port, and ports are + usually installed under the <filename + class="directory">/usr/local</filename> directory. + This can overriden, by adding the + <makevar>PREFIX</makevar> variable.</para> + </note> + </listitem> + </varlistentry> + </variablelist> + + <para>Here is a brief example on how to use the variables + mentioned above to install the Hungarian documentation in + Portable Document Format:</para> + + <screen>&prompt.root; cd /usr/ports/misc/freebsd-doc-hu +&prompt.root; make -DWITH_PDF DOCBASE=share/doc/freebsd/hu install clean</screen> + </sect4> + </sect3> + + <sect3 id="doc-ports-install-package"> + <title>Using Documentation Packages</title> + + <para>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.</para> + + <para>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.</para> + + <note> + <para>When binary packages are used, the &os; documentation + will be installed in <emphasis>all</emphasis> available + formats for the given language.</para> + </note> + + <para>For example, the following command will install the latest + pre-built package of the Hungarian documentation:</para> + + <screen>&prompt.root; <userinput>pkg_add -r hu-freebsd-doc</userinput></screen> + + <note> + <para>Packages have the following name format that differs + from the corresponding port's name: + <literal><replaceable>lang</replaceable>-freebsd-doc</literal>. + Here <replaceable>lang</replaceable> is the short format of + the language code, i.e. <literal>hu</literal> for + Hungarian, or <literal>zh_cn</literal> for Simplified + Chinese.</para> + </note> + </sect3> + + <sect3 id="doc-ports-update"> + <title>Updating Documentation Ports</title> + + <para>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 <filename + role="package">ports-mgmt/portupgrade</filename> tool by + using packages only:</para> + + <screen>&prompt.root; <userinput>portupgrade -PP hu-freebsd-doc</userinput></screen> + </sect3> + </sect2> + <!-- FIXME: Waiting for a working docsnap server... --> <![ IGNORE [ <sect2 id="docsnap"> ==== //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/x11/chapter.sgml#10 (text+ko) ==== @@ -1,7 +1,7 @@ <!-- The FreeBSD Dutch Documentation Project - $FreeBSD: doc/nl_NL.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.17 2008/11/10 20:39:33 rene Exp $ + $FreeBSD: doc/nl_NL.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.18 2009/04/29 11:22:54 rene Exp $ $FreeBSDnl: doc/nl_NL.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.43 2006/08/25 12:00:28 remko Exp $ %SOURCE% en_US.ISO8859-1/books/handbook/x11/chapter.sgml %SRCID% 1.191 ==== //depot/projects/docproj_nl/share/sgml/man-refs.ent#16 (text+ko) ==== @@ -20,7 +20,7 @@ lexicographical order by the entity (i.e., the dots used in place of special characters should not be expanded when comparing). - $FreeBSD: doc/share/sgml/man-refs.ent,v 1.484 2009/04/27 21:45:44 hrs Exp $ + $FreeBSD: doc/share/sgml/man-refs.ent,v 1.485 2009/04/29 15:13:21 hrs Exp $ --> <!ENTITY man...1 "<citerefentry/<refentrytitle/[/<manvolnum/1//"> @@ -3753,6 +3753,7 @@ <!ENTITY man.twe.4 "<citerefentry/<refentrytitle/twe/<manvolnum/4//"> <!ENTITY man.tx.4 "<citerefentry/<refentrytitle/tx/<manvolnum/4//"> <!ENTITY man.txp.4 "<citerefentry/<refentrytitle/txp/<manvolnum/4//"> +<!ENTITY man.u3g.4 "<citerefentry/<refentrytitle/u3g/<manvolnum/4//"> <!ENTITY man.uark.4 "<citerefentry/<refentrytitle/uark/<manvolnum/4//"> <!ENTITY man.uart.4 "<citerefentry/<refentrytitle/uart/<manvolnum/4//"> <!ENTITY man.uath.4 "<citerefentry/<refentrytitle/uath/<manvolnum/4//"> ==== //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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904292127.n3TLRAoJ064635>