From: Wilfried Goesgens Date: Mon, 27 Sep 2010 18:54:53 +0000 (+0200) Subject: * get .po infrastructure in place X-Git-Tag: v8.01~686^2~11 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=28a470b26419c29e20eb9b1e24acbdeb542bca75 * get .po infrastructure in place --- diff --git a/citadel/.gitignore b/citadel/.gitignore index 5c55734a1..29d2dba6b 100644 --- a/citadel/.gitignore +++ b/citadel/.gitignore @@ -3,6 +3,8 @@ Make_modules Make_sources Makefile +Makefile.in +locale aclocal.m4 aidepost base64 diff --git a/citadel/configure.ac b/citadel/configure.ac index db8b1b6a9..ce871bf7d 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -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 index 000000000..b03f2f43a --- /dev/null +++ b/citadel/po/Makefile.in @@ -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 index 000000000..8c75b5c6a --- /dev/null +++ b/citadel/po/create-pot.sh @@ -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