Roberto J. Hoyle wrote:
What parameter am I supposed to pass into OpenCA::PKCS7 for the GETTEXT field? The sourcecode that I have found passess in $self->{GETTEXT} which isn't very useful for me, and the gettext perldoc doesn't seem to have an object-oriented interface or a Locale::gettext::new function for it.

This is a trick to have only one translation function in the complete sourcecode. We have a function i18nGettext in misc-utils.lib. We always pass a functionpointer to this function to the modules. You can simply copy the function from src/common/lib/functions/misc-utils.lib.


The function itself uses the following interface:

i18nGettext ("The line __NUMBER__ cannot include the string __TEXT__.",
             "__NUMBER__", $number,
             "__TEXT__", $text);

First the function uses gettext to translate the sentence and then we use a regex to replace the parameters __NUMBER__ and __TEXT__ with the values in the variables.

Other projects like KDE or Gnome uses sprintf for this.

Michael
--
-------------------------------------------------------------------
Michael Bell                   Email: [EMAIL PROTECTED]
ZE Computer- und Medienservice            Tel.: +49 (0)30-2093 2482
(Computing Centre)                        Fax:  +49 (0)30-2093 2704
Humboldt-University of Berlin
Unter den Linden 6
10099 Berlin                   Email (private): [EMAIL PROTECTED]
Germany                                       http://www.openca.org



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
OpenCA-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/openca-devel

Reply via email to