[Gforge-devel] Switched to gettext

Roland Mas lolando at debian.org
Fri Mar 16 04:39:07 EDT 2007


Robert Nelson, 2007-03-14 23:08:45 -0700 :

>> - When the translators have done their job, and sent updated *.po
>> files, run ../tools/make-mo.sh, which will regenerate the
>> locales/xx/LC_MESSAGES/gforge.mo files.  These files should be
>> installed into /usr/share/locale/xx/LC_MESSAGS/gforge.mo, so that
>> gettext finds them (if that path is liable to change -- although I
>> doubt it, it seems pretty standard across Linux distros --
>> BaseLanguage.class should be updated accordingly).
>> 
>
> Chris and I have been working on removing hardcoded paths from
> GForge so that it can be installed on systems without root access.
> Do you mind if I change this hardcoded path to a local.inc variable
> called $sys_locale_path?

Of course not :-)

>>   Plugins hosted in the gforge.org SVN trunk are internationalised
>> the same as the rest of the core code.  For external plugins, the
>> procedure will be slightly more complex.  Since they can't depend
>> on their strings being present in the main catalog, they'll need to
>> use another "domain".  In other words, they won't be able to simply
>> use _("foo bar"), but they'll have to use the longer
>> dgettext("gforge-plugin-foobar", "foo bar") instead; also, they'll
>> need to provide gforge-plugin-foobar.mo files and declare that
>> gettext domain around the initialisation time of the plugin.  I
>> guess I'll try and code that on an "external" plugin.
>> 
>
> If you decide to put their language files in a different directory,
> can you also make it a variable rather than a hardcoded path?

  I don't see much point in having language files in a different
directory.  If Gforge is installed "system-wide" and according to the
FHS, the plugin's *.mo files whould reside in the same place as
Gforge's.  If installed in a custom location, say /opt or /usr/local,
I see no reason to have different paths for Gforge proper and its
plugins.  But I won't complain if someone makes that change, so long
as the default value stays sane :-)

Roland.
-- 
Roland Mas

In every life you got some trouble, when you worry you make it double.
  -- in Don't worry, be happy (Bobby McFerrin)


More information about the Gforge-devel mailing list