[Freeipa-devel] [PATCH] add i18n translation support

Rob Crittenden rcritten at redhat.com
Wed Feb 10 03:08:01 UTC 2010


John Dennis wrote:
> This patch is a rework of the "add l10n support" sent on 1/30/2010.
> It is virtually identical except no initial languages are defined 
> (install/po/LINGUAS is empty) and it contains an initial .pot file. This 
> should set us up to flip the switch on transifex.net to start our 
> translations.
> 
> Comments from the original patch follow. Rob did apply that patch and 
> everything worked for him (but he wanted to delay creation of the .po 
> files which this rework accomplishes).
> 
> The primary patch has two major changes:
> 
> * modification of our existing build mechanism
> 
> * a new directory install/po which contains the l10n framework and
>   translation catalogs.
> 
> The first major change to the build mechanism was replacing the
> autogen.sh script. I had discovered it was buggy, in particular it's
> logic for comparing the version of tools was flawed (used just string
> comparison so it thought version 7 of a tool was newer than version
> 11). Also there didn't seem to be a reason for this script since the
> autoregen tool is the preferred mechanism to bootstrap an autotools
> build. Older OS's do not have autoregen but We only need to bootstrap
> when we generate a distribution which can always be done on a current
> Fedora system.
> 
> The second part of the changes to the build mechanism were the
> necessary modifications to build the l10n components.
> 
> * edit Makefile.am to add the new subdir to descent into
> 
> * Add new files to generate to configure.ac
> 
> * Add new macros to configure.ac to find the gettext tools and set the
>   message catalog name.
> 
> * Edit the spec file to add a build dependency on gettext and add the
>   translation files.
> 
> Then add the l10n framework in install/po. There is a README there you
> might want to peruse. The initial set of languages we'll provide
> translations for is in the install/po/LINGUAS file. The set of files
> to scan for translatable strings is in install/po/Makefile.in, we'll
> need to manually update this file when we add or remove source files
> containing translatable strings.
> 
> We provide one message catalog for all strings in IPA. Message
> catalogs are referred to as "domains". This means we have just one
> domain for IPA and it's installed under the name "ipa". The message
> catalogs are not partitioned by rpm component. The message catalogs
> are provided in the ipapython rpm which all other rpms depend on.
> 
> Please note, there is now a build dependency on gettext, most you
> should already have this package installed.
> 
> This patch does alter the way the build runs and it's possible it
> might introduce a build failure. I have tested builds in clean trees
> on F12 and did not have any problems. I wanted to do a scratch build
> for Fedora just to bullet proof but I couldn't figure out how to do
> it. I'll of course fix any build issue which might arise that I didn't
> catch earlier.
> 
> Jason and I did discuss adding a "test" language to test translations
> in our test framework. This patch does not include that, it will follow.
> 
> John

Nice. Ack, pushed to master.

rob




More information about the Freeipa-devel mailing list