[gtk/more-vs-proj-updates] Visual Studio projects: Support regenerating gtk30.pot
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/more-vs-proj-updates] Visual Studio projects: Support regenerating gtk30.pot
- Date: Sat, 4 Jun 2022 03:36:47 +0000 (UTC)
commit 754eb40d8e4e4533d4b7febb21a32559a31372e9
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Sat Jun 4 11:33:16 2022 +0800
Visual Studio projects: Support regenerating gtk30.pot
Apparently, we need to run xgettext two times when generating the final
gtk30.pot, one with --its=.. and the other with --join-existing -F on
the file that was generated with --its. This will help us to get closer
to support building more directly from a GIT checkout with the Visual
Studio projects.
win32/generate-msvc.mak | 64 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)
---
diff --git a/win32/generate-msvc.mak b/win32/generate-msvc.mak
index 9b5678afab..94228dd91f 100644
--- a/win32/generate-msvc.mak
+++ b/win32/generate-msvc.mak
@@ -447,7 +447,69 @@ regenerate-demos-h-win32: ..\demos\gtk-demo\geninclude.py $(demo_actual_sources)
@$(PYTHON) geninclude.py demos.h.win32 $(demo_sources)
@cd ..\..\win32
-# We don't generate gtk30.pot here since that is in the repos
+..\po\gtk30.pot: ..\gtk\gtkbuilder.its
+# Deal with the .ui (gtkbuilder) files first
+ $(XGETTEXT) --default-domain="$(@B)" \
+ --copyright-holder="GTK+ Team and others. See AUTHORS" \
+ --package-name="gtk+" \
+ --package-version="$(GTK_VERSION)" \
+ --msgid-bugs-address="https://gitlab.gnome.org/GNOME/gtk/-/issues/" \
+ --directory=".." \
+ --add-comments --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2
--keyword=g_dngettext:2,3 \
+ --its=$** \
+ --from-code=utf-8 --flag=g_dngettext:2:pass-c-format \
+ --flag=g_strdup_printf:1:c-format \
+ --flag=g_string_printf:2:c-format \
+ --flag=g_string_append_printf:2:c-format \
+ --flag=g_error_new:3:c-format \
+ --flag=g_set_error:4:c-format \
+ --flag=g_markup_printf_escaped:1:c-format \
+ --flag=g_log:3:c-format \
+ --flag=g_print:1:c-format \
+ --flag=g_printerr:1:c-format \
+ --flag=g_printf:1:c-format \
+ --flag=g_fprintf:2:c-format \
+ --flag=g_sprintf:2:c-format \
+ --flag=g_snprintf:3:c-format \
+ --flag=g_scanner_error:2:c-format \
+ --flag=g_scanner_warn:2:c-format \
+ --flag=gtk_message_dialog_format_secondary_markup:2:c-format \
+ --flag=gtk_message_dialog_format_secondary_text:2:c-format \
+ --flag=gtk_message_dialog_new:5:c-format \
+ --flag=gtk_message_dialog_new_with_markup:5:c-format \
+ --files-from="$(@D:\=/)/POTFILES.in" --output=$(@F)
+
+# ... then the C files
+ $(XGETTEXT) --default-domain="$(@B)" \
+ --copyright-holder="GTK+ Team and others. See AUTHORS" \
+ --package-name="gtk+" \
+ --package-version="$(GTK_VERSION)" \
+ --msgid-bugs-address="https://gitlab.gnome.org/GNOME/gtk/-/issues/" \
+ --directory=".." \
+ --add-comments --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2
--keyword=g_dngettext:2,3 \
+ --from-code=utf-8 --flag=g_dngettext:2:pass-c-format \
+ --flag=g_strdup_printf:1:c-format \
+ --flag=g_string_printf:2:c-format \
+ --flag=g_string_append_printf:2:c-format \
+ --flag=g_error_new:3:c-format \
+ --flag=g_set_error:4:c-format \
+ --flag=g_markup_printf_escaped:1:c-format \
+ --flag=g_log:3:c-format \
+ --flag=g_print:1:c-format \
+ --flag=g_printerr:1:c-format \
+ --flag=g_printf:1:c-format \
+ --flag=g_fprintf:2:c-format \
+ --flag=g_sprintf:2:c-format \
+ --flag=g_snprintf:3:c-format \
+ --flag=g_scanner_error:2:c-format \
+ --flag=g_scanner_warn:2:c-format \
+ --flag=gtk_message_dialog_format_secondary_markup:2:c-format \
+ --flag=gtk_message_dialog_format_secondary_text:2:c-format \
+ --flag=gtk_message_dialog_new:5:c-format \
+ --flag=gtk_message_dialog_new_with_markup:5:c-format \
+ --files-from="$(@D:\=/)/POTFILES.in" --output=$(@F) --join-existing -F
+ @move $(@F) $@
+
..\po-properties\gtk30-properties.pot:
$(XGETTEXT) --default-domain="$(@B)" \
--copyright-holder="GTK+ Team and others. See AUTHORS" \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]