← Back to team overview

ubuntu-manual team mailing list archive

Re: Script for generating a draft PDF for review

 

On 03/13/2013 12:10 AM, Carsten Gerlach wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello at all,

I wrote a script which modifies a translated po file of our manual in
such a way, that every string gets a link to the corresponding entry
on Launchpad. I think this will be useful for the review phase of a
translation. You can easily read the text in the PDF and if you want
to fix something click on the link and you will land directly on the
Launchpad site. The links are placed at the left side of the strings
and are written "to the left", so the layout should stay untouched.
But this means that e.g. enumeration marks can be swapped with the LP
links.

To use this script you have to do the following steps:

1. Save the script directly to the /po directory of your branch.
2. Make it executable with
   $ chmod u+x update_po_files_with_LP_links.sh

3. Modify the ubuntu-manual.tex file:
3.1. Move any \input command after the \begin{document}, e.g. the
\input{frontmatter/glossary-entries}. Otherwise you will get
compilation errors.
3.2. Add this new command after the \begin{document}

\newcommand{\lplink}[1]{\makebox[0cm][r]{\href{https://translations.launchpad.net/ubuntu-manual/precise-e2/+pots/ubuntu-manual/\polang/#1/+translate}{\small{\normalfont
[#1]}}}}

This is one line. Take care of the right branch name in the link, in
this case »precise-e2«.

4. Go to the /po directory and execute the script like:
   $ ./update_po_files_with_LP_links.sh en.po
An backup of the original file is stored under **.po-backup.

5. Go out of the /po directory and do a
   $ make ubuntu-manual-en.pdf

6. Open your review PDF and enjoy proofreading :-)

If you want to see how the result looks like, see the current German
draft of the precise-e2 version [1].

I hope you will find it useful, too. And if you find any bugs or what
ever, let me know. I will try to improve it. :-)


Greetings, Carsten


[1] http://ubuntuone.com/6E3PLypVgAhGx6AQwAXdrE


- -- Hier ist mein öffentlicher GPG-Schlüssel:
http://daswaldhorn.piranho.de/gpg/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlE/p98ACgkQ6SlDN6cxaI4pMACeOn1wbk/LEUC1URSXrUHuYD2I
guIAoMFTEOCkGcZmOLkPaEBbYyUuAET1
=nRBu
-----END PGP SIGNATURE-----


_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-manual
Post to     : ubuntu-manual@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ubuntu-manual
More help   : https://help.launchpad.net/ListHelp
Excellent job !

I think that this script is a powerful tool needed from all translation teams ! We will use the script on the next translated manual, for sure ! As Greek team we've finished proofreading process.

Thank you for your great contribution !

--John

Follow ups

References