From 68917f1f4c251cb0a7da3004f4c59efcc9d39251 Mon Sep 17 00:00:00 2001 From: Anders Jonsson Date: Sun, 6 Oct 2024 12:07:39 +0200 Subject: [PATCH] applicationwindow: add note about gettext compatibility Translatable strings in a string called with gtk_builder_new_from_string example are not extractable by gettext. --- gtk/gtkapplicationwindow.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c index adf221c9114..b3354cfe869 100644 --- a/gtk/gtkapplicationwindow.c +++ b/gtk/gtkapplicationwindow.c @@ -74,7 +74,14 @@ * ## A GtkApplicationWindow with a menubar * * The code sample below shows how to set up a `GtkApplicationWindow` - * with a menu bar defined on the [class@Gtk.Application]: + * with a menu bar defined on the [class@Gtk.Application]. + * + * Localization note: Translated strings will be used at + * runtime if a translation exists. However, gettext does not have support + * for extracting strings from an XML string like this. See + * [gettext bug 64481](https://savannah.gnu.org/bugs/?64481) and consider using + * `gtk_builder_new_from_resource` to read XML from a separate file instead + * if gettext extraction is needed. * * ```c * GtkApplication *app = gtk_application_new ("org.gtk.test", 0); -- GitLab