[Freeipa-devel] [PATCH] add l10n support

Rob Crittenden rcritten at redhat.com
Tue Feb 2 20:54:30 UTC 2010


John Dennis wrote:
> There are 2 patches attached which add internationalized message
> catalog support (l10n, i.e. localization). The patch was split into 2
> pieces for easier review. The first patch contains only the
> modifications to build components and the new framework. The second
> patch adds all the translation files which really don't need review
> because they're generated files but must be kept in our source code
> repository for translators to update.
> 
> 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, but it's not
> hard to add once this patch is in place.
> 
> John

We discussed in IRC whether we should include the untranslated po files 
or not. The sssd project only ships those that are already translated, 
I'm wondering if we should take a simliar approach.

One advantage is we could quickly see what translations (or partial 
translations) we have by merely seeing what po files there are. 
Otherwise I guess we'd have to look in each one to be able to tell.

It otherwise applies and builds fine, I don't otherwise see any problems 
with this patch.

rob




More information about the Freeipa-devel mailing list