[dev] Gettext strings in framework packages
Jan Schneider
jan at horde.org
Tue Jul 14 09:47:57 UTC 2009
Zitat von Chuck Hagenbuch <chuck at horde.org>:
> Quoting Jan Schneider <jan at horde.org>:
>
>>>>> 3.) Keep gettext strings for each framework package inside each package.
>
>>>> I think getting away from gettext in framework libs is the way to
>>>> go. It's a not insignificant dependency, and hardcoding it
>>>> limits our ability to support other options (we can stub in the
>>>> functions, but for framework packages that's not so useful since
>>>> the stub becomes a dependency for every library).
>>>
>>> I agree in general but I see a few packages where it will be hard
>>> to remove all use of gettext. One of mine would be Kolab_Filter
>>> which is a PEAR package but it is also an application. The Mime
>>> viewers look like they need gettext, too.
>>>
>>> For those packages I think 3) would be the right option.
>>
>> I agree with Gunnar. We provide a lot of useful information with
>> the gettext strings in the libraries. And it would be very
>> ineffective to have to translate library return values to clear
>> text messages in each application that uses them.
>>
>> 3) would theoretically be the most correct solution solution, but
>> it really doesn't work well with the way that gettext works. We
>> would have to switch catalogs (.mo files) on and off each time we
>> do a method call that uses gettext stings inside a library. Even
>> though catalogs are cached in memory, I'm not sure of the
>> performance implications.
>
> What if we kept the strings, but removed the gettext dependency? We
> could still use gettext in Horde itself, building the catalogs
> there? We could have a simple Horde_Translation framework that the
> packages used to manage their strings, and build application-level
> catalogs for more traditional Horde usage...
We would lose one of the major benefits of using gettext if we did
this, unless I misunderstood you. If we don't use gettext calls inside
the code, all the gettext tools that extract strings from the files,
and link strings in po files back to the source code, stop working.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.horde.org/archives/dev/attachments/20090714/01a5d2f3/attachment.bin>
More information about the dev
mailing list