.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PO4A 7" .TH PO4A 7 "2018-12-09" "Po4a Tools" "Po4a Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" po4a \- framework to translate documentation and other materials .SH "Introduction" .IX Header "Introduction" The po4a (\s-1PO\s0 for anything) project goal is to ease translations (and more interestingly, the maintenance of translations) using gettext tools on areas where they were not expected like documentation. .SH "Table of content" .IX Header "Table of content" This document is organized as follow: .IP "1 Why should I use po4a? What is it good for?" 4 .IX Item "1 Why should I use po4a? What is it good for?" This introducing chapter explains the motivation of the project and its philosophy. You should read it first if you are in the process of evaluating po4a for your own translations. .IP "2 How to use po4a?" 4 .IX Item "2 How to use po4a?" This chapter is a sort of reference manual, trying to answer the users' questions and to give you a better understanding of the whole process. This introduces how to do things with po4a and serve as an introduction to the documentation of the specific tools. .RS 4 .IP "\s-1HOWTO\s0 begin a new translation?" 4 .IX Item "HOWTO begin a new translation?" .PD 0 .IP "\s-1HOWTO\s0 change the translation back to a documentation file?" 4 .IX Item "HOWTO change the translation back to a documentation file?" .IP "\s-1HOWTO\s0 update a po4a translation?" 4 .IX Item "HOWTO update a po4a translation?" .IP "\s-1HOWTO\s0 convert a pre-existing translation to po4a?" 4 .IX Item "HOWTO convert a pre-existing translation to po4a?" .IP "\s-1HOWTO\s0 add extra text to translations (like translator's name)?" 4 .IX Item "HOWTO add extra text to translations (like translator's name)?" .IP "\s-1HOWTO\s0 do all this in one program invocation?" 4 .IX Item "HOWTO do all this in one program invocation?" .IP "\s-1HOWTO\s0 customize po4a?" 4 .IX Item "HOWTO customize po4a?" .RE .RS 4 .RE .IP "3 How does it work?" 4 .IX Item "3 How does it work?" .PD This chapter gives you a brief overview of the po4a internals, so that you may feel more confident to help us maintaining and improving it. It may also help you understanding why it does not do what you expected, and how to solve your problems. .IP "4 \s-1FAQ\s0" 4 .IX Item "4 FAQ" This chapter groups the Frequently Asked Questions. In fact, most of the questions for now could be formulated that way: \*(L"Why is it designed this way, and not that one?\*(R" If you think po4a isn't the right answer to documentation translation, you should consider reading this section. If it does not answer your question, please contact us on the mailing list. We love feedback. .IP "5 Specific notes about modules" 4 .IX Item "5 Specific notes about modules" This chapter presents the specificities of each module from the translator and original author's point of view. Read this to learn the syntax you will encounter when translating stuff in this module, or the rules you should follow in your original document to make translators' life easier. .Sp Actually, this section is not really part of this document. Instead, it is placed in each module's documentation. This helps ensuring that the information is up to date by keeping the documentation and the code together. .SH "Why should I use po4a? What is it good for?" .IX Header "Why should I use po4a? What is it good for?" I like the idea of open-source software, making it possible for everybody to access software and its source code. But being French, I'm well aware that the licensing is not the only restriction to the openness of software: non-translated free software is useless for non-English speakers, and we still have some work to make it available to really everybody out there. .PP The perception of this situation by the open-source actors did dramatically improve recently. We, as translators, won the first battle and convinced everybody of the translations' importance. But unfortunately, it was the easy part. Now, we have to do the job and actually translate all this stuff. .PP Actually, open-source software themselves benefit of a rather decent level of translation, thanks to the wonderful gettext tool suite. It is able to extract the strings to translate from the program, present a uniform format to translators, and then use the result of their works at run time to display translated messages to the user. .PP But the situation is rather different when it comes to documentation. Too often, the translated documentation is not visible enough (not distributed as a part of the program), only partial, or not up to date. This last situation is by far the worst possible one. Outdated translation can turn out to be worse than no translation at all to the users by describing old program behavior which are not in use anymore. .SS "The problem to solve" .IX Subsection "The problem to solve" Translating documentation is not very difficult in itself. Texts are far longer than the messages of the program and thus take longer to be achieved, but no technical skill is really needed to do so. The difficult part comes when you have to maintain your work. Detecting which parts did change and need to be updated is very difficult, error-prone and highly unpleasant. I guess that this explains why so much translated documentation out there are outdated. .SS "The po4a answers" .IX Subsection "The po4a answers" So, the whole point of po4a is to make the documentation translation \&\fImaintainable\fR. The idea is to reuse the gettext methodology to this new field. Like in gettext, texts are extracted from their original locations in order to be presented in a uniform format to the translators. The classical gettext tools help them updating their works when a new release of the original comes out. But to the difference of the classical gettext model, the translations are then re-injected in the structure of the original document so that they can be processed and distributed just like the English version. .PP Thanks to this, discovering which parts of the document were changed and need an update becomes very easy. Another good point is that the tools will make almost all the work when the structure of the original document gets fundamentally reorganized and when some chapters are moved around, merged or split. By extracting the text to translate from the document structure, it also keeps you away from the text formatting complexity and reduces your chances to get a broken document (even if it does not completely prevent you to do so). .PP Please also see the \fB\s-1FAQ\s0\fR below in this document for a more complete list of the advantages and disadvantages of this approach. .SS "Supported formats" .IX Subsection "Supported formats" Currently, this approach has been successfully implemented to several kinds of text formatting formats: .PP \fIman\fR .IX Subsection "man" .PP The good old manual pages' format, used by so much programs out there. The po4a support is very welcome here since this format is somewhat difficult to use and not really friendly to the newbies. The \fBLocale::Po4a::Man\fR\|(3pm) module also supports the mdoc format, used by the \s-1BSD\s0 man pages (they are also quite common on Linux). .PP \fIpod\fR .IX Subsection "pod" .PP This is the Perl Online Documentation format. The language and extensions themselves are documented that way, as well as most of the existing Perl scripts. It makes easy to keep the documentation close to the actual code by embedding them both in the same file. It makes programmer life easier, but unfortunately, not the translator one. .PP \fIsgml\fR .IX Subsection "sgml" .PP Even if somewhat superseded by \s-1XML\s0 nowadays, this format is still used rather often for documents which are more than a few screens long. It allows you to make complete books. Updating the translation of so long documents can reveal to be a real nightmare. \fBdiff\fR reveals often useless when the original text was re-indented after update. Fortunately, po4a can help you in that process. .PP Currently, only the DebianDoc and DocBook \s-1DTD\s0 are supported, but adding support to a new one is really easy. It is even possible to use po4a on an unknown \s-1SGML DTD\s0 without changing the code by providing the needed information on the command line. See \fBLocale::Po4a::Sgml\fR\|(3pm) for details. .PP \fITeX / LaTeX\fR .IX Subsection "TeX / LaTeX" .PP The LaTeX format is a major documentation format used in the Free Software world and for publications. The \fBLocale::Po4a::LaTeX\fR\|(3pm) module was tested with the Python documentation, a book and some presentations. .PP \fItexinfo\fR .IX Subsection "texinfo" .PP All the \s-1GNU\s0 documentation is written in this format (that's even one of the requirement to become an official \s-1GNU\s0 project). The support for \&\fBLocale::Po4a::Texinfo\fR\|(3pm) in po4a is still at the beginning. Please report bugs and feature requests. .PP \fIxml\fR .IX Subsection "xml" .PP The \s-1XML\s0 format is a base format for many documentation formats. .PP Currently, the DocBook \s-1DTD\s0 is supported by po4a. See \&\fBLocale::Po4a::Docbook\fR\|(3pm) for details. .PP \fIothers\fR .IX Subsection "others" .PP Po4a can also handle some more rare or specialized formats, such as the documentation of compilation options for the 2.4+ Linux kernels or the diagrams produced by the dia tool. Adding a new one is often very easy and the main task is to come up with a parser of your target format. See \&\fBLocale::Po4a::TransTractor\fR\|(3pm) for more information about this. .SS "Unsupported formats" .IX Subsection "Unsupported formats" Unfortunately, po4a still lacks support for several documentation formats. .PP There is a whole bunch of other formats we would like to support in po4a, and not only documentation ones. Indeed, we aim at plugging all \*(L"market holes\*(R" left by the classical gettext tools. It encompass package descriptions (deb and rpm), package installation scripts questions, package changelogs, and all specialized file formats used by the programs such as game scenarios or wine resource files. .SH "How to use po4a?" .IX Header "How to use po4a?" This chapter is a sort of reference manual, trying to answer the users' questions and to give you a better understanding of the whole process. This introduces how to do things with po4a and serve as an introduction to the documentation of the specific tools. .SS "Graphical overview" .IX Subsection "Graphical overview" The following schema gives an overview of the process of translating documentation using po4a. Do not be afraid by its apparent complexity, it comes from the fact that the \fIwhole\fR process is represented here. Once you converted your project to po4a, only the right part of the graphic is relevant. .PP Note that \fImaster.doc\fR is taken as an example for the documentation to be translated and \fItranslation.doc\fR is the corresponding translated text. The suffix could be \fI.pod\fR, \fI.xml\fR, or \fI.sgml\fR depending on its format. Each part of the picture will be detailed in the next sections. .PP .Vb 10 \& master.doc \& | \& V \& +<\-\-\-\-\-<\-\-\-\-+<\-\-\-\-\-<\-\-\-\-\-<\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\->\-\-\-\-\-\-\-\->\-\-\-\-\-\-\-+ \& : | | : \&{translation} | { update of master.doc } : \& : | | : \& XX.doc | V V \& (optional) | master.doc \->\-\-\-\-\-\-\-\->\-\-\-\-\-\->+ \& : | (new) | \& V V | | \& [po4a\-gettextize] doc.XX.po \-\->+ | | \& | (old) | | | \& | ^ V V | \& | | [po4a\-updatepo] | \& V | | V \& translation.pot ^ V | \& | | doc.XX.po | \& | | (fuzzy) | \& { translation } | | | \& | ^ V V \& | | {manual editing} | \& | | | | \& V | V V \& doc.XX.po \-\-\->\-\-\-\->+<\-\-\-<\-\- doc.XX.po addendum master.doc \& (initial) (up\-to\-date) (optional) (up\-to\-date) \& : | | | \& : V | | \& +\-\-\-\-\->\-\-\-\-\->\-\-\-\-\->\-\-\-\-\-\-> + | | \& | | | \& V V V \& +\-\-\-\-\-\->\-\-\-\-\-+\-\-\-\-\-\-<\-\-\-\-\-\-+ \& | \& V \& [po4a\-translate] \& | \& V \& XX.doc \& (up\-to\-date) .Ve .PP On the left part, the conversion of a translation not using po4a to this system is shown. On the top of the right part, the action of the original author is depicted (updating the documentation). The middle of the right part is where the automatic actions of po4a are depicted. The new material are extracted, and compared against the exiting translation. Parts which didn't change are found, and previous translation is used. Parts which were partially modified are also connected to the previous translation, but with a specific marker indicating that the translation must be updated. The bottom of the figure shows how a formatted document is built. .PP Actually, as a translator, the only manual operation you have to do is the part marked {manual editing}. Yeah, I'm sorry, but po4a helps you translate. It does not translate anything for you… .SS "\s-1HOWTO\s0 begin a new translation?" .IX Subsection "HOWTO begin a new translation?" This section presents the needed steps required to begin a new translation with po4a. The refinements involved in converting an existing project to this system are detailed in the relevant section. .PP To begin a new translation using po4a, you have to do the following steps: .IP "\-" 2 Extract the text which have to be translated from the original <\fImaster.doc\fR> document into a new translation template <\fItranslation.pot\fR> file (the gettext format). For that, use the \&\fBpo4a\-gettextize\fR program this way: .Sp .Vb 1 \& $ po4a\-gettextize \-f \-m \-p .Ve .Sp <\fIformat\fR> is naturally the format used in the \fImaster.doc\fR document. As expected, the output goes into \fItranslation.pot\fR. Please refer to \fBpo4a\-gettextize\fR\|(1) for more details about the existing options. .IP "\-" 2 Actually translate what should be translated. For that, you have to rename the \s-1POT\s0 file for example to \fIdoc.XX.po\fR (where \fI\s-1XX\s0\fR is the \s-1ISO 639\-1\s0 code of the language you are translating to, e.g. \fBfr\fR for French), and edit the resulting file. It is often a good idea to not name the file \fI\s-1XX\s0.po\fR to avoid confusion with the translation of the program messages, but this your call. Don't forget to update the \s-1PO\s0 file headers, they are important. .Sp The actual translation can be done using the Emacs' or Vi's \s-1PO\s0 mode, Lokalize (\s-1KDE\s0 based), Gtranslator (\s-1GNOME\s0 based) or whichever program you prefer to use for them (e.g. Virtaal). .Sp If you wish to learn more about this, you definitively need to refer to the gettext documentation, available in the \fBgettext-doc\fR package. .SS "\s-1HOWTO\s0 change the translation back to a documentation file?" .IX Subsection "HOWTO change the translation back to a documentation file?" Once you're done with the translation, you want to get the translated documentation and distribute it to users along with the original one. For that, use the \fBpo4a\-translate\fR\|(1) program like that (where \fI\s-1XX\s0\fR is the language code): .PP .Vb 1 \& $ po4a\-translate \-f \-m \-p \-l .Ve .PP As before, <\fIformat\fR> is the format used in the \fImaster.doc\fR document. But this time, the \s-1PO\s0 file provided with the \fB\-p\fR flag is part of the input. This is your translation. The output goes into \fI\s-1XX\s0.doc\fR. .PP Please refer to \fBpo4a\-translate\fR\|(1) for more details. .SS "\s-1HOWTO\s0 update a po4a translation?" .IX Subsection "HOWTO update a po4a translation?" To update your translation when the original \fImaster.doc\fR file has changed, use the \fBpo4a\-updatepo\fR\|(1) program like that: .PP .Vb 1 \& $ po4a\-updatepo \-f \-m \-p .Ve .PP (Please refer to \fBpo4a\-updatepo\fR\|(1) for more details) .PP Naturally, the new paragraph in the document won't get magically translated in the \s-1PO\s0 file with this operation, and you'll need to update the \s-1PO\s0 file manually. Likewise, you may have to rework the translation for paragraphs which were modified a bit. To make sure you won't miss any of them, they are marked as \*(L"fuzzy\*(R" during the process and you have to remove this marker before the translation can be used by \fBpo4a\-translate\fR. As for the initial translation, the best is to use your favorite \s-1PO\s0 editor here. .PP Once your \s-1PO\s0 file is up-to-date again, without any untranslated or fuzzy string left, you can generate a translated documentation file, as explained in the previous section. .SS "\s-1HOWTO\s0 convert a pre-existing translation to po4a?" .IX Subsection "HOWTO convert a pre-existing translation to po4a?" Often, you used to translate manually the document happily until a major reorganization of the original \fImaster.doc\fR document happened. Then, after some unpleasant tries with \fBdiff\fR or similar tools, you want to convert to po4a. But of course, you don't want to loose your existing translation in the process. Don't worry, this case is also handled by po4a tools and is called gettextization. .PP The key here is to have the same structure in the translated document and in the original one so that the tools can match the content accordingly. .PP If you are lucky (i.e., if the structures of both documents perfectly match), it will work seamlessly and you will be set in a few seconds. Otherwise, you may understand why this process has such an ugly name, and you'd better be prepared to some grunt work here. In any case, remember that it is the price to pay to get the comfort of po4a afterward. And the good point is that you have to do so only once. .PP I cannot emphasize this too much. In order to ease the process, it is thus important that you find the exact version which were used to do the translation. The best situation is when you noted down the \s-1VCS\s0 revision used for the translation and you didn't modify it in the translation process, so that you can use it. .PP It won't work well when you use the updated original text with the old translation. It remains possible, but is harder and really should be avoided if possible. In fact, I guess that if you fail to find the original text again, the best solution is to find someone to do the gettextization for you (but, please, not me ;). .PP Maybe I'm too dramatic here. Even when things go wrong, it remains ways faster than translating everything again. I was able to gettextize the existing French translation of the Perl documentation in one day, even though things \fBdid\fR went wrong. That was more than two megabytes of text, and a new translation would have lasted months or more. .PP Let me explain the basis of the procedure first and I will come back on hints to achieve it when the process goes wrong. To ease comprehension, let's use above example once again. .PP Once you have the old \fImaster.doc\fR again which matches with the translation \&\fI\s-1XX\s0.doc\fR, the gettextization can be done directly to the \s-1PO\s0 file \fIdoc.XX.po\fR without manual translation of \fItranslation.pot\fR file: .PP .Vb 1 \& $ po4a\-gettextize \-f \-m \-l \-p .Ve .PP When you're lucky, that's it. You converted your old translation to po4a and can begin with the updating task right away. Just follow the procedure explained a few section ago to synchronize your \s-1PO\s0 file with the newest original document, and update the translation accordingly. .PP Please note that even when things seem to work properly, there is still room for errors in this process. The point is that po4a is unable to understand the text to make sure that the translation match the original. That's why all strings are marked as \*(L"fuzzy\*(R" in the process. You should check each of them carefully before removing those markers. .PP Often the document structures don't match exactly, preventing \&\fBpo4a\-gettextize\fR from doing its job properly. At that point, the whole game is about editing the files to get their damn structures matching. .PP It may help to read the section \fBGettextization: how does it work?\fR below. Understanding the internal process will help you to make this work. The good point is that \fBpo4a\-gettextize\fR is rather verbose about what went wrong when it happens. First, it pinpoints where in the documents the structures' discrepancies are. You will learn the strings that don't match, their positions in the text, and the type of each of them. Moreover, the \s-1PO\s0 file generated so far will be dumped to \fIgettextization.failed.po\fR. .IP "\-" 4 Remove all extra parts of the translations, such as the section in which you give the translator name and thank every people who contributed to the translation. Addenda, which are described in the next section, will allow you to re-add them afterward. .IP "\-" 4 Do not hesitate to edit both the original and the translation. The most important thing is to get the \s-1PO\s0 file. You will be able to update it afterward. That being said, editing the translation should be preferred when both are possible since it makes things easier when the gettextization is done. .IP "\-" 4 If needed, kill some parts of the original if they happen to not be translated. When synchronizing the \s-1PO\s0 with the document afterward, they will come back from themselves. .IP "\-" 4 If you changed the structure a bit (to merge two paragraphs, or split another one), undo those changes. If there are issues in the original, you should inform the original author. Fixing them in your translation only fixes them for a part of the community. And moreover, it's impossible when using po4a ;) .IP "\-" 4 Sometimes, the paragraph content does match, but their types don't. Fixing it is rather format-dependent. In \s-1POD\s0 and man, it often comes from the fact that one of the two contains a line beginning with a white space where the other doesn't. In those formats, such paragraph cannot be wrapped and thus become a different type. Just remove the space and you are fine. It may also be a typo in the tag name. .Sp Likewise, two paragraphs may get merged together in \s-1POD\s0 when the separating line contains some spaces, or when there is no empty line between the =item line and the content of the item. .IP "\-" 4 Sometimes, there is a desynchronization between the files, and the translation is attached to the wrong original paragraph. It is the sign that the real problem was before in the files. Check \&\fIgettextization.failed.po\fR to see when the desynchronization begins, and fix it there. .IP "\-" 4 Sometimes, you get the strong feeling that po4a ate some parts of the text, either the original or the translation. \fIgettextization.failed.po\fR indicates that both of them were gently matching, and then the gettextization fails because it tried to match one paragraph with the one after (or before) the right one, as if the right one disappeared. Curse po4a as I did when it first happened to me. Generously. .Sp This unfortunate situation happens when the same paragraph is repeated over the document. In that case, no new entry is created in the \s-1PO\s0 file, but a new reference is added to the existing one instead. .Sp So, when the same paragraph appears twice in the original but both are not translated in the exact same way each time, you will get the feeling that a paragraph of the original disappeared. Just kill the new translation. If you prefer to kill the first translation instead when the second one was actually better, replace the first one with the second. .Sp In the contrary, if two similar but different paragraphs were translated in the exact same way, you will get the feeling that a paragraph of the translation disappeared. A solution is to add a stupid string to the original paragraph (such as \*(L"I'm different\*(R"). Don't be afraid, those things will disappear during the synchronization, and when the added text is short enough, gettext will match your translation to the existing text (marking it as fuzzy, but you don't really care since all strings are fuzzy after gettextization). .PP Hopefully, those tips will help you making your gettextization work and obtain your precious \s-1PO\s0 file. You are now ready to synchronize your file and begin your translation. Please note that on large text, it may happen that the first synchronization takes a long time. .PP For example, the first \fBpo4a\-updatepo\fR of the Perl documentation's French translation (5.5 Mb \s-1PO\s0 file) took about two days full on a 1Ghz G5 computer. Yes, 48 hours. But the subsequent ones only take a dozen of seconds on my old laptop. This is because the first time, most of the msgid of the \s-1PO\s0 file don't match any of the \s-1POT\s0 file ones. This forces gettext to search for the closest one using a costly string proximity algorithm. .SS "\s-1HOWTO\s0 add extra text to translations (like translator's name)?" .IX Subsection "HOWTO add extra text to translations (like translator's name)?" Because of the gettext approach, doing this becomes more difficult in po4a than it was when simply editing a new file along the original one. But it remains possible, thanks to the so-called \fBaddenda\fR. .PP It may help the comprehension to consider addenda as a sort of patches applied to the localized document after processing. They are rather different from the usual patches (they have only one line of context, which can embed Perl regular expression, and they can only add new text without removing any), but the functionalities are the same. .PP Their goal is to allow the translator to add extra content to the document which is not translated from the original document. The most common usage is to add a section about the translation itself, listing contributors and explaining how to report bug against the translation. .PP An addendum must be provided as a separate file. The first line constitutes a header indicating where in the produced document they should be placed. The rest of the addendum file will be added verbatim at the determined position of the resulting document. .PP The header line which specify context has a pretty rigid syntax: It must begin with the string \fB\s-1PO4A\-HEADER:\s0\fR, followed by a semi-colon (\fB;\fR) separated list of \fIkey\fR\fB=\fR\fIvalue\fR fields. White spaces \s-1ARE\s0 important. Note that you cannot use the semi-colon char (\fB;\fR) in the value, and that quoting it doesn't help. Optionally, spaces (\fB \fR) may be inserted before \fIkey\fR for readability. .PP Although this context search may be considered to operate roughly on each line of the translated document, it actually operates on the internal data string of the translated document. This internal data string may be a text spanning a paragraph containing multiple lines or may be a \s-1XML\s0 tag itself alone. The exact \fIinsertion point\fR of the addendum must be before or after the internal data string and can not be within the internal data string. .PP The actual internal data string of the translated document can be visualized by executing po4a in debug mode. .PP Again, it sounds scary, but the examples given below should help you to find how to write the header line you need. To illustrate the discussion, assume we want to add a section called \*(L"About this translation\*(R" after the \*(L"About this document\*(R" one. .PP Here are the possible header keys: .IP "\fBmode\fR (mandatory)" 4 .IX Item "mode (mandatory)" It can be either the string \fBbefore\fR or \fBafter\fR. .Sp If \fBmode=before\fR, the \fIinsertion point\fR is determined by one step regex match specified by the \fBposition\fR argument regex. The \fIinsertion point\fR is immediately before the uniquely matched internal data string of the translated document. .Sp If \fBmode=after\fR, the \fIinsertion point\fR is determined by two step regex matches specified by the \fBposition\fR argument regex; and by the \&\fBbeginboundary\fR or \fBendboundary\fR argument regex. .Sp Since there may be multiple sections for the assumed case, let's use 2 step approach. .Sp .Vb 1 \& mode=after .Ve .IP "\fBposition\fR (mandatory)" 4 .IX Item "position (mandatory)" A Perl regexp for specifying the context. .Sp If more than one internal data strings match this expression (or none), the search for the \fIinsertion point\fR and addition of the addendum will fail. It is indeed better to report an error than inserting the addendum at the wrong location. .Sp If \fBmode=before\fR, the \fIinsertion point\fR is specified to be immediately before the internal data string uniquely matching the \fBposition\fR argument regex. .Sp If \fBmode=after\fR, the search for the \fIinsertion point\fR is narrowed down to the data after the internal data string uniquely matching the \fBposition\fR argument regex. The exact \fIinsertion point\fR is further specified by the \&\fBbeginboundary\fR or \fBendboundary\fR. .Sp In our case, we need to skip several preceding sections by narrowing down search using the section title string. .Sp .Vb 1 \& position=About this document .Ve .Sp (In reality, you need to use the translated section title string here, instead.) .IP "\fBbeginboundary\fR (used only when \fBmode=after\fR, and mandatory in that case)" 4 .IX Item "beginboundary (used only when mode=after, and mandatory in that case)" .PD 0 .IP "\fBendboundary\fR (idem)" 4 .IX Item "endboundary (idem)" .PD A second Perl regexp required only when \fBmode=after\fR. The addendum will be placed immediately before or after the first internal data string matching the \&\fBbeginboundary\fR or \fBendboundary\fR argument regexp, respectively. .Sp In our case, we can choose to indicate the end of the section we match by adding: .Sp .Vb 1 \& endboundary= .Ve .Sp or to indicate the beginning of the next section by indicating: .Sp .Vb 1 \& beginboundary=
.Ve .Sp In both cases, our addendum will be placed after the \fB
\fR and before the \fB
\fR. The first one is better since it will work even if the document gets reorganized. .Sp Both forms exist because documentation formats are different. In some of them, there is a way to mark the end of a section (just like the \&\fB
\fR we just used), while some other don't explicitly mark the end of section (like in man). In the former case, you want to make a \&\fIboundary\fR matching the \fIend of a section\fR, so that the \fIinsertion point\fR comes after it. In the latter case, you want to make a \fIboundary\fR matching the \fIbeginning of the next section\fR, so that the \fIinsertion point\fR comes just before it. .PP This can seem obscure, but hopefully, the next examples will enlighten you. .ie n .IP " To sum up the example we used so far, in order to add a section called ""About this translation"" after the ""About this document"" one in a \s-1SGML\s0 document, you can use either of those header lines:" 2 .el .IP " To sum up the example we used so far, in order to add a section called ``About this translation'' after the ``About this document'' one in a \s-1SGML\s0 document, you can use either of those header lines:" 2 .IX Item " To sum up the example we used so far, in order to add a section called About this translation after the About this document one in a SGML document, you can use either of those header lines:" .Vb 2 \& PO4A\-HEADER: mode=after; position=About this document; endboundary= \& PO4A\-HEADER: mode=after; position=About this document; beginboundary=
.Ve .IP " If you want to add something after the following nroff section:" 2 .IX Item " If you want to add something after the following nroff section:" .Vb 1 \& .SH "AUTHORS" .Ve .Sp You should select two step approach by setting \fBmode=after\fR. Then you should narrow down search to the line after \fB\s-1AUTHORS\s0\fR with the \fBposition\fR argument regex. Then, you should match the beginning of the next section (i.e., \&\fB^\e.SH\fR) with the \fBbeginboundary\fR argument regex. That is to say: .Sp .Vb 1 \& PO4A\-HEADER:mode=after;position=AUTHORS;beginboundary=\e.SH .Ve .ie n .IP " If you want to add something into a section (like after ""Copyright Big Dude"") instead of adding a whole section, give a \fBposition\fR matching this line, and give a \fBbeginboundary\fR matching any line." 2 .el .IP " If you want to add something into a section (like after ``Copyright Big Dude'') instead of adding a whole section, give a \fBposition\fR matching this line, and give a \fBbeginboundary\fR matching any line." 2 .IX Item " If you want to add something into a section (like after Copyright Big Dude) instead of adding a whole section, give a position matching this line, and give a beginboundary matching any line." .Vb 1 \& PO4A\-HEADER:mode=after;position=Copyright Big Dude, 2004;beginboundary=^ .Ve .ie n .IP " If you want to add something at the end of the document, give a \fBposition\fR matching any line of your document (but only one line. Po4a won't proceed if it's not unique), and give an \fBendboundary\fR matching nothing. Don't use simple strings here like \fB""\s-1EOF""\s0\fR, but prefer those which have less chance to be in your document." 2 .el .IP " If you want to add something at the end of the document, give a \fBposition\fR matching any line of your document (but only one line. Po4a won't proceed if it's not unique), and give an \fBendboundary\fR matching nothing. Don't use simple strings here like \fB``\s-1EOF''\s0\fR, but prefer those which have less chance to be in your document." 2 .IX Item " If you want to add something at the end of the document, give a position matching any line of your document (but only one line. Po4a won't proceed if it's not unique), and give an endboundary matching nothing. Don't use simple strings here like EOF, but prefer those which have less chance to be in your document." .Vb 1 \& PO4A\-HEADER:mode=after;position=About this document;beginboundary=FakePo4aBoundary .Ve .PP In any case, remember that these are regexp. For example, if you want to match the end of a nroff section ending with the line .PP .Vb 1 \& .fi .Ve .PP don't use \fB.fi\fR as \fBendboundary\fR, because it will match with \*(L"the[ fi]le\*(R", which is obviously not what you expect. The correct \fBendboundary\fR in that case is: \fB^\e.fi$\fR. .PP If the addendum doesn't go where you expected, try to pass the \fB\-vv\fR argument to the tools, so that they explain you what they do while placing the addendum. .PP \fIMore detailed example\fR .IX Subsection "More detailed example" .PP Original document (\s-1POD\s0 formatted): .PP .Vb 7 \& |=head1 NAME \& | \& |dummy \- a dummy program \& | \& |=head1 AUTHOR \& | \& |me .Ve .PP Then, the following addendum will ensure that a section (in French) about the translator is added at the end of the file (in French, \*(L"\s-1TRADUCTEUR\*(R"\s0 means \*(L"\s-1TRANSLATOR\*(R",\s0 and \*(L"moi\*(R" means \*(L"me\*(R"). .PP .Vb 6 \& |PO4A\-HEADER:mode=after;position=AUTEUR;beginboundary=^=head \& | \& |=head1 TRADUCTEUR \& | \& |moi \& | .Ve .PP In order to put your addendum before the \s-1AUTHOR,\s0 use the following header: .PP .Vb 1 \& PO4A\-HEADER:mode=after;position=NOM;beginboundary=^=head1 .Ve .PP This works because the next line matching the \fBbeginboundary\fR /^=head1/ after the section \*(L"\s-1NAME\*(R"\s0 (translated to \*(L"\s-1NOM\*(R"\s0 in French), is the one declaring the authors. So, the addendum will be put between both sections. Note that if another section is added between \s-1NAME\s0 and \s-1AUTHOR\s0 sections later, po4a will wrongfully put the addenda before the new section. .PP To avoid this you may accomplish the same using \fBmode\fR=\fIbefore\fR: .PP .Vb 1 \& PO4A\-HEADER:mode=before;position=^=head1 AUTEUR .Ve .SS "\s-1HOWTO\s0 do all this in one program invocation?" .IX Subsection "HOWTO do all this in one program invocation?" The use of po4a proved to be a bit error prone for the users since you have to call two different programs in the right order (\fBpo4a\-updatepo\fR and then \fBpo4a\-translate\fR), each of them needing more than 3 arguments. Moreover, it was difficult with this system to use only one \s-1PO\s0 file for all your documents when more than one format was used. .PP The \fBpo4a\fR\|(1) program was designed to solve those difficulties. Once your project is converted to the system, you write a simple configuration file explaining where your translation files are (\s-1PO\s0 and \s-1POT\s0), where the original documents are, their formats and where their translations should be placed. .PP Then, calling \fBpo4a\fR\|(1) on this file ensures that the \s-1PO\s0 files are synchronized against the original document, and that the translated document are generated properly. Of course, you will want to call this program twice: once before editing the \s-1PO\s0 files to update them and once afterward to get a completely updated translated document. But you only need to remember one command line. .SS "\s-1HOWTO\s0 customize po4a?" .IX Subsection "HOWTO customize po4a?" po4a modules have options (specified with the \fB\-o\fR option) that can be used to change the module behavior. .PP You can also edit the source code of the existing modules or even write your own modules. To make them visible to po4a, copy your modules into a path called \f(CW\*(C`/bli/blah/blu/lib/Locale/Po4a/\*(C'\fR and then adding the path \f(CW\*(C`/bli/blah/blu\*(C'\fR in the \f(CW\*(C`PERLIB\*(C'\fR or \f(CW\*(C`PERL5LIB\*(C'\fR environment variable. For example: .PP .Vb 1 \& PERLLIB=$PWD/lib po4a \-\-previous po4a/po4a.cfg .Ve .PP Note: the actual name of the lib directory is not important. .SH "How does it work?" .IX Header "How does it work?" This chapter gives you a brief overview of the po4a internals, so that you may feel more confident to help us maintaining and improving it. It may also help you understanding why it does not do what you expected, and how to solve your problems. .SS "What's the big picture here?" .IX Subsection "What's the big picture here?" The po4a architecture is object oriented (in Perl. Isn't that neat?). The common ancestor to all parser classes is called TransTractor. This strange name comes from the fact that it is at the same time in charge of translating document and extracting strings. .PP More formally, it takes a document to translate plus a \s-1PO\s0 file containing the translations to use as input while producing two separate outputs: Another \s-1PO\s0 file (resulting of the extraction of translatable strings from the input document), and a translated document (with the same structure than the input one, but with all translatable strings replaced with content of the input \s-1PO\s0). Here is a graphical representation of this: .PP .Vb 6 \& Input document \-\-\e /\-\-\-> Output document \& \e TransTractor:: / (translated) \& +\-\->\-\- parse() \-\-\-\-\-\-\-\-+ \& / \e \& Input PO \-\-\-\-\-\-\-\-/ \e\-\-\-> Output PO \& (extracted) .Ve .PP This little bone is the core of all the po4a architecture. If you omit the input \s-1PO\s0 and the output document, you get \fBpo4a\-gettextize\fR. If you provide both input and disregard the output \s-1PO,\s0 you get \fBpo4a\-translate\fR. The \fBpo4a\fR calls TransTractor twice and calls \fBmsgmerge \-U\fR between these TransTractor invocations to provide one-stop solution with a single configuration file. .PP \&\fBTransTractor::parse()\fR is a virtual function implemented by each module. Here is a little example to show you how it works. It parses a list of paragraphs, each of them beginning with \fB

\fR. .PP .Vb 10 \& 1 sub parse { \& 2 PARAGRAPH: while (1) { \& 3 $my ($paragraph,$pararef,$line,$lref)=("","","",""); \& 4 $my $first=1; \& 5 while (($line,$lref)=$document\->shiftline() && defined($line)) { \& 6 if ($line =~ m/

/ && !$first\-\-; ) { \& 7 $document\->unshiftline($line,$lref); \& 8 \& 9 $paragraph =~ s/^

//s; \& 10 $document\->pushline("

".$document\->translate($paragraph,$pararef)); \& 11 \& 12 next PARAGRAPH; \& 13 } else { \& 14 $paragraph .= $line; \& 15 $pararef = $lref unless(length($pararef)); \& 16 } \& 17 } \& 18 return; # Did not got a defined line? End of input file. \& 19 } \& 20 } .Ve .PP On line 6 and 7, we encounter \f(CW\*(C`shiftline()\*(C'\fR and \f(CW\*(C`unshiftline()\*(C'\fR. These help you to read and unread the head of internal input data stream of master document into the line string and its reference. Here, the reference is provided by a string \f(CW\*(C`$filename:$linenum\*(C'\fR. Please remember Perl only has one dimensional array data structure. So codes handling the internal input data stream line are a bit cryptic. .PP On line 6, we encounter \fB

\fR for the second time. That's the signal of the next paragraph. We should thus put the just obtained line back into the original document (line 7) and push the paragraph built so far into the outputs. After removing the leading \fB

\fR of it on line 9, we push the concatenation of this tag with the translation of the rest of the paragraph. .PP This \fBtranslate()\fR function is very cool. It pushes its argument into the output \&\s-1PO\s0 file (extraction) and returns its translation as found in the input \s-1PO\s0 file (translation). Since it's used as part of the argument of \fBpushline()\fR, this translation lands into the output document. .PP Isn't that cool? It is possible to build a complete po4a module in less than 20 lines when the format is simple enough… .PP You can learn more about this in \&\fBLocale::Po4a::TransTractor\fR\|(3pm). .SS "Gettextization: how does it work?" .IX Subsection "Gettextization: how does it work?" The idea here is to take the original document and its translation, and to say that the Nth extracted string from the translation is the translation of the Nth extracted string from the original. In order to work, both files must share exactly the same structure. For example, if the files have the following structure, it is very unlikely that the 4th string in translation (of type 'chapter') is the translation of the 4th string in original (of type 'paragraph'). .PP .Vb 1 \& Original Translation \& \& chapter chapter \& paragraph paragraph \& paragraph paragraph \& paragraph chapter \& chapter paragraph \& paragraph paragraph .Ve .PP For that, po4a parsers are used on both the original and the translation files to extract \s-1PO\s0 files, and then a third \s-1PO\s0 file is built from them taking strings from the second as translation of strings from the first. In order to check that the strings we put together are actually the translations of each other, document parsers in po4a should put information about the syntactical type of extracted strings in the document (all existing ones do so, yours should also). Then, this information is used to make sure that both documents have the same syntax. In the previous example, it would allow us to detect that string 4 is a paragraph in one case, and a chapter title in another case and to report the problem. .PP In theory, it would be possible to detect the problem, and resynchronize the files afterward (just like \fBdiff\fR does). But what we should do of the few strings before desynchronizations is not clear, and it would produce bad results some times. That's why the current implementation don't try to resynchronize anything and verbosely fail when something goes wrong, requiring manual modification of files to fix the problem. .PP Even with these precautions, things can go wrong very easily here. That's why all translations guessed this way are marked fuzzy to make sure that the translator reviews and checks them. .SS "Addendum: How does it work?" .IX Subsection "Addendum: How does it work?" Well, that's pretty easy here. The translated document is not written directly to disk, but kept in memory until all the addenda are applied. The algorithms involved here are rather straightforward. We look for a line matching the position regexp, and insert the addendum before it if we're in \&\fBmode=before\fR. If not, we search for the next line matching the boundary and insert the addendum after this line if it's an \fBendboundary\fR or before this line if it's a \fBbeginboundary\fR. .SH "FAQ" .IX Header "FAQ" This chapter groups the Frequently Asked Questions. In fact, most of the questions for now could be formulated that way: \*(L"Why is it designed this way, and not that one?\*(R" If you think po4a isn't the right answer to documentation translation, you should consider reading this section. If it does not answer your question, please contact us on the mailing list. We love feedback. .SS "Why to translate each paragraph separately?" .IX Subsection "Why to translate each paragraph separately?" Yes, in po4a, each paragraph is translated separately (in fact, each module decides this, but all existing modules do so, and yours should also). There are two main advantages to this approach: .IP "\(bu" 2 When the technical parts of the document are hidden from the scene, the translator can't mess with them. The fewer markers we present to the translator the less error he can do. .IP "\(bu" 2 Cutting the document helps in isolating the changes to the original document. When the original is modified, finding what parts of the translation need to be updated is eased by this process. .PP Even with these advantages, some people don't like the idea of translating each paragraph separately. Here are some of the answers I can give to their fear: .IP "\(bu" 2 This approach proved successfully in the \s-1KDE\s0 project and allows people there to produce the biggest corpus of translated and up to date documentation I know. .IP "\(bu" 2 The translators can still use the context to translate, since the strings in the \s-1PO\s0 file are in the same order than in the original document. Translating sequentially is thus rather comparable whether you use po4a or not. And in any case, the best way to get the context remains to convert the document to a printable format since the text formatting ones are not really readable, \s-1IMHO.\s0 .IP "\(bu" 2 This approach is the one used by professional translators. I agree, that they have somewhat different goals than open-source translators. The maintenance is for example often less critical to them since the content changes rarely. .SS "Why not to split on sentence level (or smaller)?" .IX Subsection "Why not to split on sentence level (or smaller)?" Professional translator tools sometimes split the document at the sentence level in order to maximize the reusability of previous translations and speed up their process. The problem is that the same sentence may have several translations, depending on the context. .PP Paragraphs are by definition longer than sentences. It will hopefully ensure that having the same paragraph in two documents will have the same meaning (and translation), regardless of the context in each case. .PP Splitting on smaller parts than the sentence would be \fBvery bad\fR. It would be a bit long to explain why here, but interested reader can refer to the \&\fBLocale::Maketext::TPJ13\fR\|(3pm) man page (which comes with the Perl documentation), for example. To make short, each language has its specific syntactic rules, and there is no way to build sentences by aggregating parts of sentences working for all existing languages (or even for the 5 of the 10 most spoken ones, or even less). .SS "Why not put the original as comment along with translation (or the other way around)?" .IX Subsection "Why not put the original as comment along with translation (or the other way around)?" At the first glance, gettext doesn't seem to be adapted to all kind of translations. For example, it didn't seem adapted to debconf, the interface all Debian packages use for their interaction with the user during installation. In that case, the texts to translate were pretty short (a dozen lines for each package), and it was difficult to put the translation in a specialized file since it has to be available before the package installation. .PP That's why the debconf developer decided to implement another solution, where translations are placed in the same file than the original. This is rather appealing. One would even want to do this for \s-1XML,\s0 for example. It would look like that: .PP .Vb 3 \&

\& My title \& Mon titre \& \& \& My text. \& Mon texte. \& \&
.Ve .PP But it was so problematic that a PO-based approach is now used. Only the original can be edited in the file, and the translations must take place in \&\s-1PO\s0 files extracted from the master template (and placed back at package compilation time). The old system was deprecated because of several issues: .IP "\(bu" 4 maintenance problems .Sp If several translators provide a patch at the same time, it gets hard to merge them together. .Sp How will you detect changes to the original, which need to be applied to the translations? In order to use diff, you have to note which version of the original you translated. I.e., you need a \s-1PO\s0 file in your file ;) .IP "\(bu" 4 encoding problems .Sp This solution is viable when only European languages are involved, but the introduction of Korean, Russian and/or Arab really complicate the picture. \&\s-1UTF\s0 could be a solution, but there are still some problems with it. .Sp Moreover, such problems are hard to detect (i.e., only Korean readers will detect that the encoding of Korean is broken [because of the Russian translator]). .PP gettext solves all those problems together. .SS "But gettext wasn't designed for that use!" .IX Subsection "But gettext wasn't designed for that use!" That's true, but until now nobody came with a better solution. The only known alternative is manual translation, with all the maintenance issues. .SS "What about the other translation tools for documentation using gettext?" .IX Subsection "What about the other translation tools for documentation using gettext?" As far as I know, there are only two of them: .IP "\fBpoxml\fR" 4 .IX Item "poxml" This is the tool developed by \s-1KDE\s0 people to handle DocBook \s-1XML. AFAIK,\s0 it was the first program to extract strings to translate from documentation to \&\s-1PO\s0 files, and inject them back after translation. .Sp It can only handle \s-1XML,\s0 and only a particular \s-1DTD. I\s0'm quite unhappy with the handling of lists, which end in one big msgid. When the list become big, the chunk becomes harder to swallow. .IP "\fBpo-debiandoc\fR" 4 .IX Item "po-debiandoc" This program done by Denis Barbier is a sort of precursor of the po4a \s-1SGML\s0 module, which more or less deprecates it. As the name says, it handles only the DebianDoc \s-1DTD,\s0 which is more or less a deprecated \s-1DTD.\s0 .PP The main advantages of po4a over them are the ease of extra content addition (which is even worse there) and the ability to achieve gettextization. .SS "Educating developers about translation" .IX Subsection "Educating developers about translation" When you try to translate documentation or programs, you face three kinds of problems; linguistics (not everybody speaks two languages), technical (that's why po4a exists) and relational/human. Not all developers understand the necessity of translating stuff. Even when good willed, they may ignore how to ease the work of translators. To help with that, po4a comes with lot of documentation which can be referred to. .PP Another important point is that each translated file begins with a short comment indicating what the file is, how to use it. This should help the poor developers flooded with tons of files in different languages they hardly speak, and help them dealing correctly with it. .PP In the po4a project, translated documents are not source files anymore, in the sense that these files are not the preferred form of the work for making modifications to it. Since this is rather unconventional, that's a source of easy mistakes. That's why all files present this header: .PP .Vb 10 \& | ***************************************************** \& | * GENERATED FILE, DO NOT EDIT * \& | * THIS IS NO SOURCE FILE, BUT RESULT OF COMPILATION * \& | ***************************************************** \& | \& | This file was generated by po4a\-translate(1). Do not store it (in VCS, \& | for example), but store the PO file used as source file by po4a\-translate. \& | \& | In fact, consider this as a binary, and the PO file as a regular source file: \& | If the PO gets lost, keeping this translation up\-to\-date will be harder ;) .Ve .PP Likewise, gettext's regular \s-1PO\s0 files only need to be copied to the \fIpo/\fR directory. But \fBthis is not the case of the ones manipulated by po4a\fR. The major risk here is that a developer erases the existing translation of his program with the translation of his documentation. (Both of them can't be stored in the same \s-1PO\s0 file, because the program needs to install its translation as an mo file while the documentation only uses its translation at compile time). That's why the \s-1PO\s0 files produced by the po-debiandoc module contain the following header: .PP .Vb 10 \& # \& # ADVISES TO DEVELOPERS: \& # \- you do not need to manually edit POT or PO files. \& # \- this file contains the translation of your debconf templates. \& # Do not replace the translation of your program with this !! \& # (or your translators will get very upset) \& # \& # ADVISES TO TRANSLATORS: \& # If you are not familiar with the PO format, gettext documentation \& # is worth reading, especially sections dedicated to this format. \& # For example, run: \& # info \-n \*(Aq(gettext)PO Files\*(Aq \& # info \-n \*(Aq(gettext)Header Entry\*(Aq \& # \& # Some information specific to po\-debconf are available at \& # /usr/share/doc/po\-debconf/README\-trans \& # or http://www.debian.org/intl/l10n/po\-debconf/README\-trans \& # .Ve .SS "\s-1SUMMARY\s0 of the advantages of the gettext based approach" .IX Subsection "SUMMARY of the advantages of the gettext based approach" .IP "\(bu" 2 The translations are not stored along with the original, which makes it possible to detect if translations become out of date. .IP "\(bu" 2 The translations are stored in separate files from each other, which prevents translators of different languages from interfering, both when submitting their patch and at the file encoding level. .IP "\(bu" 2 It is based internally on \fBgettext\fR (but \fBpo4a\fR offers a very simple interface so that you don't need to understand the internals to use it). That way, we don't have to re-implement the wheel, and because of their wide use, we can think that these tools are more or less bug free. .IP "\(bu" 2 Nothing changed for the end-user (beside the fact translations will hopefully be better maintained). The resulting documentation file distributed is exactly the same. .IP "\(bu" 2 No need for translators to learn a new file syntax and their favorite \s-1PO\s0 file editor (like Emacs' \s-1PO\s0 mode, Lokalize or Gtranslator) will work just fine. .IP "\(bu" 2 gettext offers a simple way to get statistics about what is done, what should be reviewed and updated, and what is still to do. Some example can be found at those addresses: .Sp .Vb 2 \& \- https://docs.kde.org/stable5/en/kdesdk/lokalize/project\-view.html \& \- http://www.debian.org/intl/l10n/ .Ve .PP But everything isn't green, and this approach also has some disadvantages we have to deal with. .IP "\(bu" 2 Addenda are… strange at the first glance. .IP "\(bu" 2 You can't adapt the translated text to your preferences, like splitting a paragraph here, and joining two other ones there. But in some sense, if there is an issue with the original, it should be reported as a bug anyway. .IP "\(bu" 2 Even with an easy interface, it remains a new tool people have to learn. .Sp One of my dreams would be to integrate somehow po4a to Gtranslator or Lokalize. When a documentation file is opened, the strings are automatically extracted, and a translated file + po file can be written to disk. If we manage to do an \s-1MS\s0 Word (\s-1TM\s0) module (or at least \s-1RTF\s0) professional translators may even use it. .SH "AUTHORS" .IX Header "AUTHORS" .Vb 2 \& Denis Barbier \& Martin Quinson (mquinson#debian.org) .Ve