* get .po infrastructure in place
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 27 Sep 2010 18:54:53 +0000 (20:54 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 27 Sep 2010 21:36:22 +0000 (23:36 +0200)
citadel/.gitignore
citadel/configure.ac
citadel/po/Makefile.in [new file with mode: 0644]
citadel/po/create-pot.sh [new file with mode: 0755]

index 5c55734a17aea77503a1ffeaa93d2b28e8135067..29d2dba6b389e4737152f67863f5353ccee51da6 100644 (file)
@@ -3,6 +3,8 @@
 Make_modules
 Make_sources
 Makefile
+Makefile.in
+locale
 aclocal.m4
 aidepost
 base64
index db8b1b6a947ebbca38acb34884c3ea2cd72897f0..ce871bf7d17a071cd1e4649e66bc62c918934575 100644 (file)
@@ -1012,7 +1012,7 @@ AC_SUBST(SERVER_LDFLAGS)
 AC_SUBST(SERVER_LIBS)
 AC_SUBST(SETUP_LIBS)
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT(database_cleanup.sh)
+AC_OUTPUT(database_cleanup.sh po/Makefile)
 
 if test -z "$DATABASE"; then
        AC_MSG_WARN([No database driver was found. Please install Berkeley DB.])
diff --git a/citadel/po/Makefile.in b/citadel/po/Makefile.in
new file mode 100644 (file)
index 0000000..b03f2f4
--- /dev/null
@@ -0,0 +1,31 @@
+include ../Make_sources
+
+
+SRCS:=  $(wildcard *.po)
+OBJS:=  $(patsubst %.po, \
+       ../locale/%/LC_MESSAGES/citadel_setup.mo, \
+       $(SRCS))
+#      ../locale/%/LC_MESSAGES/citadel_client.mo, \
+#      ../locale/%/LC_MESSAGES/citadel_server.mo, \
+
+.SUFFIXES: .po .mo
+
+.PHONY: all
+
+all: $(OBJS)
+
+clean:
+       rm -r ../locale/*
+
+../locale/%/LC_MESSAGES/citadel_setup.mo: %.po
+       mkdir -p $(patsubst %.po, ../locale/%/LC_MESSAGES, $<)
+       msgfmt -o $@ $<
+
+#../locale/%/LC_MESSAGES/citadel_client.mo: %.po
+#      mkdir -p $(patsubst %.po, ../locale/%/LC_MESSAGES, $<)
+#      msgfmt -o $@ $<
+#
+#../locale/%/LC_MESSAGES/citadel_server.mo: %.po
+#      mkdir -p $(patsubst %.po, ../locale/%/LC_MESSAGES, $<)
+#      msgfmt -o $@ $<
+#
diff --git a/citadel/po/create-pot.sh b/citadel/po/create-pot.sh
new file mode 100755 (executable)
index 0000000..8c75b5c
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+echo Updating citadel.pot from strings in the source code ...
+xgettext \
+       --copyright-holder='The Citadel Project - http://www.citadel.org' \
+        --from-code='utf-8' \
+       -k_ \
+       -o citadel-setup.pot \
+       --add-comments \
+        ../utils/setup.c 
+
+#xgettext \
+#      --copyright-holder='The Citadel Project - http://www.citadel.org' \
+#        --from-code='utf-8' \
+#      -k_ \
+#      -o citadel-server.pot \
+#      --add-comments \
+#      ../*.c \
+#        `cat ../Make_sources | sed  -e "s;.*+= ;;" ` 
+#
+#
+#xgettext \
+#      --copyright-holder='The Citadel Project - http://www.citadel.org' \
+#        --from-code='utf-8' \
+#      -k_ \
+#      -o citadel-client.pot \
+#      --add-comments \
+#      ../*.c \
+#        ../textclient/*.c
+
+for x in *.po
+do
+       echo Merging webcit.pot into $x ...
+       msgmerge $x webcit.pot -o $x
+done