svn commit: r48035 - head/en_US.ISO8859-1/books/fdp-primer/po-translations
Warren Block
wblock at FreeBSD.org
Sat Jan 16 18:24:12 UTC 2016
Author: wblock
Date: Sat Jan 16 18:24:10 2016
New Revision: 48035
URL: https://svnweb.freebsd.org/changeset/doc/48035
Log:
Update and expand instructions on preparing new translations for
submission, including instructions on setting the svn properties.
Modified:
head/en_US.ISO8859-1/books/fdp-primer/po-translations/chapter.xml
Modified: head/en_US.ISO8859-1/books/fdp-primer/po-translations/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/fdp-primer/po-translations/chapter.xml Sat Jan 16 18:10:09 2016 (r48034)
+++ head/en_US.ISO8859-1/books/fdp-primer/po-translations/chapter.xml Sat Jan 16 18:24:10 2016 (r48035)
@@ -793,22 +793,32 @@ DOC_PREFIX?= ${.CURDIR}/../../..
<title>Submitting the New Translation</title>
<para>Prepare the new translation files for submission. This
- example shows a new Spanish translation of the NanoBSD
- article in
- <filename>~/doc/es_ES.ISO8859-1/articles/nanobsd</filename>.</para>
+ includes adding the files to the version control system, setting
+ additional properties on them, then creating a diff for
+ submission.</para>
+
+ <para>The diff files created by these examples can be attached to
+ a <link
+ xlink:href="https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Documentation">documentation
+ bug report</link> or <link
+ xlink:href="https://reviews.freebsd.org/">code
+ review</link>.</para>
+
+ <example xml:id="po-translations-submitting-spanish">
+ <title>Spanish Translation of the NanoBSD Article</title>
<procedure>
<step>
- <para>The <acronym>PO</acronym> file must contain a &os;
- version string comment on the first line:</para>
+ <para>Add a &os; version string comment as the first
+ line of the <acronym>PO</acronym> file:</para>
<programlisting>#$FreeBSD$</programlisting>
</step>
<step>
- <para>The <filename>Makefile</filename>, the
+ <para>Add the <filename>Makefile</filename>, the
<acronym>PO</acronym> file, and the generated
- <acronym>XML</acronym> translation must all be added to
+ <acronym>XML</acronym> translation to
version control:</para>
<screen>&prompt.user; <userinput>cd ~/doc/es_ES.ISO8859-1/articles/nanobsd/</userinput>
@@ -821,9 +831,9 @@ A es_ES.po</screen>
</step>
<step>
- <para>These files must also have the
+ <para>Set the
<application>Subversion</application>
- <literal>svn:keywords</literal> property set to
+ <literal>svn:keywords</literal> properties on these files to
<literal>FreeBSD=%H</literal> so
<literal>$FreeBSD$</literal> strings are expanded into
the path, revision, date, and author when committed:</para>
@@ -835,21 +845,96 @@ property 'svn:keywords' set on 'es_ES.po
</step>
<step>
- <para>A diff of these new files is created from the
+ <para>Set the <acronym>MIME</acronym> types of the files.
+ These are <literal>text/xml</literal> for books and
+ articles, and <literal>text/x-gettext-translation</literal>
+ for the <acronym>PO</acronym> file.</para>
+
+ <screen>&prompt.user; <userinput>svn propset svn:mime-type text/x-gettext-translation es_ES.po</userinput>
+property 'svn:mime-type' set on 'es_ES.po'
+&prompt.user; <userinput>svn propset svn:mime-type text/xml article.xml</userinput>
+property 'svn:mime-type' set on 'article.xml'</screen>
+ </step>
+
+ <step>
+ <para>Create a diff of the new files from the
<filename>~/doc/</filename> base directory so the full path
is shown with the filenames. This helps committers identify
the target language directory.</para>
<screen>&prompt.user; <userinput>cd ~/doc</userinput>
<userinput>svn diff es_ES.ISO8859-1/articles/nanobsd/ > /tmp/es_nanobsd.diff</userinput></screen>
-
- <para>The diff file is now ready for attachment to a
- <link
- xlink:href="https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Documentation">documentation
- bug report</link> or <link
- xlink:href="https://reviews.freebsd.org/">code
- review</link>.</para>
</step>
</procedure>
+ </example>
+
+ <example xml:id="po-translations-submitting-korean-utf8">
+ <title>Korean <acronym>UTF-8</acronym> Translation of the
+ Explaining-BSD Article</title>
+
+ <procedure>
+ <step>
+ <para>Add a &os; version string comment as the first
+ line of the <acronym>PO</acronym> file:</para>
+
+ <programlisting>#$FreeBSD$</programlisting>
+ </step>
+
+ <step>
+ <para>Add the <filename>Makefile</filename>, the
+ <acronym>PO</acronym> file, and the generated
+ <acronym>XML</acronym> translation to
+ version control:</para>
+
+ <screen>&prompt.user; <userinput>cd ~/doc/ko_KR.UTF-8/articles/explaining-bsd/</userinput>
+&prompt.user; <userinput>ls</userinput>
+Makefile article.xml ko_KR.po
+&prompt.user; <userinput>svn add Makefile article.xml ko_KR.po</userinput>
+A Makefile
+A article.xml
+A ko_KR.po</screen>
+ </step>
+
+ <step>
+ <para>Set the <application>Subversion</application>
+ <literal>svn:keywords</literal> properties on these files
+ to <literal>FreeBSD=%H</literal> so
+ <literal>$FreeBSD$</literal> strings are
+ expanded into the path, revision, date, and author when
+ committed:</para>
+
+ <screen>&prompt.user; <userinput>svn propset svn:keywords FreeBSD=%H Makefile article.xml ko_KR.po</userinput>
+property 'svn:keywords' set on 'Makefile'
+property 'svn:keywords' set on 'article.xml'
+property 'svn:keywords' set on 'ko_KR.po'</screen>
+ </step>
+
+ <step>
+ <para>Set the <acronym>MIME</acronym> types of the files.
+ Because these files use the <acronym>UTF-8</acronym>
+ character set, that is also specified. To prevent the
+ version control system from mistaking these files for
+ binary data, the <literal>fbsd:notbinary</literal>
+ property is also set:</para>
+
+ <screen>&prompt.user; <userinput>svn propset svn:mime-type 'text/x-gettext-translation; charset=UTF-8' ko_KR.po</userinput>
+property 'svn:mime-type' set on 'ko_KR.po'
+&prompt.user; <userinput>svn propset fbsd:notbinary yes ko_KR.po</userinput>
+property 'fbsd:notbinary' set on 'ko_KR.po'
+&prompt.user; <userinput>svn propset svn:mime-type 'text/xml; charset=UTF-8' article.xml</userinput>
+property 'svn:mime-type' set on 'article.xml'
+&prompt.user; <userinput>svn propset fbsd:notbinary yes article.xml</userinput>
+property 'fbsd:notbinary' set on 'article.xml'</screen>
+ </step>
+
+ <step>
+ <para>Create a diff of these new files from the
+ <filename>~/doc/</filename> base directory:</para>
+
+ <screen>&prompt.user; <userinput>cd ~/doc</userinput>
+<userinput>svn diff ko_KR.UTF-8/articles/explaining-bsd > /tmp/ko-explaining.diff</userinput></screen>
+ </step>
+ </procedure>
+ </example>
</sect1>
</chapter>
More information about the svn-doc-head
mailing list