[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xgettext: one comment for multiple translations
From: |
Karl Eichwalder |
Subject: |
Re: xgettext: one comment for multiple translations |
Date: |
Sun, 04 Aug 2002 06:16:50 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.3.50 (i686-pc-linux-gnu) |
address@hidden (Bruno Haible) writes:
Thanks for your answer.
> Thanks for the suggestion. But your proposal has the drawback that the
> simple introduction of whitespace would change the POT file:
>
> /* comment */
> func(_("str1"), _("str2"));
>
> vs.
>
> /* comment */
> func(_("str1"),
> _("str2"));
Yes, but that's a problem in theory only (IMO). When the function
already spreads about more than one line, you can spend one more line
for a comment. One for short messages (inherently ambiguous!) I'd
appreciate the implementation of the proposed feature:
/* GUI button text */
func(_("Save"), _("Abort"));
I know it's possible the embed such info in the message itself:
func( sgettext("GUIbutton|Save"), sgettext("GUIbutton|Abort"));
and provide a sgettext function that throws away the prefix part
"GUIbutton|" (cf. the gettext manual). Unfortunately, hackers don't
seem to like this approach and it's suitable for short texts only.
Thus the KDE guys invent their own gettext function
(cf. gettext/Admin/plans in the CVS tree).
> The workaround/solution for you is obviously to repeat the comment:
>
> /* comment */
> func(_("str1"),
> /* comment */
> _("str2"));
Hackers already cursing on me because all the i18n stuff leads to ugly
cluttered code ;) Maybe one should write:
/* comment on the function -- ignored by xgettext */
func(
/* comment -- seen by xgettext*/
_("str1"),
/* comment -- likewise */
_("str2"));
--
address@hidden (work) / address@hidden (home): |
http://www.suse.de/~ke/ | ,__o
Free Translation Project: | _-\_<,
http://www.iro.umontreal.ca/contrib/po/HTML/ | (*)/'(*)