On Wed, Sep 17, 2003 at 11:28:36AM +0100, Angus Leeming spake thusly:
> Martin Vermeer wrote:
>
> > On Wed, Sep 17, 2003 at 10:52:48AM +0200, Lars Gullik Bj�nnes spake
> > thusly:
> >
> >> what happens if you function call replace the default args with
> >> N_(...)
> >
> > ?
>
> N_(...) is just an empty macro (does nothing --- see src/gettext.h)
> that enables the po files to document translatable static strings.
> See po/Makefile.in.in. The actual call to the gettext translation is
> through function _(...)
>
> Example:
>
> char const * const translated_string =
> N_("No code to execute. Use N_(...) to flag "
> "this message for translation");
>
> void foo() {
> string const msg1 = _("Call the gettext translation service");
> string const msg2 = _(translated_string);
> }
>
>
> --
> Angus
Like this?
Index: xformsBC.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/xformsBC.C,v
retrieving revision 1.19
diff -u -p -r1.19 xformsBC.C
--- xformsBC.C 23 Aug 2003 00:16:47 -0000 1.19
+++ xformsBC.C 17 Sep 2003 12:51:39 -0000
@@ -20,7 +20,7 @@
xformsBC::xformsBC(ButtonController const & parent,
string const & cancel, string const & close)
- : GuiBC<FL_OBJECT, FL_OBJECT>(parent, cancel, close)
+ : GuiBC<FL_OBJECT, FL_OBJECT>(parent, _(cancel), _(close))
{}
Index: xformsBC.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/xformsBC.h,v
retrieving revision 1.17
diff -u -p -r1.17 xformsBC.h
--- xformsBC.h 23 Aug 2003 00:16:47 -0000 1.17
+++ xformsBC.h 17 Sep 2003 12:51:39 -0000
@@ -23,7 +23,7 @@ class xformsBC : public GuiBC<FL_OBJECT,
public:
///
xformsBC(ButtonController const &,
- string const & = _("Cancel"), string const & = _("Close"));
+ string const & = N_("Cancel"), string const & = N_("Close"));
private:
/// Updates the button sensitivity (enabled/disabled)
Result identical:
error:1932487777 Close
error:1932487777 Cancel
error:1932487777 Minipage Settings
- Martin
pgp00000.pgp
Description: PGP signature
