[gtk/more-vs-proj-updates: 5/9] win32/generate-msvc.mak: Add rules for gtk30[-properties].pot




commit e7f67bd3924a28abe9ca2a2bcf7c7bce1e338cf8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue May 31 18:19:10 2022 +0800

    win32/generate-msvc.mak: Add rules for gtk30[-properties].pot
    
    This adds rules using xgettext to generate gtk30.pot and
    gtk30-properties.pot.
    
    Currently, the XGETTEXT=... must be supplied, since it will likely come
    from a MSYS2 or Cygwin installation on Windows.
    
    This will help us get closer to support building more directly from a
    GIT checkout with the Visual Studio projects

 win32/generate-msvc.mak | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
---
diff --git a/win32/generate-msvc.mak b/win32/generate-msvc.mak
index acc9252e85..621aa90931 100644
--- a/win32/generate-msvc.mak
+++ b/win32/generate-msvc.mak
@@ -447,6 +447,29 @@ regenerate-demos-h-win32: ..\demos\gtk-demo\geninclude.py $(demo_actual_sources)
        @$(PYTHON) geninclude.py demos.h.win32 $(demo_sources)
        @cd ..\..\win32
 
+..\po\gtk30.pot: ..\gtk\gtkbuilder.its
+       $(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=TRANSLATORS: --from-code=UTF-8 --keyword=_ --keyword=N_  \
+       --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments   \
+       --files-from="$(@D:\=/)/POTFILES.in" --output=$(@F)
+       @move $(@F) $@
+
+..\po-properties\gtk30-properties.pot:
+       $(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=".." \
+       --from-code=UTF-8 --keyword --keyword=P_ --add-comments \
+       --files-from="$(@D:\=/)/POTFILES.in"
+       @move $(@B).po $@
+
 # Remove the generated files
 clean:
        @-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gresource


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