\documentclass{beamer}


\mode<presentation>
{
  \usetheme{Warsaw}
  % or ...

  \setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}


\usepackage[english]{babel}
% or whatever

\usepackage{pdfpages}

\usepackage{ucs}
\usepackage[utf8x]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}


\title[programs, debconf, man pages translation using gettext] % (optional, use only with long paper titles)
{Programs, debconf, man pages translation using gettext : a tutorial for skilled and less skilled Debian developers and translators}

\author[bubulle] % (optional, use only with lots of authors)
{Christian ~Perrier}
% - Give the names in the same order as the appear in the paper.
% - Use the \inst{?} command only if the authors have different
%   affiliation.

% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date[Debconf 5] % (optional, should be abbreviation of conference name)
{5th Debian Conference, Helsinki,\\ Finland}
% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
% yourself) who are reading the slides online




\pgfdeclareimage[height=2cm]{debian-logo}{debian-swirl}
\logo{\pgfuseimage{debian-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
  \begin{center}
    \small{This work is dedicated to René Cougnenc}
  \end{center}
\end{frame}

\begin{frame}
	\tableofcontents
\end{frame}

%%%%%%%%%%%%%%%%%

\section{Tutorial structure}

\begin{frame}
  \frametitle{What is in this tutorial?}
	\begin{itemize}[<+->]
	\item
	handling localisation in already internationalised software
	\item
	handling Debian specific localisation in packages
	\item
	a too short tutorial
	\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%

\begin{frame}
  \frametitle{What is NOT in this tutorial?}
	\begin{itemize}
	\item
	internationalising software (NOT a gettext course)
	\item
	character encodings explanations
	\item
	it is INFORMAL...
	\item
	...and badly prepared
	\end{itemize}
\end{frame}

\begin{frame}
  \frametitle{A few reminders}
  \begin{itemize}
  \item
    Internationalisation (i18n)
    \begin{itemize}
    \item
      Get software ready to work with different languages in different countries
      %\pause
    \end{itemize}
  \item
    Localisation (l10n)
    \begin{itemize}
    \item
      Translate software and documentation to different languages
      %\pause
    \end{itemize}
  \item
    Multilingualisation (m17n)
    \begin{itemize}
    \item
      Get software ready to be used in several languages at the same time
      %\pause
    \end{itemize}
  \item
    Globalisation (g11n)
    \begin{itemize}
    \item	
	The whole picture      
    \end{itemize}
  \item
    Bubullisation (b11n)
    \begin{itemize}
    \item	
	The pain for you to be here and listen to me talking tooo much
      %\pause
    \end{itemize}
    \end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%

\section{Digging in the dirt}

\begin{frame}
  \frametitle{Let's find the places we'll get hurt}
    \begin{itemize}
    \item
	GNU hello 
	    \begin{itemize}
		    \item
			a good example of an already i18n'ed software.
		    \item
			a good example of Debian package
	    \end{itemize}
    \end{itemize}

\end{frame}

\subsection{Programs translations}

\begin{frame}
  \frametitle{Hello compilation and i18n}
    \begin{itemize}
    \item
	Let's dig in it NOW
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{LESSON Nr. 1}

    \begin{itemize}
    \item
	Software author: thou shalt comment the source
    \item
	Translator: thou shalt whine and request comments
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{The mysterious PO files}
    \begin{itemize}
	    \item
		Usually lie in a po/ directory
	\item
		PO==Portable Object files
	    \begin{itemize}
		    \item
			\texttt{msgfmt} compile to MO files
	    \end{itemize}
    \item
	Advantages:
	    \begin{itemize}
		    \item
			text files
		    \item
			simple format
			    \begin{itemize}
				    \item
					header: file contents and information about translator(s)
				    \item
					strings: the msgid/msgstr couple
			    \end{itemize}
	    \end{itemize}
    \item
	Caveat(s):
	    \begin{itemize}
		    \item
			depends on English for string IDs
	    \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Important files in a po/ directory}

    \begin{itemize}
    \item
	\texttt{LINGUAS}
	    \begin{itemize}
		    \item
			Lists the supported languages (PO-->MO)
		    \item
			Depending on build process, also see \texttt{LINGUAS} or \texttt{ALL\_LINGUAS} variables
		\end{itemize}
    \item
	\texttt{POTFILES\{.in\}}
	    \begin{itemize}
		    \item
			Defines WHICH files contain translatable material
			\item
			Reference for (auto)build tools to list the supported languages
		\end{itemize}
    \item
	The POT file
	    \begin{itemize}
		    \item
			PO ``template'' file
			\item
			Contains the translatable material (list of msgids)
		\end{itemize}
    \item
	The PO files
	    \begin{itemize}
		    \item
			One per language (ISO-639 code AND NOTHING ELSE)
			\item
			Contains the translations
			\item
			May use various encodings. DO NOT MESS THEM.
		\end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{LESSON Nr. 2}

    \begin{itemize}
    \item
	Thou shalt not change msgstr
    \item
	Thou shalt not change encoding without reason
    \item
	Thou shalt not use xx\_YY file names except:
    	\begin{itemize}
    	\item
		pt\_BR/pt
    	\item
		zh\_CN/zh\_TW
    	\item
		pa\_IN/pa\_PK
    	\end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Let's translate Hello to Klingon}

    \begin{itemize}
    \item
	ISO code name?
	    \begin{itemize}
		    \item
			\texttt{grep -i klingon /usr/share/iso-codes/iso\_639.tab}
		\end{itemize}
    \item
	\texttt{cp hello.pot tlh.po}
    \item
	Header fields 
	\end{itemize}
\end{frame}

%\begin{frame}
%  \frametitle{PO files headers (Enrico-compliant slide)}

%    \begin{itemize}
%    \item
%	Project-Id-Version
%	    \begin{itemize}
%		    \item
%			  not well standardized use. Package or program name \dots
%		\end{itemize}
%    \item
%	Report-Msgid-Bugs-To : 
%	    \begin{itemize}
%		    \item
%			  e-mail address where errors in ORIGINAL text should be  reported
%		\end{itemize}
%    \item
%	POT-Creation-Date: 
%	    \begin{itemize}
%		    \item
%		  date of the last update of the POT
%		\end{itemize}
%st    \item
%	PO-Revision-Date: 
%	    \begin{itemize}
%		    \item
%  		MUST BE CHANGED by translators for each update
%		\end{itemize}
%    \item
%	Last-Translator: 
%	    \begin{itemize}
%		    \item
%		 Contact for this translation. VERY IMPORTANT.
%		\end{itemize}
%    \item
%	Language-Team:
%	    \begin{itemize}
%		    \item
%	 Often used as backup contact. Opened or moderated list preferrably
%		\end{itemize}
%    \item
%	MIME fields:
%	    \begin{itemize}
%		    \item
% 		Replace CHARSET by the real charset in the file
%		\end{itemize}
%	\end{itemize}
%\end{frame}

\begin{frame}
  \frametitle{LESSON Nr. 3}

    \begin{itemize}
    \item
	Properly fill in the header fields
    \item
	DO NOT change header fields
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Status of translations}

The magic \texttt{msgfmt} utility:
    \begin{itemize}
    \item
	\texttt{msgfmt --check}
    \item
	\texttt{msgfmt --statistics}
    \item
Fuzzy? Untranslated?
    \item
Changing upstream strings ``fuzzies'' the translations
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Other useful utilities}

    \begin{itemize}
    \item
	\texttt{msgcat}
	    \begin{itemize}
    		\item
			Reformat and/or concatenate files
	    \end{itemize}
    \item
	\texttt{msgmerge}
	    \begin{itemize}
    		\item
			Merge msgids of a POT file into a PO file
	    \end{itemize}
    \item
	\texttt{msgattrib}
	    \begin{itemize}
    		\item
			Manipulate translation attributes (fuzzy/untranslated/obsoleted)
	    \end{itemize}
    \item
	\texttt{msgfilter}
	    \begin{itemize}
    		\item
			Apply a filter to all translations of a translation catalog
	    \end{itemize}
    \item
	\texttt{msguniq}
	    \begin{itemize}
    		\item
			Deal with duplicates msgid's
	    \end{itemize}
    \item
	\texttt{msguntypot}
	    \begin{itemize}
    		\item
			NOT IN GETTEXT: deal with typo corrections
	    \end{itemize}
    \end{itemize}
\end{frame}

\subsection{Debconf translations}

\begin{frame}
  \frametitle{What's involved?}
    \begin{itemize}
    \item
	\texttt{*.templates} file : the reference file(s)
    \item
	po directory
    \item
	\texttt{debconf-updatepo}
    \item
	\texttt{dh\_installdebconf} magic
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{LESSON Nr. 4}

    \begin{itemize}
    \item
	Write good English in templates
	    \begin{itemize}
    		\item
			\texttt{debian-l10n-english}
	    \end{itemize}
    \item
	Use consistent style
	    \begin{itemize}
    		\item
			Read the Developer's Reference!
	    \end{itemize}	
    \item
	Make more use of common templates
	    \begin{itemize}
    		\item
			www-config
    		\item
			dbconfig-common
	    \end{itemize}	
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{A few tricks with debconf templates}

    \begin{itemize}
    \item
	podebconf-display-po
	    \begin{itemize}
    		\item
			Display translated debconf templates as they should be
	    \end{itemize}
    \item
	podebconf-report-po
	    \begin{itemize}
    		\item
			Warn translators about needed updates
	    \end{itemize}	
    \end{itemize}
\end{frame}

\subsection{Man pages translations}

\begin{frame}
  \frametitle{Why are man pages translations painful?}
    \begin{itemize}
    \item
	Many translation projects outside projects
    \item
	Traditional model: maintenance is painful
    \item
	No relation between original and translation
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Thou shalt use PO}
    \begin{itemize}
    \item
	Translators are used to PO files
    \item
	Good tools exist
	    \begin{itemize}
		    \item
			po4a
		    \item
			xml2po (gnome-doc-utils)
		    \item
			poxml
	    \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{po4a: Martin and Denis save our souls}
    \begin{itemize}
    \item
	Strings are extracted from the original
    \item
	Translated into the PO
    \item
	Reinject translations in a new document
    \item
	    \begin{itemize}
		    \item
			\huge{po4a ROCKS}
	    \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{The journey of a translated man page}
    \begin{itemize}
    \item
	Re-use an existing translation: \texttt{po4a-gettextize}
    \item
	Update the PO file wrt original: \texttt{po4a-updatepo}
    \item
	Complete/Correct/Break the PO file
    \item
	Generate the translated man page: \texttt{po4a-translate}
    \item
	    \begin{itemize}
		    \item
			\huge{po4a ROCKS}
	    \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{po4a towards World Domination}
    \begin{itemize}
    \item
	Very few packages use po4a for man pages	
	    \begin{itemize}
		    \item
			apt-show-versions
		    \item
			po4a
	    \end{itemize}
    \item
	Internally used in the French team
    \item
	Thou shalt be po4ayed
	    \begin{itemize}
		    \item
			dpkg
		    \item
			apt
	    \end{itemize}
    \item
	    \begin{itemize}
		    \item
			\huge{po4a ROCKS}
	    \end{itemize}
    \end{itemize}
\end{frame}


\begin{frame}
  \frametitle{LESSON Nr. 5}

    \begin{itemize}
    \item
	Thou shalt switch thy man page to po4a
	    \begin{itemize}
    		\item
			Ask for help on \texttt{debian-i18n} mailing list
	    \end{itemize}
    \item
	    \begin{itemize}
		    \item
			\huge{po4a ROCKS}
	    \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{PO rUleZ}
    \begin{itemize}
	\item
		\huge{Just Po It}
    \item
	    \begin{itemize}
		    \item
			\huge{po4a ROCKS}
	    \end{itemize}
    \end{itemize}
\end{frame}


\end{document}
 	
