Index: head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml =================================================================== --- head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml (revision 50965) +++ head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml (revision 50966) @@ -1,247 +1,247 @@ Editor Configuration Adjusting text editor configuration can make working on document files quicker and easier, and help documents conform to FDP guidelines. <application>Vim</application> Install from editors/vim or editors/vim-lite, then follow the configuration instructions in . Use Press P to reformat paragraphs or text that has been selected in Visual mode. Press T to replace groups of eight spaces with a tab. Configuration Edit ~/.vimrc, adding these lines to the end of the file: if has("autocmd") au BufNewFile,BufRead *.sgml,*.ent,*.xsl,*.xml call Set_SGML() au BufNewFile,BufRead *.[1-9] call ShowSpecial() endif " has(autocmd) function Set_Highlights() "match ExtraWhitespace /^\s* \s*\|\s\+$/ highlight default link OverLength ErrorMsg match OverLength /\%71v.\+/ return 0 endfunction function ShowSpecial() setlocal list listchars=tab:>>,trail:*,eol:$ hi def link nontext ErrorMsg return 0 endfunction " ShowSpecial() function Set_SGML() setlocal number syn match sgmlSpecial "&[^;]*;" setlocal syntax=sgml setlocal filetype=xml setlocal shiftwidth=2 setlocal textwidth=70 setlocal tabstop=8 setlocal softtabstop=2 setlocal formatprg="fmt -p" setlocal autoindent setlocal smartindent " Rewrap paragraphs noremap P gqj " Replace spaces with tabs noremap T :s/ /\t/<CR> call ShowSpecial() call Set_Highlights() return 0 endfunction " Set_SGML() <application>Emacs</application> Install from editors/emacs or editors/emacs-devel. Validation Emacs's nxml-mode uses compact relax NG schemas for validating XML. A compact relax NG schema for FreeBSD's extension to DocBook 5.0 is included in the documentation repository. To configure nxml-mode to validate using this schema, create ~/.emacs.d/schema/schemas.xml and add these lines to the file: locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0" documentElement localName="section" typeId="DocBook" documentElement localName="chapter" typeId="DocBook" documentElement localName="article" typeId="DocBook" documentElement localName="book" typeId="DocBook" typeId id="DocBook" uri="/usr/local/share/xml/docbook/5.0/rng/docbook.rnc" locatingRules Automated Proofreading with Flycheck and Igor The Flycheck package is available from Milkypostman's Emacs Lisp Package Archive (MELPA). If MELPA is not already in Emacs's packages-archives, it can be added by evaluating (add-to-list 'package-archives '("melpa" . "http://stable.melpa.org/packages/") t) Add the line to Emacs's initialization file (one of ~/.emacs, ~/.emacs.el, or ~.emacs.d/init.el) to make this change permanent. To install Flycheck, evaluate (package-install 'flycheck) Create a Flycheck checker for textproc/igor by evaluating (flycheck-define-checker igor "FreeBSD Documentation Project sanity checker. -See URLs http://www.freebsd.org/docproj/ and +See URLs https://www.freebsd.org/docproj/ and http://www.freshports.org/textproc/igor/." :command ("igor" "-X" source-inplace) :error-parser flycheck-parse-checkstyle :modes (nxml-mode) :standard-input t) (add-to-list 'flycheck-checkers 'igor 'append) Again, add these lines to Emacs's initialization file to make the changes permanent. FreeBSD Documentation Specific Settings To apply settings specific to the FreeBSD documentation project, create .dir-locals.el in the root directory of the documentation repository and add these lines to the file: ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((nxml-mode (eval . (turn-on-auto-fill)) (fill-column . 70) (eval . (require 'flycheck)) (eval . (flycheck-mode 1)) (flycheck-checker . igor) (eval . (add-to-list 'rng-schema-locating-files "~/.emacs.d/schema/schemas.xml")))) <application>nano</application> Install from editors/nano or editors/nano-devel. Configuration Copy the sample XML syntax highlight file to the user's home directory: &prompt.user; cp /usr/local/share/nano/xml.nanorc ~/.nanorc Use an editor to replace the lines in the ~/.nanorc syntax "xml" block with these rules: syntax "xml" "\.([jrs]html?|xml|xslt?)$" # trailing whitespace color ,blue "[[:space:]]+$" # multiples of eight spaces at the start a line # (after zero or more tabs) should be a tab color ,blue "^([TAB]*[ ]{8})+" # tabs after spaces color ,yellow "( )+TAB" # highlight indents that have an odd number of spaces color ,red "^(([ ]{2})+|(TAB+))*[ ]{1}[^ ]{1}" # lines longer than 70 characters color ,yellow "^(.{71})|(TAB.{63})|(TAB{2}.{55})|(TAB{3}.{47}).+$" Process the file to create embedded tabs: &prompt.user; perl -i'' -pe 's/TAB/\t/g' ~/.nanorc Use Specify additional helpful options when running the editor: &prompt.user; nano -AKipwz -r 70 -T8 chapter.xml Users of &man.csh.1; can define an alias in ~/.cshrc to automate these options: alias nano "nano -AKipwz -r 70 -T8" After the alias is defined, the options will be added automatically: &prompt.user; nano chapter.xml Index: head/en_US.ISO8859-1/books/fdp-primer/overview/chapter.xml =================================================================== --- head/en_US.ISO8859-1/books/fdp-primer/overview/chapter.xml (revision 50965) +++ head/en_US.ISO8859-1/books/fdp-primer/overview/chapter.xml (revision 50966) @@ -1,259 +1,259 @@ Overview Welcome to the &os; Documentation Project (FDP). Quality documentation is crucial to the success of &os;, and we value your contributions very highly. This document describes how the FDP is organized, how to write and submit documentation, and how to effectively use the available tools. Everyone is welcome to contribute to the FDP. Willingness to contribute is the only membership requirement. This primer shows how to: Identify which parts of &os; are maintained by the FDP. Install the required documentation tools and files. Make changes to the documentation. Submit changes back for review and inclusion in the &os; documentation. Quick Start Some preparatory steps must be taken before editing the &os; documentation. First, subscribe to the &a.doc;. Some team members also interact on the #bsddocs IRC channel on EFnet. These people can help with questions or problems involving the documentation. Install the textproc/docproj meta-package and Subversion. This meta-package installs all of the software needed to edit and build &os; documentation. The Subversion package is needed to obtain a working of the documentation and generate patches with. &prompt.root; pkg install docproj subversion Install a local working copy of the documentation from the &os; repository in ~/doc (see ). &prompt.user; svn checkout https://svn.FreeBSD.org/doc/head ~/doc Configure the text editor: Word wrap set to 70 characters. Tab stops set to 2. Replace each group of 8 leading spaces with a single tab. Specific editor configurations are listed in . Update the local working copy: &prompt.user; svn up ~/doc Edit the documentation files that require changes. If a file needs major changes, consult the mailing list for input. References to tag and entity usage can be found in and . After editing, check for problems by running: &prompt.user; igor -R filename.xml | less -RS Review the output and edit the file to fix any problems shown, then rerun the command to find any remaining problems. Repeat until all of the errors are resolved. Always build-test changes before submitting them. Running make in the top-level directory of the documentation being edited will generate that documentation in split HTML format. For example, to build the English version of the Handbook in HTML, run make in the en_US.ISO8859-1/books/handbook/ directory. When changes are complete and tested, generate a diff file: &prompt.user; cd ~/doc &prompt.user; svn diff > bsdinstall.diff.txt Give the diff file a descriptive name. In the example above, changes have been made to the bsdinstall portion of the Handbook. Submit the diff file using the web-based Problem Report system. If using the web form, enter a Summary of [patch] short description of problem. Select the Component Documentation. In the Description field, enter a short description of the changes and any important details about them. Use the [ Add an attachment ] button to attach the diff file. Finally, use the [ Submit Bug ] button to submit your diff to the problem report system. The &os; Documentation Set The FDP is responsible for four categories of &os; documentation. Handbook: The Handbook is the comprehensive online resource and reference for &os; users. FAQ: The FAQ uses a short question and answer format to address questions that are frequently asked on the various mailing lists and forums devoted to &os;. This format does not permit long and comprehensive answers. Manual pages: The English language system manual pages are usually not written by the FDP, as they are part of the base system. However, the FDP can reword parts of existing manual pages to make them clearer or to correct inaccuracies. Web site: This is the main &os; - presence on the web, visible at http://www.FreeBSD.org/ + presence on the web, visible at https://www.FreeBSD.org/ and many mirrors around the world. The web site is typically a new user's first exposure to &os;. Translation teams are responsible for translating the Handbook and web site into different languages. Manual pages are not translated at present. Documentation source for the &os; web site, Handbook, and FAQ is available in the documentation repository at https://svn.FreeBSD.org/doc/. Source for manual pages is available in a separate source repository located at https://svn.FreeBSD.org/base/. Documentation commit messages are visible with svn log. Commit messages are also archived at &a.svn-doc-all.url;. Web frontends to both of these repositories are available at and . Many people have written tutorials or how-to articles about &os;. Some are stored as part of the FDP files. In other cases, the author has decided to keep the documentation separate. The FDP endeavors to provide links to as much of this external documentation as possible. Index: head/en_US.ISO8859-1/books/fdp-primer/translations/chapter.xml =================================================================== --- head/en_US.ISO8859-1/books/fdp-primer/translations/chapter.xml (revision 50965) +++ head/en_US.ISO8859-1/books/fdp-primer/translations/chapter.xml (revision 50966) @@ -1,472 +1,472 @@ Translations This is the FAQ for people translating the FreeBSD documentation (FAQ, Handbook, tutorials, manual pages, and others) to different languages. It is very heavily based on the translation FAQ from the FreeBSD German Documentation Project, originally written by Frank Gründer elwood@mc5sys.in-berlin.de and translated back to English by Bernd Warken bwarken@mayn.de. The FAQ is maintained by the &a.doceng;. What do i18n and l10n mean? i18n means internationalization and l10n means localization. They are just a convenient shorthand. i18n can be read as i followed by 18 letters, followed by n. Similarly, l10n is l followed by 10 letters, followed by n. Is there a mailing list for translators? Yes. Different translation groups have their own - mailing lists. The list + mailing lists. The list of translation projects has more information about the mailing lists and web sites run by each translation project. In addition there is freebsd-translators@freebsd.org for general translation discussion. Are more translators needed? Yes. The more people work on translation the faster it gets done, and the faster changes to the English documentation are mirrored in the translated documents. You do not have to be a professional translator to be able to help. What languages do I need to know? Ideally, you will have a good knowledge of written English, and obviously you will need to be fluent in the language you are translating to. English is not strictly necessary. For example, you could do a Hungarian translation of the FAQ from the Spanish translation. What software do I need to know? It is strongly recommended that you maintain a local copy of the FreeBSD Subversion repository (at least the documentation part). This can be done by running: &prompt.user; svn checkout https://svn.FreeBSD.org/doc/head/ head svn.FreeBSD.org is a public SVN server. Verify the server certificate from the list of Subversion mirror sites. This will require the devel/subversion package to be installed. You should be comfortable using svn. This will allow you to see what has changed between different versions of the files that make up the documentation. For example, to view the differences between revisions r33733 and r33734 of en_US.ISO8859-1/books/fdp-primer/book.xml, run: &prompt.user; svn diff -r33733:33734 en_US.ISO8859-1/books/fdp-primer/book.xml How do I find out who else might be translating to the same language? - The Documentation + The Documentation Project translations page lists the translation efforts that are currently known about. If others are already working on translating documentation to your language, please do not duplicate their efforts. Instead, contact them to see how you can help. If no one is listed on that page as translating for your language, then send a message to the &a.doc; in case someone else is thinking of doing a translation, but has not announced it yet. No one else is translating to my language. What do I do? Congratulations, you have just started the FreeBSD your-language-here Documentation Translation Project. Welcome aboard. First, decide whether or not you have got the time to spare. Since you are the only person working on your language at the moment it is going to be your responsibility to publicize your work and coordinate any volunteers that might want to help you. Write an email to the Documentation Project mailing list, announcing that you are going to translate the documentation, so the Documentation Project translations page can be maintained. If there is already someone in your country providing FreeBSD mirroring services you should contact them and ask if you can have some webspace for your project, and possibly an email address or mailing list services. Then pick a document and start translating. It is best to start with something fairly small—either the FAQ, or one of the tutorials. I have translated some documentation, where do I send it? That depends. If you are already working with a translation team (such as the Japanese team, or the German team) then they will have their own procedures for handling submitted documentation, and these will be outlined on their web pages. If you are the only person working on a particular language (or you are responsible for a translation project and want to submit your changes back to the FreeBSD project) then you should send your translation to the FreeBSD project (see the next question). I am the only person working on translating to this language, how do I submit my translation? or We are a translation team, and want to submit documentation that our members have translated for us. First, make sure your translation is organized properly. This means that it should drop into the existing documentation tree and build straight away. Currently, the FreeBSD documentation is stored in a top level directory called head/. Directories below this are named according to the language code they are written in, as defined in ISO639 (/usr/share/misc/iso639 on a version of FreeBSD newer than 20th January 1999). If your language can be encoded in different ways (for example, Chinese) then there should be directories below this, one for each encoding format you have provided. Finally, you should have directories for each document. For example, a hypothetical Swedish translation might look like: head/ sv_SE.ISO8859-1/ Makefile htdocs/ docproj/ books/ faq/ Makefile book.xml sv_SE.ISO8859-1 is the name of the translation, in lang.encoding form. Note the two Makefiles, which will be used to build the documentation. Use &man.tar.1; and &man.gzip.1; to compress up your documentation, and send it to the project. &prompt.user; cd doc &prompt.user; tar cf swedish-docs.tar sv_SE.ISO8859-1 &prompt.user; gzip -9 swedish-docs.tar Put swedish-docs.tar.gz somewhere. If you do not have access to your own webspace (perhaps your ISP does not let you have any) then you can email &a.doceng;, and arrange to email the files when it is convenient. Either way, you should use Bugzilla to submit a report indicating that you have submitted the documentation. It would be very helpful if you could get other people to look over your translation and double check it first, since it is unlikely that the person committing it will be fluent in the language. Someone (probably the Documentation Project Manager, currently &a.doceng;) will then take your translation and confirm that it builds. In particular, the following things will be looked at: Do all your files use RCS strings (such as "ID")? Does make all in the sv_SE.ISO8859-1 directory work correctly? Does make install work correctly? If there are any problems then whoever is looking at the submission will get back to you to work them out. If there are no problems your translation will be committed as soon as possible. Can I include language or country specific text in my translation? We would prefer that you did not. For example, suppose that you are translating the Handbook to Korean, and want to include a section about retailers in Korea in your Handbook. There is no real reason why that information should not be in the English (or German, or Spanish, or Japanese, or …) versions as well. It is feasible that an English speaker in Korea might try to pick up a copy of FreeBSD whilst over there. It also helps increase FreeBSD's perceived presence around the globe, which is not a bad thing. If you have country specific information, please submit it as a change to the English Handbook (using Bugzilla) and then translate the change back to your language in the translated Handbook. Thanks. How should language specific characters be included? Non-ASCII characters in the documentation should be included using SGML entities. Briefly, these look like an ampersand (&), the name of the entity, and a semi-colon (;). The entity names are defined in ISO8879, which is in the ports tree as textproc/iso8879. A few examples include: Entity Appearance Description &eacute; é Small e with an acute accent &Eacute; É Large E with an acute accent &uuml; ü Small u with an umlaut After you have installed the iso8879 port, the files in /usr/local/share/xml/iso8879 contain the complete list. Addressing the reader In the English documents, the reader is addressed as you, there is no formal/informal distinction as there is in some languages. If you are translating to a language which does distinguish, use whichever form is typically used in other technical documentation in your language. If in doubt, use a mildly polite form. Do I need to include any additional information in my translations? Yes. The header of the English version of each document will look something like this: <!-- The FreeBSD Documentation Project $FreeBSD: head/en_US.ISO8859-1/books/faq/book.xml 38674 2012-04-14 13:52:52Z $ --> The exact boilerplate may change, but it will always include a $FreeBSD$ line and the phrase The FreeBSD Documentation Project. Note that the $FreeBSD part is expanded automatically by Subversion, so it should be empty (just $FreeBSD$) for new files. Your translated documents should include their own $FreeBSD$ line, and change the FreeBSD Documentation Project line to The FreeBSD language Documentation Project. In addition, you should add a third line which indicates which revision of the English text this is based on. So, the Spanish version of this file might start: <!-- The FreeBSD Spanish Documentation Project $FreeBSD: head/es_ES.ISO8859-1/books/faq/book.xml 38826 2012-05-17 19:12:14Z hrs $ Original revision: r38674 -->