bug-gettext
[Top][All Lists]
Advanced

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

[bug #64481] Gtk.builder.new_from_string strings not extracted


From: Frank Dana
Subject: [bug #64481] Gtk.builder.new_from_string strings not extracted
Date: Mon, 6 Nov 2023 17:45:25 -0500 (EST)

Follow-up Comment #1, bug #64481 (project gettext):

It seems to me this is what gettext_noop() (see 'info "(gettext)Special
cases"' is intended for.

xgettext can't possibly know, when parsing C sources, that the text inside the
Gtk.builder.new_from_string() argument should instead be parsed as Glade XML
(for which it has a completely different parsing mode).

But you can add "--keyword=gettext_noop" to your xgettext arguments, and use
it to export the translatable strings to your .pot file by adding these lines
to the code:

gettext_noop("_Edit");
gettext_noop("_Copy");
gettext_noop("_Paste");


xgettext will capture the strings, and they'll be replaced in the UI thanks to
Gtk.Builder's gettext integration.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64481>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]