svnno****@sourc*****
svnno****@sourc*****
Fri Mar 30 08:34:35 JST 2007
Revision: 3097 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3097 Author: kous Date: 2007-03-30 08:34:34 +0900 (Fri, 30 Mar 2007) Log Message: ----------- * autogen.sh, configure.ac, po/: used intltoolize and glib-gettetize. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/autogen.sh kazehakase/trunk/configure.ac kazehakase/trunk/po/ChangeLog Added Paths: ----------- kazehakase/trunk/po/LINGUAS kazehakase/trunk/po/extract-po-header.rb kazehakase/trunk/po/rgettext.mk.in Removed Paths: ------------- kazehakase/trunk/mkinstalldirs.dist kazehakase/trunk/po/.cvsignore kazehakase/trunk/po/Makefile.in.in kazehakase/trunk/po/Makevars kazehakase/trunk/po/Makevars.template kazehakase/trunk/po/Rules-quot kazehakase/trunk/po/boldquot.sed kazehakase/trunk/po/en****@boldq***** kazehakase/trunk/po/en****@quot***** kazehakase/trunk/po/insert-header.sin kazehakase/trunk/po/missing kazehakase/trunk/po/quot.sed kazehakase/trunk/po/remove-potcdate.sin kazehakase/trunk/po/update.pl Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/ChangeLog 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,3 +1,7 @@ +2007-03-30 Kouhei Sutou <kou****@cozmi*****> + + * autogen.sh, configure.ac: used intltoolize and glib-gettetize. + 2007-03-29 Kouhei Sutou <kou****@cozmi*****> * src/kz-notebook.c (kz_notebook_close_tab): removed closed widget Modified: kazehakase/trunk/autogen.sh =================================================================== --- kazehakase/trunk/autogen.sh 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/autogen.sh 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,16 +1,12 @@ -#!/bin/sh +#!/bin/sh -x srcdir=`dirname $0` test -z "$srcdir" && srcdir=. -libtoolize --copy --force \ - && aclocal -I macros $ACLOCAL_FLAGS \ - && autoheader -automake --add-missing --foreign --copy - -automake_version=`automake --version |grep automake |sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` -case "$automake_version" in - 1.8*|1.9*|1.10*) cp -f mkinstalldirs.dist mkinstalldirs ;; -esac - -autoconf +libtoolize --copy --force || exit 1 +glib-gettextize --force --copy || exit 1 +intltoolize --force --copy --automake || exit 1 +aclocal -I macros $ACLOCAL_FLAGS || exit 1 +autoheader || exit 1 +automake --add-missing --foreign --copy || exit 1 +autoconf || exit 1 Modified: kazehakase/trunk/configure.ac =================================================================== --- kazehakase/trunk/configure.ac 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/configure.ac 2007-03-29 23:34:34 UTC (rev 3097) @@ -111,12 +111,16 @@ dnl ************************************************************** dnl Check for gettext. dnl ************************************************************** -ALL_LINGUAS="cs fr ja ru" +IT_PROG_INTLTOOL([0.35.0]) + +AM_GLIB_GNU_GETTEXT +dnl should run after AM_GLIB_GNU_GETTEXT +AC_CONFIG_COMMANDS([rgettext], [ +sed -i'' -e "/ \$(GENPOT)/r po/rgettext.mk" po/Makefile +]) + GETTEXT_PACKAGE=kazehakase AC_SUBST(GETTEXT_PACKAGE) -AM_GLIB_GNU_GETTEXT -localedir="${datadir}/locale" -AC_SUBST(localedir) dnl ************************************************************** dnl Checks for programs. @@ -470,6 +474,7 @@ AC_CONFIG_FILES([ Makefile po/Makefile.in +po/rgettext.mk src/Makefile src/missing/Makefile src/utils/Makefile Deleted: kazehakase/trunk/mkinstalldirs.dist =================================================================== --- kazehakase/trunk/mkinstalldirs.dist 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/mkinstalldirs.dist 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,111 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman <fried****@prep*****> -# Created: 1993-05-16 -# Public domain - -errstatus=0 -dirmode="" - -usage="\ -Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" 1>&2 - exit 0 - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -case $dirmode in - '') - if mkdir -p -- . 2>/dev/null; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - fi - ;; - *) - if mkdir -m "$dirmode" -p -- . 2>/dev/null; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - fi - ;; -esac - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# End: -# mkinstalldirs ends here Deleted: kazehakase/trunk/po/.cvsignore =================================================================== --- kazehakase/trunk/po/.cvsignore 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/.cvsignore 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,10 +0,0 @@ -Makefile -Makefile.in -POTFILES -.intltool-merge-cache -*.rej -*.orig -*.gmo -*.bak -*~ -kazehakase.pot Modified: kazehakase/trunk/po/ChangeLog =================================================================== --- kazehakase/trunk/po/ChangeLog 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/ChangeLog 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,3 +1,7 @@ +2007-03-30 Kouhei Sutou <kou****@cozmi*****> + + * ./: used intltoolize and glib-gettextize. + 2007-03-21 Kouhei Sutou <kou****@cozmi*****> * POTFILES.in: renamed src/mozilla/ to module/embed/gecko/. Added: kazehakase/trunk/po/LINGUAS =================================================================== --- kazehakase/trunk/po/LINGUAS 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/LINGUAS 2007-03-29 23:34:34 UTC (rev 3097) @@ -0,0 +1,5 @@ +# please keep this list sorted alphabetically +cs +fr +ja +ru Deleted: kazehakase/trunk/po/Makefile.in.in =================================================================== --- kazehakase/trunk/po/Makefile.in.in 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/Makefile.in.in 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,280 +0,0 @@ -# Makefile for program source directory in GNU NLS utilities package. -# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepp****@gnu*****> -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. -# -# - Modified by Owen Taylor <otayl****@redha*****> to use GETTEXT_PACKAGE -# instead of PACKAGE and to look for po2tbl in ./ not in intl/ -# -# - Modified by jacob berkman <jacob****@ximia*****> to install -# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize - -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -SHELL = /bin/sh - at SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datadir = @datadir@ -libdir = @libdir@ -localedir = $(libdir)/locale -gnulocaledir = $(datadir)/locale -gettextsrcdir = $(datadir)/glib-2.0/gettext/po -subdir = po - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ - -CC = @CC@ -GENCAT = @GENCAT@ -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ -MSGMERGE = msgmerge - -DEFS = @DEFS@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ - -RGETTEXT = @RGETTEXT@ -RGETTEXT_TARGETS = @RGETTEXT_TARGETS@ - -INCLUDES = -I.. -I$(top_srcdir)/intl - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -SOURCES = -POFILES = @POFILES@ -GMOFILES = @GMOFILES@ -DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ -$(POFILES) $(GMOFILES) $(SOURCES) - -POTFILES = \ - -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -INSTOBJEXT = @INSTOBJEXT@ - -.SUFFIXES: -.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat - -.c.o: - $(COMPILE) $< - -.po.pox: - $(MAKE) $(GETTEXT_PACKAGE).pot - $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox - -.po.mo: - $(MSGFMT) -o $@ $< - -.po.gmo: - file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) -c -o $$file $< - -.po.cat: - sed -f ../intl/po2msg.sed < $< > $*.msg \ - && rm -f $@ && $(GENCAT) $@ $*.msg - - -all: all- at USE_NLS@ - -all-yes: $(CATALOGS) -all-no: - -$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(RGETTEXT_TARGETS) - if test "$(RGETTEXT)" != ""; then \ - po=$(srcdir)/$(GETTEXT_PACKAGE).po && \ - $(RGETTEXT) -o $$po $(RGETTEXT_TARGETS) \ - && sed -i'' "s,^#: $(top_srcdir)/,#: ," $$po \ - && join_existing="--join-existing"; \ - else \ - join_existing=""; \ - fi; \ - $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ - --add-comments $$join_existing --keyword=_ --keyword=N_ \ - --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 \ - --files-from=$(srcdir)/POTFILES.in \ - && test ! -f $(GETTEXT_PACKAGE).po \ - || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ - && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) - -install: install-exec install-data -install-exec: -install-data: install-data- at USE_NLS@ -install-data-no: all -install-data-yes: all - if test -r "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ - else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ - fi - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - case "$$cat" in \ - *.gmo) destdir=$(gnulocaledir);; \ - *) destdir=$(localedir);; \ - esac; \ - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ - dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ - if test -r "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $$dir; \ - else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ - fi; \ - if test -r $$cat; then \ - $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ - echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ - echo "installing $(srcdir)/$$cat as" \ - "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ - fi; \ - if test -r $$cat.m; then \ - $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ - echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ - else \ - if test -r $(srcdir)/$$cat.m ; then \ - $(INSTALL_DATA) $(srcdir)/$$cat.m \ - $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ - echo "installing $(srcdir)/$$cat as" \ - "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ - else \ - true; \ - fi; \ - fi; \ - done - if test "$(PACKAGE)" = "glib"; then \ - if test -r "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ - else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ - fi; \ - $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ - $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ - else \ - : ; \ - fi - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ - rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ - rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ - done - if test "$(PACKAGE)" = "glib"; then \ - rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ - fi - -check: all - -dvi info tags TAGS ID: - -mostlyclean: - rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp - rm -fr *.o - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f $(GMOFILES) - -distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) -dist distdir: update-po $(DISTFILES) - dists="$(DISTFILES)"; \ - for file in $$dists; do \ - ln $(srcdir)/$$file $(distdir) 2> /dev/null \ - || cp -p $(srcdir)/$$file $(distdir); \ - done - -update-po: Makefile - $(MAKE) $(GETTEXT_PACKAGE).pot - tmpdir=`pwd`; \ - cd $(srcdir); \ - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ - echo "$$lang:"; \ - if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$cat failed!"; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi; \ - done - -# POTFILES is created from POTFILES.in by stripping comments, empty lines -# and Intltool tags (enclosed in square brackets), and appending a full -# relative path to them -POTFILES: POTFILES.in - ( if test 'x$(srcdir)' != 'x.'; then \ - posrcprefix='$(top_srcdir)/'; \ - else \ - posrcprefix="../"; \ - fi; \ - rm -f $@-t $@ \ - && (sed -e '/^#/d' \ - -e "s/^\[.*\] +//" \ - -e '/^[ ]*$$/d' \ - -e "s at .*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ - | sed -e '$$s/\\$$//') > $@-t \ - && chmod a-w $@-t \ - && mv $@-t $@ ) - -Makefile: Makefile.in.in ../config.status POTFILES - cd .. \ - && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ - $(SHELL) ./config.status - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: kazehakase/trunk/po/Makevars =================================================================== --- kazehakase/trunk/po/Makevars 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/Makevars 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,25 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = Deleted: kazehakase/trunk/po/Makevars.template =================================================================== --- kazehakase/trunk/po/Makevars.template 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/Makevars.template 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,25 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = Deleted: kazehakase/trunk/po/Rules-quot =================================================================== --- kazehakase/trunk/po/Rules-quot 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/Rules-quot 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,42 +0,0 @@ -# Special Makefile rules for English message catalogs with quotation marks. - -DISTFILES.common.extra1 = quot.sed boldquot.sed en****@quot***** en****@boldq***** insert-header.sin Rules-quot - -.SUFFIXES: .insert-header .po-update-en - -en****@quot*****: en****@quot***** -en****@boldq*****: en****@boldq***** - -.insert-header.po-update-en: - @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ - if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - ll=`echo $$lang | sed -e 's/@.*//'`; \ - LC_ALL=C; export LC_ALL; \ - cd $(srcdir); \ - if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "creation of $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -en****@quot*****: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en****@quot*****/g' $(srcdir)/insert-header.sin > en****@quot***** - -en****@boldq*****: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en****@boldq*****/g' $(srcdir)/insert-header.sin > en****@boldq***** - -mostlyclean: mostlyclean-quot -mostlyclean-quot: - rm -f *.insert-header Deleted: kazehakase/trunk/po/boldquot.sed =================================================================== --- kazehakase/trunk/po/boldquot.sed 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/boldquot.sed 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,10 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g -s/“/“[1m/g -s/”/[0m”/g -s/‘/‘[1m/g -s/’/[0m’/g Deleted: kazehakase/trunk/po/en****@boldq***** =================================================================== --- kazehakase/trunk/po/en****@boldq***** 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/en****@boldq***** 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,25 +0,0 @@ -# All this catalog "translates" are quotation characters. -# The msgids must be ASCII and therefore cannot contain real quotation -# characters, only substitutes like grave accent (0x60), apostrophe (0x27) -# and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html -# -# This catalog translates grave accent (0x60) and apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019). -# It also translates pairs of apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019) -# and pairs of quotation mark (0x22) to -# left double quotation mark (U+201C) and right double quotation mark (U+201D). -# -# When output to an UTF-8 terminal, the quotation characters appear perfectly. -# When output to an ISO-8859-1 terminal, the single quotation marks are -# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to -# grave/acute accent (by libiconv), and the double quotation marks are -# transliterated to 0x22. -# When output to an ASCII terminal, the single quotation marks are -# transliterated to apostrophes, and the double quotation marks are -# transliterated to 0x22. -# -# This catalog furthermore displays the text between the quotation marks in -# bold face, assuming the VT100/XTerm escape sequences. -# Deleted: kazehakase/trunk/po/en****@quot***** =================================================================== --- kazehakase/trunk/po/en****@quot***** 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/en****@quot***** 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,22 +0,0 @@ -# All this catalog "translates" are quotation characters. -# The msgids must be ASCII and therefore cannot contain real quotation -# characters, only substitutes like grave accent (0x60), apostrophe (0x27) -# and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html -# -# This catalog translates grave accent (0x60) and apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019). -# It also translates pairs of apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019) -# and pairs of quotation mark (0x22) to -# left double quotation mark (U+201C) and right double quotation mark (U+201D). -# -# When output to an UTF-8 terminal, the quotation characters appear perfectly. -# When output to an ISO-8859-1 terminal, the single quotation marks are -# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to -# grave/acute accent (by libiconv), and the double quotation marks are -# transliterated to 0x22. -# When output to an ASCII terminal, the single quotation marks are -# transliterated to apostrophes, and the double quotation marks are -# transliterated to 0x22. -# Added: kazehakase/trunk/po/extract-po-header.rb =================================================================== --- kazehakase/trunk/po/extract-po-header.rb 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/extract-po-header.rb 2007-03-29 23:34:34 UTC (rev 3097) @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby + +found_empty_line = false +ARGF.each do |line| + if found_empty_line + print line + next + end + + found_empty_line = true if /^\s*$/.match(line) +end Property changes on: kazehakase/trunk/po/extract-po-header.rb ___________________________________________________________________ Name: svn:executable + * Deleted: kazehakase/trunk/po/insert-header.sin =================================================================== --- kazehakase/trunk/po/insert-header.sin 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/insert-header.sin 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,23 +0,0 @@ -# Sed script that inserts the file called HEADER before the header entry. -# -# At each occurrence of a line starting with "msgid ", we execute the following -# commands. At the first occurrence, insert the file. At the following -# occurrences, do nothing. The distinction between the first and the following -# occurrences is achieved by looking at the hold space. -/^msgid /{ -x -# Test if the hold space is empty. -s/m/m/ -ta -# Yes it was empty. First occurrence. Read the file. -r HEADER -# Output the file's contents by reading the next line. But don't lose the -# current line while doing this. -g -N -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} Deleted: kazehakase/trunk/po/missing =================================================================== --- kazehakase/trunk/po/missing 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/missing 2007-03-29 23:34:34 UTC (rev 3097) @@ -1 +0,0 @@ -src/kz-window.c Deleted: kazehakase/trunk/po/quot.sed =================================================================== --- kazehakase/trunk/po/quot.sed 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/quot.sed 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,6 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g Deleted: kazehakase/trunk/po/remove-potcdate.sin =================================================================== --- kazehakase/trunk/po/remove-potcdate.sin 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/remove-potcdate.sin 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,19 +0,0 @@ -# Sed script that remove the POT-Creation-Date line in the header entry -# from a POT file. -# -# The distinction between the first and the following occurrences of the -# pattern is achieved by looking at the hold space. -/^"POT-Creation-Date: .*"$/{ -x -# Test if the hold space is empty. -s/P/P/ -ta -# Yes it was empty. First occurrence. Remove the line. -g -d -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} Added: kazehakase/trunk/po/rgettext.mk.in =================================================================== --- kazehakase/trunk/po/rgettext.mk.in 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/rgettext.mk.in 2007-03-29 23:34:34 UTC (rev 3097) @@ -0,0 +1,19 @@ + if test "$(RGETTEXT)" != ""; then \ + original_pot=$(GETTEXT_PACKAGE).orig.pot; \ + rb_pot=$(GETTEXT_PACKAGE).rb.pot; \ + rb_no_header_pot=$(GETTEXT_PACKAGE).rb.no-header.pot; \ + \ + $(RGETTEXT) -o $$rb_pot $(RGETTEXT_TARGETS); \ + $(RUBY) $(srcdir)/extract-po-header.rb $$rb_pot > $$rb_no_header_pot; \ + mv $(GETTEXT_PACKAGE).pot $$original_pot; \ + cat $$original_pot $$rb_no_header_pot > $(GETTEXT_PACKAGE).pot; \ + rm -f $$original_pot $$rb_pot $$rb_no_header_pot; \ + \ + dummy_c=dummy.c; \ + echo "/* for rejecting duplicated entries */" > $$dummy_c; \ + $(XGETTEXT) --join-existing -o $(GETTEXT_PACKAGE).pot $$dummy_c; \ + rm -f $$dummy_c; \ + fi + +RGETTEXT = @RGETTEXT@ +RGETTEXT_TARGETS = @RGETTEXT_TARGETS@ Deleted: kazehakase/trunk/po/update.pl =================================================================== --- kazehakase/trunk/po/update.pl 2007-03-29 08:54:41 UTC (rev 3096) +++ kazehakase/trunk/po/update.pl 2007-03-29 23:34:34 UTC (rev 3097) @@ -1,367 +0,0 @@ -#!/usr/bin/perl -w - -# -# GNOME PO Update Utility -# -# Copyright (C) 2000 Free Software Foundation. -# -# This script is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this library; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# Authors: Kenneth Christiansen <kenne****@gnu*****> -# - -# NOTICE: Please remember to change the variable $PACKAGE to reflect -# the package this script is used within. - -$PACKAGE="kazehakase"; - -use File::Basename; - -# Declare global variables -#------------------------- -my $VERSION = "1.5beta5"; -my $LANG = $ARGV[0]; - -# Always print as the first thing -#-------------------------------- -$| = 1; - -# Figure out what package that is in use -#--------------------------------------- -#open FILE, "../configure.in"; -# while (<FILE>) { -# next if /^dnl/; #ignore comments -# if ($_=~/AM_INIT_AUTOMAKE\((.*),(.*)\)/o){ -# $PACKAGE=$1; -# last; #stop when found -# } -# if ($_=~/PACKAGE\((.*)\)/o){ -# $PACKAGE=$1; -# last; #stop when found -# } -# } -#close FILE; - - -# Give error if script is run without an argument -#------------------------------------------------ -if (! $LANG){ - print "update.pl: missing file arguments\n"; - print "Try `update.pl --help' for more information.\n"; - exit; -} - -# Use the supplied arguments -#--------------------------- -if ($LANG=~/^-(.)*/){ - - if ("$LANG" eq "--version" || "$LANG" eq "-V"){ - &Version; - } - elsif ($LANG eq "--help" || "$LANG" eq "-H"){ - &Help; - } - elsif ($LANG eq "--dist" || "$LANG" eq "-D"){ - &Merging; - } - elsif ($LANG eq "--pot" || "$LANG" eq "-P"){ - - # Check for .headerlock file, so the Makefile - # will not generate the header files twise - #-------------------------------------------- - if (-e ".headerlock"){ - &GeneratePot; - }else{ - &GenHeaders; - &GeneratePot;} - exit; - } - elsif ($LANG eq "--headers" || "$LANG" eq "-S"){ - &GenHeaders; - exit; - } - elsif ($LANG eq "--maintain" || "$LANG" eq "-M"){ - &Maintain; - } - else { - &InvalidOption; - } - -} else { - - # Run standard procedure - #----------------------- - if(-s "$LANG.po"){ - &GenHeaders; - &GeneratePot; - &Merging; - &Status; - } - - # Report error if the language file supplied - # to the command line is non-existent - #------------------------------------------- - else { - &NotExisting; - } -} - -sub Version{ - - # Print version information - #-------------------------- - print "GNOME PO Updater $VERSION\n"; - print "Written by Kenneth Christiansen <kenneth\@gnome.org>, 2000.\n\n"; - print "Copyright (C) 2000 Free Software Foundation, Inc.\n"; - print "This is free software; see the source for copying conditions. There is NO\n"; - print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; - exit; -} - -sub Help{ - - # Print usage information - #------------------------ - print "Usage: ./update.pl [OPTIONS] ...LANGCODE\n"; - print "Updates pot files and merge them with the translations.\n\n"; - print " -H, --help shows this help page\n"; - print " -P, --pot generate the pot file only\n"; - print " -S, --headers generate the XML headerfiles in POTFILES.in\n"; - print " -M, --maintain search for missing files in POTFILES.in\n"; - print " -V, --version shows the version\n"; - print "\nExamples of use:\n"; - print "update.sh --pot just creates a new pot file from the source\n"; - print "update.sh da created new pot file and updated the da.po file\n\n"; - print "Report bugs to <kenneth\@gnome.org>.\n"; - exit; -} - -sub Maintain{ - - # Search and fine, all translatable files - # --------------------------------------- - $i18nfiles="find ../ -print | egrep '.*\\.(c|y|cc|c++|h|gob)' "; - - open(BUF2, "POTFILES.in") || die "update.pl: there's no POTFILES.in!!!\n"; - - print "Searching for missing _(\" \") entries...\n"; - - open(BUF1, "$i18nfiles|"); - - @buf1_1 = <BUF1>; - @buf1_2 = <BUF2>; - - # Check if we should ignore some found files, when - # comparing with POTFILES.in - #------------------------------------------------- - if (-s ".potignore"){ - open FILE, ".potignore"; - while (<FILE>) { - if ($_=~/^[^#]/o){ - push @bup, $_; - } - } - print "Found .potignore: Ignoring files...\n"; - @buf1_2 = (@bup, @buf1_2); - } - - foreach my $file (@buf1_1){ - open FILE, "<$file"; - while (<FILE>) { - if ($_=~/_\(\"/o){ - $file = unpack("x3 A*",$file) . "\n"; - push @buf2_1, $file; - last; - } - } - } - - @buf3_1 = sort (@buf2_1); - @buf3_2 = sort (@buf1_2); - - my %in2; - foreach (@buf3_2) { - $in2{$_} = 1; - } - - foreach (@buf3_1){ - if (!exists($in2{$_})){ - push @result, $_ - } - } - - # Save file with information about the files missing - # if any, and give information about this proceedier - #--------------------------------------------------- - if(@result){ - open OUT, ">missing"; - print OUT @result; - print "\nHere is the result:\n\n", @result, "\n"; - print "The file \"missing\" has been placed in the current directory.\n"; - print "Files supposed to be ignored should be placed in \".potignore\"\n"; - } - - # If there is nothing to complain about, notice the user - #------------------------------------------------------- - else{ - print "\nWell, it's all perfect! Congratulation!\n"; - } -} - -sub InvalidOption{ - - # Handle invalid arguments - #------------------------- - print "update.pl: invalid option -- $LANG\n"; - print "Try `update.pl --help' for more information.\n"; -} - -sub GenHeaders{ - - # Generate the .h header files, so we can allow glade and - # xml translation support - #-------------------------------------------------------- - if(-s "ui-extract.pl"){ - - print "Found ui-extract.pl script\nRunning ui-extract...\n"; - - open FILE, "<POTFILES.in"; - while (<FILE>) { - - # Find .xml files in POTFILES.in and generate the - # files with help from the ui-extract.pl script - #-------------------------------------------------- - if ($_=~ /(.*)(\.xml)/o){ - $filename = "../$1.xml"; - $xmlfiles="perl \.\/ui-extract.pl --local $filename"; - system($xmlfiles); - } - - # Find .glade files in POTFILES.in and generate - # the files with help from the ui-extract.pl script - #-------------------------------------------------- - elsif ($_=~ /(.*)(\.glade)/o){ - $filename = "../$1.glade"; - $xmlfiles="perl \.\/ui-extract.pl --local $filename"; - system($xmlfiles); - } - } - close FILE; - - # Create .headerlock file, so the script will know - # that we already passed this section. This is required - # since the individual sections can be reaced at different - # times by the Makefile - #--------------------------------------------------------- - system("touch .headerlock"); - } -} - -sub GeneratePot{ - - # Generate the potfiles from the POTFILES.in file - #------------------------------------------------ - - print "Building the $PACKAGE.pot...\n"; - - system ("mv POTFILES.in POTFILES.in.old"); - - open INFILE, "<POTFILES.in.old"; - open OUTFILE, ">POTFILES.in"; - while (<INFILE>) { - if ($_ =~ /\.(glade|xml)$/) { - s/\.glade$/\.glade\.h/; - s/\.xml$/\.xml\.h/; - $_ = basename($_); - $_ = "po/tmp/$_\n"; - } - print OUTFILE $_; - } - close OUTFILE; - close INFILE; - - $GETTEXT ="xgettext --default-domain\=$PACKAGE --directory\=\.\." - ." --add-comments --keyword\=\_ --keyword\=N\_" - ." --files-from\=\.\/POTFILES\.in "; - $GTEST ="test \! -f $PACKAGE\.po \|\| \( rm -f \.\/$PACKAGE\.pot " - ."&& mv $PACKAGE\.po \.\/$PACKAGE\.pot \)"; - - system($GETTEXT); - system($GTEST); - print "Wrote $PACKAGE.pot\n"; - system("mv POTFILES.in.old POTFILES.in"); - - # If .headerlock file is found, it means that the potfiles - # already has been generated. If so delete the generated - # .h header files. The reason for this approach with a - # file as a marker is due to that the Makefile runs the - # scripts in turns - #--------------------------------------------------------- - - if(-e ".headerlock"){ - unlink(".headerlock"); - - print "Removing generated header (.h) files..."; - system("rm ./tmp/ -rf"); - } - print "done\n"; -} - -sub Merging{ - - if ($ARGV[1]){ - $LANG = $ARGV[1]; - } else { - $LANG = $ARGV[0]; - } - - if ($ARGV[0] ne "--dist" && $ARGV[0] ne "-D") { - print "Merging $LANG.po with $PACKAGE.pot..."; - } - - $MERGE="cp $LANG.po $LANG.po.old && msgmerge $LANG.po.old $PACKAGE.pot -o $LANG.po"; - - system($MERGE); - - if ($ARGV[0] ne "--dist" && $ARGV[0] ne "-D") { - print "\n\n"; - } - - # Remove the "messages" trash file generated - # by gettext, aswell as the backup file - #------------------------------------------- - unlink "messages"; - unlink "$LANG.po.old"; -} - -sub NotExisting{ - - # Report error if supplied language - # file is non-existant - #---------------------------------- - print "update.pl: sorry, $LANG.po does not exist!\n"; - print "Try `update.pl --help' for more information.\n"; - exit; -} - -sub Status{ - - # Print status information about the po file - #------------------------------------------- - $STATUS="msgfmt --statistics $LANG.po"; - - system($STATUS); - print "\n"; -}