This is an archive of past FreeBSD releases; it's part of the FreeBSD Documentation Archive.

12.7. Submitting the New Translation

12.7. Submitting the New Translation

Prepare the new translation files for submission. This includes adding the files to the version control system, setting additional properties on them, then creating a diff for submission.

The diff files created by these examples can be attached to a documentation bug report or code review.

Example 12.6. Spanish Translation of the NanoBSD Article
  1. Add a FreeBSD version string comment as the first line of the PO file:

    #$FreeBSD$
  2. Add the Makefile, the PO file, and the generated XML translation to version control:

    % cd ~/doc/es_ES.ISO8859-1/articles/nanobsd/
    % ls
    Makefile	article.xml	es_ES.po
    % svn add Makefile article.xml es_ES.po
    A         Makefile
    A         article.xml
    A         es_ES.po
  3. Set the Subversion svn:keywords properties on these files to FreeBSD=%H so $FreeBSD$ strings are expanded into the path, revision, date, and author when committed:

    % svn propset svn:keywords FreeBSD=%H Makefile article.xml es_ES.po
    property 'svn:keywords' set on 'Makefile'
    property 'svn:keywords' set on 'article.xml'
    property 'svn:keywords' set on 'es_ES.po'
  4. Set the MIME types of the files. These are text/xml for books and articles, and text/x-gettext-translation for the PO file.

    % svn propset svn:mime-type text/x-gettext-translation es_ES.po
    property 'svn:mime-type' set on 'es_ES.po'
    % svn propset svn:mime-type text/xml article.xml
    property 'svn:mime-type' set on 'article.xml'
  5. Create a diff of the new files from the ~/doc/ base directory so the full path is shown with the filenames. This helps committers identify the target language directory.

    % cd ~/doc
    svn diff es_ES.ISO8859-1/articles/nanobsd/ > /tmp/es_nanobsd.diff

Example 12.7. Korean UTF-8 Translation of the Explaining-BSD Article
  1. Add a FreeBSD version string comment as the first line of the PO file:

    #$FreeBSD$
  2. Add the Makefile, the PO file, and the generated XML translation to version control:

    % cd ~/doc/ko_KR.UTF-8/articles/explaining-bsd/
    % ls
    Makefile	article.xml	ko_KR.po
    % svn add Makefile article.xml ko_KR.po
    A         Makefile
    A         article.xml
    A         ko_KR.po
  3. Set the Subversion svn:keywords properties on these files to FreeBSD=%H so $FreeBSD$ strings are expanded into the path, revision, date, and author when committed:

    % svn propset svn:keywords FreeBSD=%H Makefile article.xml ko_KR.po
    property 'svn:keywords' set on 'Makefile'
    property 'svn:keywords' set on 'article.xml'
    property 'svn:keywords' set on 'ko_KR.po'
  4. Set the MIME types of the files. Because these files use the UTF-8 character set, that is also specified. To prevent the version control system from mistaking these files for binary data, the fbsd:notbinary property is also set:

    % svn propset svn:mime-type 'text/x-gettext-translation; charset=UTF-8' ko_KR.po
    property 'svn:mime-type' set on 'ko_KR.po'
    % svn propset fbsd:notbinary yes ko_KR.po
    property 'fbsd:notbinary' set on 'ko_KR.po'
    % svn propset svn:mime-type 'text/xml; charset=UTF-8' article.xml
    property 'svn:mime-type' set on 'article.xml'
    % svn propset fbsd:notbinary yes article.xml
    property 'fbsd:notbinary' set on 'article.xml'
  5. Create a diff of these new files from the ~/doc/ base directory:

    % cd ~/doc
    svn diff ko_KR.UTF-8/articles/explaining-bsd > /tmp/ko-explaining.diff

All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.