Re: [PATCH] make default string for sample text of font selector localizable



On 27 Feb 2001, Mathieu Lacage wrote:

> Le 27 Feb 2001 17:26:31 +0400, Vlad Harchev a Иcrit :
> >  Hi, 
> > 
> >  I think it would be nice to make the string "abcdefghijk ABCDEFGHIJK"  used
> > as default string in gtk font selection widget internationalizable. Here is a
> > patch for it.
> > 
> >  I had to remove macro PREVIEW_TEXT (and turn it into variable), since if it's
> > defined as
> > #define PREVIEW_TEXT _("abcdefghijk ABCDEFGHIJK")
> 
> 
> Perhaps the correct way to do it is:
>  #define PREVIEW_TEXT N_("abcdefghijk ABCDEFGHIJK")
> which will mark the string as translatable and will put it in the po
> files.
> Also, in the code using the  PREVIEW_TEXT macro, you should do:
> _(PREVIEW_TEXT)

 No, xgettext I have (0.10.35 - the one that comes with RH6.0) won't mark that
string as translatable either. Example:

$cat > 1.c 
#define BLAH _("M1")
#define BLAH N_("M2")

char* foo = _("V1");
char* foo = _("V2");

$xgettext --keyword=_ --keyword=N_ 1.c
$cat messages.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2001-02-27 19:46+0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL ADDRESS>\n"
"Language-Team: LANGUAGE <LL li org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"

#: 1.c:4
msgid "V1"
msgstr ""

#: 1.c:5
msgid "V2"
msgstr ""
$

 I.e. strings in macros are not marked as translatable!

 Best regards,
  -Vlad





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]