>From f4eca17ce7a1be6894b20b80ec87f7201004578e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Wed, 14 Aug 2013 21:09:46 +0200 Subject: [PATCH 1/2] Update GNOME examples to Gtk+3. Reported at --- gettext-tools/examples/ChangeLog | 29 +++ gettext-tools/examples/Makefile.am | 64 +++---- gettext-tools/examples/README | 5 +- gettext-tools/examples/hello-c++-gnome/INSTALL | 19 -- gettext-tools/examples/hello-c++-gnome/Makefile.am | 29 --- .../examples/hello-c++-gnome/autoclean.sh | 59 ------- gettext-tools/examples/hello-c++-gnome/autogen.sh | 29 --- .../examples/hello-c++-gnome/configure.ac | 25 --- gettext-tools/examples/hello-c++-gnome/hello.cc | 87 --------- .../examples/hello-c++-gnome/m4/Makefile.am | 7 - .../hello-c++-gnome/m4/gnome-gnorba-check.m4 | 35 ---- .../hello-c++-gnome/m4/gnome-orbit-check.m4 | 33 ---- gettext-tools/examples/hello-c++-gnome/m4/gnome.m4 | 128 -------------- gettext-tools/examples/hello-c++-gnome/m4/gtk--.m4 | 195 --------------------- gettext-tools/examples/hello-c++-gnome/m4/gtk.m4 | 194 -------------------- .../examples/hello-c++-gnome/po/.gitignore | 3 - gettext-tools/examples/hello-c++-gnome/po/LINGUAS | 5 - gettext-tools/examples/hello-c++-gnome/po/Makevars | 67 ------- .../examples/hello-c++-gnome/po/POTFILES.in | 5 - gettext-tools/examples/hello-c++-gtk/INSTALL | 15 ++ gettext-tools/examples/hello-c++-gtk/Makefile.am | 32 ++++ gettext-tools/examples/hello-c++-gtk/autoclean.sh | 34 ++++ gettext-tools/examples/hello-c++-gtk/autogen.sh | 50 ++++++ gettext-tools/examples/hello-c++-gtk/configure.ac | 20 +++ gettext-tools/examples/hello-c++-gtk/hello.cc | 60 +++++++ gettext-tools/examples/hello-c++-gtk/hello.ui | 20 +++ .../examples/hello-c++-gtk/m4/Makefile.am | 7 + gettext-tools/examples/hello-c++-gtk/po/.gitignore | 3 + gettext-tools/examples/hello-c++-gtk/po/LINGUAS | 5 + gettext-tools/examples/hello-c++-gtk/po/Makevars | 67 +++++++ .../examples/hello-c++-gtk/po/POTFILES.in | 6 + gettext-tools/examples/hello-c-gnome/INSTALL | 16 -- gettext-tools/examples/hello-c-gnome/Makefile.am | 29 --- gettext-tools/examples/hello-c-gnome/autoclean.sh | 59 ------- gettext-tools/examples/hello-c-gnome/autogen.sh | 29 --- gettext-tools/examples/hello-c-gnome/configure.ac | 19 -- gettext-tools/examples/hello-c-gnome/hello.c | 87 --------- .../examples/hello-c-gnome/m4/Makefile.am | 6 - .../hello-c-gnome/m4/gnome-gnorba-check.m4 | 35 ---- .../examples/hello-c-gnome/m4/gnome-orbit-check.m4 | 33 ---- gettext-tools/examples/hello-c-gnome/m4/gnome.m4 | 128 -------------- gettext-tools/examples/hello-c-gnome/po/.gitignore | 3 - gettext-tools/examples/hello-c-gnome/po/LINGUAS | 5 - gettext-tools/examples/hello-c-gnome/po/Makevars | 67 ------- .../examples/hello-c-gnome/po/POTFILES.in | 5 - gettext-tools/examples/hello-c-gtk/INSTALL | 13 ++ gettext-tools/examples/hello-c-gtk/Makefile.am | 33 ++++ gettext-tools/examples/hello-c-gtk/autoclean.sh | 34 ++++ gettext-tools/examples/hello-c-gtk/autogen.sh | 50 ++++++ gettext-tools/examples/hello-c-gtk/configure.ac | 20 +++ gettext-tools/examples/hello-c-gtk/hello.c | 95 ++++++++++ gettext-tools/examples/hello-c-gtk/hello.ui | 22 +++ gettext-tools/examples/hello-c-gtk/m4/Makefile.am | 7 + gettext-tools/examples/hello-c-gtk/po/.gitignore | 3 + gettext-tools/examples/hello-c-gtk/po/LINGUAS | 5 + gettext-tools/examples/hello-c-gtk/po/Makevars | 67 +++++++ gettext-tools/examples/hello-c-gtk/po/POTFILES.in | 6 + gettext-tools/examples/hello-objc-gnome/INSTALL | 19 -- .../examples/hello-objc-gnome/Makefile.am | 29 --- .../examples/hello-objc-gnome/autoclean.sh | 59 ------- gettext-tools/examples/hello-objc-gnome/autogen.sh | 29 --- .../examples/hello-objc-gnome/configure.ac | 29 --- gettext-tools/examples/hello-objc-gnome/hello.m | 88 ---------- .../examples/hello-objc-gnome/m4/Makefile.am | 6 - .../hello-objc-gnome/m4/gnome-gnorba-check.m4 | 35 ---- .../hello-objc-gnome/m4/gnome-orbit-check.m4 | 33 ---- .../examples/hello-objc-gnome/m4/gnome.m4 | 128 -------------- .../examples/hello-objc-gnome/po/.gitignore | 3 - gettext-tools/examples/hello-objc-gnome/po/LINGUAS | 5 - .../examples/hello-objc-gnome/po/Makevars | 67 ------- .../examples/hello-objc-gnome/po/POTFILES.in | 5 - gettext-tools/examples/po/Makefile.am | 39 ++--- 72 files changed, 743 insertions(+), 2044 deletions(-) delete mode 100644 gettext-tools/examples/hello-c++-gnome/INSTALL delete mode 100644 gettext-tools/examples/hello-c++-gnome/Makefile.am delete mode 100755 gettext-tools/examples/hello-c++-gnome/autoclean.sh delete mode 100755 gettext-tools/examples/hello-c++-gnome/autogen.sh delete mode 100644 gettext-tools/examples/hello-c++-gnome/configure.ac delete mode 100644 gettext-tools/examples/hello-c++-gnome/hello.cc delete mode 100644 gettext-tools/examples/hello-c++-gnome/m4/Makefile.am delete mode 100644 gettext-tools/examples/hello-c++-gnome/m4/gnome-gnorba-check.m4 delete mode 100644 gettext-tools/examples/hello-c++-gnome/m4/gnome-orbit-check.m4 delete mode 100644 gettext-tools/examples/hello-c++-gnome/m4/gnome.m4 delete mode 100644 gettext-tools/examples/hello-c++-gnome/m4/gtk--.m4 delete mode 100644 gettext-tools/examples/hello-c++-gnome/m4/gtk.m4 delete mode 100644 gettext-tools/examples/hello-c++-gnome/po/.gitignore delete mode 100644 gettext-tools/examples/hello-c++-gnome/po/LINGUAS delete mode 100644 gettext-tools/examples/hello-c++-gnome/po/Makevars delete mode 100644 gettext-tools/examples/hello-c++-gnome/po/POTFILES.in create mode 100644 gettext-tools/examples/hello-c++-gtk/INSTALL create mode 100644 gettext-tools/examples/hello-c++-gtk/Makefile.am create mode 100755 gettext-tools/examples/hello-c++-gtk/autoclean.sh create mode 100755 gettext-tools/examples/hello-c++-gtk/autogen.sh create mode 100644 gettext-tools/examples/hello-c++-gtk/configure.ac create mode 100644 gettext-tools/examples/hello-c++-gtk/hello.cc create mode 100644 gettext-tools/examples/hello-c++-gtk/hello.ui create mode 100644 gettext-tools/examples/hello-c++-gtk/m4/Makefile.am create mode 100644 gettext-tools/examples/hello-c++-gtk/po/.gitignore create mode 100644 gettext-tools/examples/hello-c++-gtk/po/LINGUAS create mode 100644 gettext-tools/examples/hello-c++-gtk/po/Makevars create mode 100644 gettext-tools/examples/hello-c++-gtk/po/POTFILES.in delete mode 100644 gettext-tools/examples/hello-c-gnome/INSTALL delete mode 100644 gettext-tools/examples/hello-c-gnome/Makefile.am delete mode 100755 gettext-tools/examples/hello-c-gnome/autoclean.sh delete mode 100755 gettext-tools/examples/hello-c-gnome/autogen.sh delete mode 100644 gettext-tools/examples/hello-c-gnome/configure.ac delete mode 100644 gettext-tools/examples/hello-c-gnome/hello.c delete mode 100644 gettext-tools/examples/hello-c-gnome/m4/Makefile.am delete mode 100644 gettext-tools/examples/hello-c-gnome/m4/gnome-gnorba-check.m4 delete mode 100644 gettext-tools/examples/hello-c-gnome/m4/gnome-orbit-check.m4 delete mode 100644 gettext-tools/examples/hello-c-gnome/m4/gnome.m4 delete mode 100644 gettext-tools/examples/hello-c-gnome/po/.gitignore delete mode 100644 gettext-tools/examples/hello-c-gnome/po/LINGUAS delete mode 100644 gettext-tools/examples/hello-c-gnome/po/Makevars delete mode 100644 gettext-tools/examples/hello-c-gnome/po/POTFILES.in create mode 100644 gettext-tools/examples/hello-c-gtk/INSTALL create mode 100644 gettext-tools/examples/hello-c-gtk/Makefile.am create mode 100755 gettext-tools/examples/hello-c-gtk/autoclean.sh create mode 100755 gettext-tools/examples/hello-c-gtk/autogen.sh create mode 100644 gettext-tools/examples/hello-c-gtk/configure.ac create mode 100644 gettext-tools/examples/hello-c-gtk/hello.c create mode 100644 gettext-tools/examples/hello-c-gtk/hello.ui create mode 100644 gettext-tools/examples/hello-c-gtk/m4/Makefile.am create mode 100644 gettext-tools/examples/hello-c-gtk/po/.gitignore create mode 100644 gettext-tools/examples/hello-c-gtk/po/LINGUAS create mode 100644 gettext-tools/examples/hello-c-gtk/po/Makevars create mode 100644 gettext-tools/examples/hello-c-gtk/po/POTFILES.in delete mode 100644 gettext-tools/examples/hello-objc-gnome/INSTALL delete mode 100644 gettext-tools/examples/hello-objc-gnome/Makefile.am delete mode 100755 gettext-tools/examples/hello-objc-gnome/autoclean.sh delete mode 100755 gettext-tools/examples/hello-objc-gnome/autogen.sh delete mode 100644 gettext-tools/examples/hello-objc-gnome/configure.ac delete mode 100644 gettext-tools/examples/hello-objc-gnome/hello.m delete mode 100644 gettext-tools/examples/hello-objc-gnome/m4/Makefile.am delete mode 100644 gettext-tools/examples/hello-objc-gnome/m4/gnome-gnorba-check.m4 delete mode 100644 gettext-tools/examples/hello-objc-gnome/m4/gnome-orbit-check.m4 delete mode 100644 gettext-tools/examples/hello-objc-gnome/m4/gnome.m4 delete mode 100644 gettext-tools/examples/hello-objc-gnome/po/.gitignore delete mode 100644 gettext-tools/examples/hello-objc-gnome/po/LINGUAS delete mode 100644 gettext-tools/examples/hello-objc-gnome/po/Makevars delete mode 100644 gettext-tools/examples/hello-objc-gnome/po/POTFILES.in diff --git a/gettext-tools/examples/ChangeLog b/gettext-tools/examples/ChangeLog index a8bda3d..87bfc8c 100644 --- a/gettext-tools/examples/ChangeLog +++ b/gettext-tools/examples/ChangeLog @@ -1,3 +1,32 @@ +2013-08-14 Miguel Angel Arruga Vivas + + Update old GNOME examples to Gtk+ 3. + Reported at . + * Makefile.am: Change hello-c{,++}-gnome to hello-c{,++}-gtk. + Remove hello-objc-gnome example. + * README: Likewise. + * po/Makefile.am: Likewise. + * hello-c-gtk/INSTALL: Libraries updated. + * hello-c-gtk/autogen.sh: Copy gettext.h. + * hello-c-gtk/autoclean.sh: Remove gettext.h. + * hello-c-gtk/configure.ac: Updated AC_INIT call. + * hello-c-gtk/Makefile.am: Add hello.ui DATA file. + * hello-c-gtk/hello.ui: New file. + * hello-c-gtk/m4/gnome*.m4: Removed files. + * hello-c-gtk/po/POTFILES.in: Added hello.ui. + * hello-c-gtk/hello.c: Updated to Gtk 3. + * hello-c++-gtk/INSTALL: Libraries updated. + * hello-c++-gtk/autogen.sh: Copy gettext.h. + * hello-c++-gtk/autoclean.sh: Remove gettext.h. + * hello-c++-gtk/configure.ac: Updated AC_INIT call. + * hello-c++-gtk/Makefile.am: Add hello.ui DATA file. + * hello-c++-gtk/hello.ui: New file. + * hello-c++-gtk/m4/gnome*.m4: Removed files. + * hello-c++-gtk/m4/gtk*.m4: Likewise. + * hello-c++-gtk/po/POTFILES.in: Added hello.ui. + * hello-c++-gtk/hello.cc: Updated to Gtkmm 3. + * hello-objc-gnome: Removed. + 2013-06-10 Daiki Ueno * Makefile.am: Use $(MKDIR_P) instead of $(mkdir_p). diff --git a/gettext-tools/examples/Makefile.am b/gettext-tools/examples/Makefile.am index 63a1c8b..67fe1a4 100644 --- a/gettext-tools/examples/Makefile.am +++ b/gettext-tools/examples/Makefile.am @@ -38,18 +38,16 @@ EXAMPLESFILES = \ hello-c/po/Makevars \ hello-c/po/POTFILES.in \ \ - hello-c-gnome/INSTALL \ - hello-c-gnome/autogen.sh \ - hello-c-gnome/autoclean.sh \ - hello-c-gnome/hello.c \ - hello-c-gnome/Makefile.am \ - hello-c-gnome/configure.ac \ - hello-c-gnome/m4/Makefile.am \ - hello-c-gnome/m4/gnome.m4 \ - hello-c-gnome/m4/gnome-gnorba-check.m4 \ - hello-c-gnome/m4/gnome-orbit-check.m4 \ - hello-c-gnome/po/Makevars \ - hello-c-gnome/po/POTFILES.in \ + hello-c-gtk/INSTALL \ + hello-c-gtk/autogen.sh \ + hello-c-gtk/autoclean.sh \ + hello-c-gtk/hello.c \ + hello-c-gtk/hello.ui \ + hello-c-gtk/Makefile.am \ + hello-c-gtk/configure.ac \ + hello-c-gtk/m4/Makefile.am \ + hello-c-gtk/po/Makevars \ + hello-c-gtk/po/POTFILES.in \ \ hello-c++/INSTALL \ hello-c++/autogen.sh \ @@ -109,20 +107,16 @@ EXAMPLESFILES = \ hello-c++-kde/po/Makevars \ hello-c++-kde/po/POTFILES.in \ \ - hello-c++-gnome/INSTALL \ - hello-c++-gnome/autogen.sh \ - hello-c++-gnome/autoclean.sh \ - hello-c++-gnome/hello.cc \ - hello-c++-gnome/Makefile.am \ - hello-c++-gnome/configure.ac \ - hello-c++-gnome/m4/Makefile.am \ - hello-c++-gnome/m4/gnome.m4 \ - hello-c++-gnome/m4/gnome-gnorba-check.m4 \ - hello-c++-gnome/m4/gnome-orbit-check.m4 \ - hello-c++-gnome/m4/gtk.m4 \ - hello-c++-gnome/m4/gtk--.m4 \ - hello-c++-gnome/po/Makevars \ - hello-c++-gnome/po/POTFILES.in \ + hello-c++-gtk/INSTALL \ + hello-c++-gtk/autogen.sh \ + hello-c++-gtk/autoclean.sh \ + hello-c++-gtk/hello.cc \ + hello-c++-gtk/hello.ui \ + hello-c++-gtk/Makefile.am \ + hello-c++-gtk/configure.ac \ + hello-c++-gtk/m4/Makefile.am \ + hello-c++-gtk/po/Makevars \ + hello-c++-gtk/po/POTFILES.in \ \ hello-c++-wxwidgets/INSTALL \ hello-c++-wxwidgets/autogen.sh \ @@ -157,19 +151,6 @@ EXAMPLESFILES = \ hello-objc-gnustep/po/GNUmakefile \ hello-objc-gnustep/po/LocaleAliases \ \ - hello-objc-gnome/INSTALL \ - hello-objc-gnome/autogen.sh \ - hello-objc-gnome/autoclean.sh \ - hello-objc-gnome/hello.m \ - hello-objc-gnome/Makefile.am \ - hello-objc-gnome/configure.ac \ - hello-objc-gnome/m4/Makefile.am \ - hello-objc-gnome/m4/gnome.m4 \ - hello-objc-gnome/m4/gnome-gnorba-check.m4 \ - hello-objc-gnome/m4/gnome-orbit-check.m4 \ - hello-objc-gnome/po/Makevars \ - hello-objc-gnome/po/POTFILES.in \ - \ hello-sh/INSTALL \ hello-sh/autogen.sh \ hello-sh/autoclean.sh \ @@ -360,15 +341,14 @@ EXAMPLESFILES = \ # List of examples directories containing a po directory. EXAMPLESDIRS = \ hello-c \ - hello-c-gnome \ + hello-c-gtk \ hello-c++ \ hello-c++-qt \ hello-c++-kde \ - hello-c++-gnome \ + hello-c++-gtk \ hello-c++-wxwidgets \ hello-objc \ hello-objc-gnustep \ - hello-objc-gnome \ hello-sh \ hello-python \ hello-clisp \ diff --git a/gettext-tools/examples/README b/gettext-tools/examples/README index b57664b..a3b9e5c 100644 --- a/gettext-tools/examples/README +++ b/gettext-tools/examples/README @@ -6,15 +6,14 @@ environment. Example Language GUI Environment hello-c C - hello-c-gnome C GNOME + hello-c-gtk C Gtk+ 3 hello-c++ C++ hello-c++-qt C++ Qt hello-c++-kde C++ KDE - hello-c++-gnome C++ GNOME + hello-c++-gtk C++ Gtk+ 3 hello-c++-wxwidgets C++ wxWidgets hello-objc ObjectiveC hello-objc-gnustep ObjectiveC GNUstep - hello-objc-gnome ObjectiveC GNOME hello-sh Shell hello-python Python hello-clisp Lisp diff --git a/gettext-tools/examples/hello-c++-gnome/INSTALL b/gettext-tools/examples/hello-c++-gnome/INSTALL deleted file mode 100644 index 45f18a1..0000000 --- a/gettext-tools/examples/hello-c++-gnome/INSTALL +++ /dev/null @@ -1,19 +0,0 @@ -This example relies on: - - the GNOME libraries (libgnomeui, libgnome, libgnomesupport, libart_lgpl) - and their dependencies: imlib (libgdk_imlib), audiofile (libaudiofile), - esound (libesd), zlib (libz). - - the GTK libraries (libgtk, libgdk) - - the glib libraries (libglib, libgmodule) - - the X11 libraries - - the GTK / C++ bindings (libgtkmm, libgdkmm) - - the C++ signal/slot library (libsigc++) - - the C++ runtime libraries (libstdc++) - -Installation: - ./autogen.sh - ./configure --prefix=/some/prefix - make - make install -Cleanup: - make distclean - ./autoclean.sh diff --git a/gettext-tools/examples/hello-c++-gnome/Makefile.am b/gettext-tools/examples/hello-c++-gnome/Makefile.am deleted file mode 100644 index 7eb62b4..0000000 --- a/gettext-tools/examples/hello-c++-gnome/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Makefile configuration - processed by automake. - -# General automake options. -AUTOMAKE_OPTIONS = foreign no-dependencies -ACLOCAL_AMFLAGS = -I m4 - -# The list of subdirectories containing Makefiles. -SUBDIRS = m4 po - -# The list of programs that are built. -bin_PROGRAMS = hello - -# The source files of the 'hello' program. -hello_SOURCES = hello.cc - -# Define a C macro LOCALEDIR indicating where catalogs will be installed. -DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ - -# Make sure the gnome.h include file is found. -AM_CPPFLAGS = $(GTKMM_CFLAGS) $(GNOME_INCLUDEDIR) - -# Link time dependencies. -LDADD = $(GTKMM_LIBS) $(GNOME_LIBDIR) $(GNOMEUI_LIBS) @LIBINTL@ - -# Additional files to be distributed. -EXTRA_DIST = autogen.sh autoclean.sh diff --git a/gettext-tools/examples/hello-c++-gnome/autoclean.sh b/gettext-tools/examples/hello-c++-gnome/autoclean.sh deleted file mode 100755 index 2968f90..0000000 --- a/gettext-tools/examples/hello-c++-gnome/autoclean.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Script for cleaning all autogenerated files. - -test ! -f Makefile || make distclean - -# Brought in by autopoint. -rm -f ABOUT-NLS -rm -f config.rpath -rm -f m4/codeset.m4 -rm -f m4/gettext.m4 -rm -f m4/glibc2.m4 -rm -f m4/glibc21.m4 -rm -f m4/iconv.m4 -rm -f m4/intdiv0.m4 -rm -f m4/intl.m4 -rm -f m4/intldir.m4 -rm -f m4/intlmacosx.m4 -rm -f m4/intmax.m4 -rm -f m4/inttypes-pri.m4 -rm -f m4/inttypes_h.m4 -rm -f m4/lcmessage.m4 -rm -f m4/lib-ld.m4 -rm -f m4/lib-link.m4 -rm -f m4/lib-prefix.m4 -rm -f m4/lock.m4 -rm -f m4/longlong.m4 -rm -f m4/nls.m4 -rm -f m4/po.m4 -rm -f m4/printf-posix.m4 -rm -f m4/progtest.m4 -rm -f m4/size_max.m4 -rm -f m4/stdint_h.m4 -rm -f m4/uintmax_t.m4 -rm -f m4/visibility.m4 -rm -f m4/wchar_t.m4 -rm -f m4/wint_t.m4 -rm -f m4/xsize.m4 -rm -f po/Makefile.in.in -rm -f po/remove-potcdate.sin - -# Generated by aclocal. -rm -f aclocal.m4 - -# Generated by autoconf. -rm -f configure - -# Generated or brought in by automake. -rm -f Makefile.in -rm -f m4/Makefile.in -rm -f install-sh -rm -f missing -rm -f config.guess -rm -f config.sub -rm -f po/*.pot -rm -f po/stamp-po -rm -f po/*.gmo diff --git a/gettext-tools/examples/hello-c++-gnome/autogen.sh b/gettext-tools/examples/hello-c++-gnome/autogen.sh deleted file mode 100755 index 7fc2283..0000000 --- a/gettext-tools/examples/hello-c++-gnome/autogen.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Script for regenerating all autogenerated files. - -autopoint -f # was: gettextize -f -c -rm po/Makevars.template -rm po/Rules-quot -rm po/boldquot.sed -rm po/address@hidden -rm po/address@hidden -rm po/insert-header.sin -rm po/quot.sed - -aclocal -I m4 - -autoconf - -automake -a -c - -cd po -for f in *.po; do - if test -r "$f"; then - lang=`echo $f | sed -e 's,\.po$,,'` - msgfmt -c -o $lang.gmo $lang.po - fi -done -cd .. diff --git a/gettext-tools/examples/hello-c++-gnome/configure.ac b/gettext-tools/examples/hello-c++-gnome/configure.ac deleted file mode 100644 index 3da4221..0000000 --- a/gettext-tools/examples/hello-c++-gnome/configure.ac +++ /dev/null @@ -1,25 +0,0 @@ -dnl Example for use of GNU gettext. -dnl This file is in the public domain. -dnl -dnl Configuration file - processed by autoconf. - -AC_INIT -AC_CONFIG_SRCDIR(hello.cc) -AM_INIT_AUTOMAKE(hello-c++-gnome, 0) - -AC_PROG_CXX - -GNOME_INIT -GTKMM_CFLAGS=`gtkmm-config --cflags` -AC_SUBST([GTKMM_CFLAGS]) -GTKMM_LIBS=`gtkmm-config --libs` -AC_SUBST([GTKMM_LIBS]) - -AC_CHECK_HEADERS([unistd.h]) -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION(0.15) - -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([m4/Makefile]) -AC_CONFIG_FILES([po/Makefile.in]) -AC_OUTPUT diff --git a/gettext-tools/examples/hello-c++-gnome/hello.cc b/gettext-tools/examples/hello-c++-gnome/hello.cc deleted file mode 100644 index 6056083..0000000 --- a/gettext-tools/examples/hello-c++-gnome/hello.cc +++ /dev/null @@ -1,87 +0,0 @@ -/* Example for use of GNU gettext. - This file is in the public domain. - - Source code of the C++ program. */ - - -/* Get GNOME declarations. */ -#include -#include - -/* Get getpid() declaration. */ -#if HAVE_UNISTD_H -# include -#endif - -static Gtk::Main *application; - -static gint -quit_callback (GdkEventAny*) -{ - application->quit (); -} - -int -main (int argc, char *argv[]) -{ - Gtk::Window *window; - Gtk::VBox *panel; - Gtk::Label *label1; - Gtk::Alignment *label1aligned; - Gtk::Label *label2; - Gtk::Alignment *label2aligned; - Gtk::Button *button; - Gtk::HButtonBox *buttonbar; - - /* Initializations. */ - - setlocale (LC_ALL, ""); - application = new Gtk::Main (argc, argv); - textdomain ("hello-c++-gnome"); - bindtextdomain ("hello-c++-gnome", LOCALEDIR); - - /* Create the GUI elements. */ - - window = new Gtk::Window (GTK_WINDOW_TOPLEVEL); - window->set_title ("Hello example"); - window->realize (); - window->delete_event.connect (SigC::slot (quit_callback)); - - label1 = new Gtk::Label (_("Hello, world!")); - - label1aligned = new Gtk::Alignment (0.0, 0.5, 0, 0); - label1aligned->add (*label1); - - label2 = new Gtk::Label (g_strdup_printf (_("This program is running as process number %d."), getpid ())); - - label2aligned = new Gtk::Alignment (0.0, 0.5, 0, 0); - label2aligned->add (*label2); - - button = new Gtk::Button ("OK"); - button->clicked.connect (Gtk::Main::quit.slot()); //slot (quit_callback)); - - buttonbar = new Gtk::HButtonBox (GTK_BUTTONBOX_END); - buttonbar->pack_start (*button); - - panel = new Gtk::VBox (false, GNOME_PAD_SMALL); - panel->pack_start (*label1aligned); - panel->pack_start (*label2aligned); - panel->pack_start (*buttonbar); - - window->add (*panel); - - /* Make the GUI elements visible. */ - - label1->show (); - label1aligned->show (); - label2->show (); - label2aligned->show (); - button->show (); - buttonbar->show (); - panel->show (); - window->show (); - - /* Start the event loop. */ - - application->run (); -} diff --git a/gettext-tools/examples/hello-c++-gnome/m4/Makefile.am b/gettext-tools/examples/hello-c++-gnome/m4/Makefile.am deleted file mode 100644 index 9554c61..0000000 --- a/gettext-tools/examples/hello-c++-gnome/m4/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -EXTRA_DIST = \ - codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 \ - inttypes_h.m4 inttypes-pri.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 \ - lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 visibility.m4 \ - gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 \ - gtk.m4 gtk--.m4 diff --git a/gettext-tools/examples/hello-c++-gnome/m4/gnome-gnorba-check.m4 b/gettext-tools/examples/hello-c++-gnome/m4/gnome-gnorba-check.m4 deleted file mode 100644 index dbac0a6..0000000 --- a/gettext-tools/examples/hello-c++-gnome/m4/gnome-gnorba-check.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl -dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) -dnl -dnl if failflag is "failure" it aborts if gnorba is not found. -dnl - -AC_DEFUN([GNOME_GNORBA_HOOK],[ - GNOME_ORBIT_HOOK([],$2) - AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ - gnome_cv_gnorba_found=no - if test x$gnome_cv_orbit_found = xyes; then - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - if test -n "$GNORBA_LIBS"; then - gnome_cv_gnorba_found=yes - fi - fi - ]) - AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - AC_SUBST(GNORBA_CFLAGS) - AC_SUBST(GNORBA_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(gnorba library not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_GNORBA_CHECK], [ - GNOME_GNORBA_HOOK([],failure) -]) diff --git a/gettext-tools/examples/hello-c++-gnome/m4/gnome-orbit-check.m4 b/gettext-tools/examples/hello-c++-gnome/m4/gnome-orbit-check.m4 deleted file mode 100644 index 54bf33a..0000000 --- a/gettext-tools/examples/hello-c++-gnome/m4/gnome-orbit-check.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) -dnl -dnl if failflag is "failure" it aborts if orbit is not found. -dnl - -AC_DEFUN([GNOME_ORBIT_HOOK],[ - AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) - AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) - AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ - if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then - gnome_cv_orbit_found=no - else - gnome_cv_orbit_found=yes - fi - ]) - AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - ORBIT_CFLAGS=`orbit-config --cflags client server` - ORBIT_LIBS=`orbit-config --use-service=name --libs client server` - AC_SUBST(ORBIT_CFLAGS) - AC_SUBST(ORBIT_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(ORBit not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_ORBIT_CHECK], [ - GNOME_ORBIT_HOOK([],failure) -]) diff --git a/gettext-tools/examples/hello-c++-gnome/m4/gnome.m4 b/gettext-tools/examples/hello-c++-gnome/m4/gnome.m4 deleted file mode 100644 index 659c22c..0000000 --- a/gettext-tools/examples/hello-c++-gnome/m4/gnome.m4 +++ /dev/null @@ -1,128 +0,0 @@ -dnl -dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) -dnl -dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh -dnl is not found. -dnl - -AC_DEFUN([GNOME_INIT_HOOK],[ - AC_SUBST(GNOME_LIBS) - AC_SUBST(GNOMEUI_LIBS) - AC_SUBST(GNOMEGNORBA_LIBS) - AC_SUBST(GTKXMHTML_LIBS) - AC_SUBST(ZVT_LIBS) - AC_SUBST(GNOME_LIBDIR) - AC_SUBST(GNOME_INCLUDEDIR) - - AC_ARG_WITH(gnome-includes, - [ --with-gnome-includes Specify location of GNOME headers],[ - CFLAGS="$CFLAGS -I$withval" - ]) - - AC_ARG_WITH(gnome-libs, - [ --with-gnome-libs Specify location of GNOME libs],[ - LDFLAGS="$LDFLAGS -L$withval" - gnome_prefix=$withval - ]) - - AC_ARG_WITH(gnome, - [ --with-gnome Specify prefix for GNOME files], - if test x$withval = xyes; then - want_gnome=yes - dnl Note that an empty true branch is not - dnl valid sh syntax. - ifelse([$1], [], :, [$1]) - else - if test "x$withval" = xno; then - want_gnome=no - else - want_gnome=yes - LDFLAGS="$LDFLAGS -L$withval/lib" - CFLAGS="$CFLAGS -I$withval/include" - gnome_prefix=$withval/lib - fi - fi, - want_gnome=yes) - - if test "x$want_gnome" = xyes; then - - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" = "no"; then - no_gnome_config="yes" - else - AC_MSG_CHECKING(if $GNOME_CONFIG works) - if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then - AC_MSG_RESULT(yes) - GNOME_GNORBA_HOOK([],$2) - GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" - GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" - GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" - GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" - ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" - GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" - GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" - $1 - else - AC_MSG_RESULT(no) - no_gnome_config="yes" - fi - fi - - if test x$exec_prefix = xNONE; then - if test x$prefix = xNONE; then - gnome_prefix=$ac_default_prefix/lib - else - gnome_prefix=$prefix/lib - fi - else - gnome_prefix=`eval echo \`echo $libdir\`` - fi - - if test "$no_gnome_config" = "yes"; then - AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) - if test -f $gnome_prefix/gnomeConf.sh; then - AC_MSG_RESULT(found) - echo "loading gnome configuration from" \ - "$gnome_prefix/gnomeConf.sh" - . $gnome_prefix/gnomeConf.sh - $1 - else - AC_MSG_RESULT(not found) - if test x$2 = xfail; then - AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) - fi - fi - fi - fi - - if test -n "$3"; then - n="$3" - for i in $n; do - AC_MSG_CHECKING(extra library \"$i\") - case $i in - applets) - AC_SUBST(GNOME_APPLETS_LIBS) - GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` - AC_MSG_RESULT($GNOME_APPLETS_LIBS);; - docklets) - AC_SUBST(GNOME_DOCKLETS_LIBS) - GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets` - AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);; - capplet) - AC_SUBST(GNOME_CAPPLET_LIBS) - GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` - AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; - *) - AC_MSG_RESULT(unknown library) - esac - done - fi -]) - -dnl -dnl GNOME_INIT ([additional-inits]) -dnl - -AC_DEFUN([GNOME_INIT],[ - GNOME_INIT_HOOK([],fail,$1) -]) diff --git a/gettext-tools/examples/hello-c++-gnome/m4/gtk--.m4 b/gettext-tools/examples/hello-c++-gnome/m4/gtk--.m4 deleted file mode 100644 index 896b64d..0000000 --- a/gettext-tools/examples/hello-c++-gnome/m4/gtk--.m4 +++ /dev/null @@ -1,195 +0,0 @@ -# Configure paths for GTK-- -# Erik Andersen 30 May 1998 -# Modified by Tero Pulkkinen (added the compiler checks... I hope they work..) -# Modified by Thomas Langen 16 Jan 2000 (corrected CXXFLAGS) - -dnl Test for GTKMM, and define GTKMM_CFLAGS and GTKMM_LIBS -dnl to be used as follows: -dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl -AC_DEFUN([AM_PATH_GTKMM], -[dnl -dnl Get the cflags and libraries from the gtkmm-config script -dnl -AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX - Prefix where GTK-- is installed (optional)], - gtkmm_config_prefix="$withval", gtkmm_config_prefix="") -AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX - Exec prefix where GTK-- is installed (optional)], - gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="") -AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program], - , enable_gtkmmtest=yes) - - if test x$gtkmm_config_exec_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config - fi - fi - if test x$gtkmm_config_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config - fi - fi - - AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no) - min_gtkmm_version=ifelse([$1], ,0.10.0,$1) - - AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version) - AC_LANG_SAVE - no_gtkmm="" - if test "$GTKMM_CONFIG" = "no" ; then - no_gtkmm=yes - else - AC_LANG_CPLUSPLUS - - GTKMM_CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags` - GTKMM_LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs` - gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gtkmmtest" = "xyes" ; then - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS" - LIBS="$LIBS $GTKMM_LIBS" -dnl -dnl Now check if the installed GTK-- is sufficiently new. (Also sanity -dnl checks the results of gtkmm-config to some extent -dnl - rm -f conf.gtkmmtest - AC_TRY_RUN([ -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtkmmtest"); - - /* HP/UX 0 (address@hidden) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtkmm_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtkmm_version"); - exit(1); - } - - if ((gtkmm_major_version != $gtkmm_config_major_version) || - (gtkmm_minor_version != $gtkmm_config_minor_version) || - (gtkmm_micro_version != $gtkmm_config_micro_version)) - { - printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n", - $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version, - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - printf ("*** was found! If gtkmm-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n"); - printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } -/* GTK-- does not have the GTKMM_*_VERSION constants */ -/* - else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) || - (gtkmm_minor_version != GTKMM_MINOR_VERSION) || - (gtkmm_micro_version != GTKMM_MICRO_VERSION)) - { - printf("*** GTK-- header files (version %d.%d.%d) do not match\n", - GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - } -*/ - else - { - if ((gtkmm_major_version > major) || - ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) || - ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n", - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n"); - printf("*** correct copy of gtkmm-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtkmm" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GTKMM_CONFIG" = "no" ; then - echo "*** The gtkmm-config script installed by GTK-- could not be found" - echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTKMM_CONFIG environment variable to the" - echo "*** full path to gtkmm-config." - echo "*** The gtkmm-config script was not available in GTK-- versions" - echo "*** prior to 0.9.12. Perhaps you need to update your installed" - echo "*** version to 0.9.12 or later" - else - if test -f conf.gtkmmtest ; then - : - else - echo "*** Could not run GTK-- test program, checking why..." - CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS" - LIBS="$LIBS $GTKMM_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK-- or finding the wrong" - echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK-- was incorrectly installed" - echo "*** or that you have moved GTK-- since it was installed. In the latter case, you" - echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ]) - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTKMM_CFLAGS="" - GTKMM_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_LANG_RESTORE - AC_SUBST(GTKMM_CFLAGS) - AC_SUBST(GTKMM_LIBS) - rm -f conf.gtkmmtest -]) - diff --git a/gettext-tools/examples/hello-c++-gnome/m4/gtk.m4 b/gettext-tools/examples/hello-c++-gnome/m4/gtk.m4 deleted file mode 100644 index f2dd472..0000000 --- a/gettext-tools/examples/hello-c++-gnome/m4/gtk.m4 +++ /dev/null @@ -1,194 +0,0 @@ -# Configure paths for GTK+ -# Owen Taylor 97-11-3 - -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS -dnl -AC_DEFUN([AM_PATH_GTK], -[dnl -dnl Get the cflags and libraries from the gtk-config script -dnl -AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], - gtk_config_prefix="$withval", gtk_config_prefix="") -AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], - gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") -AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], - , enable_gtktest=yes) - - for module in . $4 - do - case "$module" in - gthread) - gtk_config_args="$gtk_config_args gthread" - ;; - esac - done - - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi - - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes - else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gtktest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" -dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent -dnl - rm -f conf.gtktest - AC_TRY_RUN([ -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtktest"); - - /* HP/UX 9 (address@hidden) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtk_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - if ((gtk_major_version != $gtk_config_major_version) || - (gtk_minor_version != $gtk_config_minor_version) || - (gtk_micro_version != $gtk_config_micro_version)) - { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) - else if ((gtk_major_version != GTK_MAJOR_VERSION) || - (gtk_minor_version != GTK_MINOR_VERSION) || - (gtk_micro_version != GTK_MICRO_VERSION)) - { - printf("*** GTK+ header files (version %d.%d.%d) do not match\n", - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - } -#endif /* defined (GTK_MAJOR_VERSION) ... */ - else - { - if ((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found" - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." - else - if test -f conf.gtktest ; then - : - else - echo "*** Could not run GTK test program, checking why..." - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) - rm -f conf.gtktest -]) diff --git a/gettext-tools/examples/hello-c++-gnome/po/.gitignore b/gettext-tools/examples/hello-c++-gnome/po/.gitignore deleted file mode 100644 index 76f7d1d..0000000 --- a/gettext-tools/examples/hello-c++-gnome/po/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Other files brought in by autogen.sh: -/*.po - diff --git a/gettext-tools/examples/hello-c++-gnome/po/LINGUAS b/gettext-tools/examples/hello-c++-gnome/po/LINGUAS deleted file mode 100644 index 9f5ec65..0000000 --- a/gettext-tools/examples/hello-c++-gnome/po/LINGUAS +++ /dev/null @@ -1,5 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Set of available languages. -af ast bg ca cs da de el eo es fi fr ga gl hr hu id it ja ky lv ms mt nb nl pl pt ro ru sk sl sr sv tr uk vi zh_CN zh_HK zh_TW diff --git a/gettext-tools/examples/hello-c++-gnome/po/Makevars b/gettext-tools/examples/hello-c++-gnome/po/Makevars deleted file mode 100644 index 7b158ff..0000000 --- a/gettext-tools/examples/hello-c++-gnome/po/Makevars +++ /dev/null @@ -1,67 +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=_ --flag=_:1:pass-c-format \ - --keyword=N_ --flag=N_:1:pass-c-format \ - --flag=g_log:3:c-format --flag=g_logv:3:c-format \ - --flag=g_error:1:c-format --flag=g_message:1:c-format \ - --flag=g_critical:1:c-format --flag=g_warning:1:c-format \ - --flag=g_print:1:c-format \ - --flag=g_printerr:1:c-format \ - --flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \ - --flag=g_printf_string_upper_bound:1:c-format \ - --flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \ - --flag=g_string_sprintf:2:c-format \ - --flag=g_string_sprintfa:2:c-format \ - --flag=g_scanner_error:2:c-format \ - --flag=g_scanner_warn:2:c-format - -# 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 = Yoyodyne, Inc. - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = address@hidden - -# 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 = - -# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' -# context. Possible values are "yes" and "no". Set this to yes if the -# package uses functions taking also a message context, like pgettext(), or -# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. -USE_MSGCTXT = no - -# These options get passed to msgmerge. -# Useful options are in particular: -# --previous to keep previous msgids of translated messages, -# --quiet to reduce the verbosity. -MSGMERGE_OPTIONS = --quiet diff --git a/gettext-tools/examples/hello-c++-gnome/po/POTFILES.in b/gettext-tools/examples/hello-c++-gnome/po/POTFILES.in deleted file mode 100644 index bd28e81..0000000 --- a/gettext-tools/examples/hello-c++-gnome/po/POTFILES.in +++ /dev/null @@ -1,5 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# List of files which contain translatable strings. -hello.cc diff --git a/gettext-tools/examples/hello-c++-gtk/INSTALL b/gettext-tools/examples/hello-c++-gtk/INSTALL new file mode 100644 index 0000000..3065afb --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/INSTALL @@ -0,0 +1,15 @@ +This example relies on: + - the GTK libraries (libgtk, libgdk) + - the glib libraries (libglib, libgmodule) + - the GTK / C++ bindings (libgtkmm, libgdkmm) + - the C++ signal/slot library (libsigc++) + - the C++ runtime libraries (libstdc++) + +Installation: + ./autogen.sh + ./configure --prefix=/some/prefix + make + make install +Cleanup: + make distclean + ./autoclean.sh diff --git a/gettext-tools/examples/hello-c++-gtk/Makefile.am b/gettext-tools/examples/hello-c++-gtk/Makefile.am new file mode 100644 index 0000000..09200bb --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/Makefile.am @@ -0,0 +1,32 @@ +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Makefile configuration - processed by automake. + +# General automake options. +AUTOMAKE_OPTIONS = foreign no-dependencies +ACLOCAL_AMFLAGS = -I m4 + +# The list of subdirectories containing Makefiles. +SUBDIRS = m4 po + +# The list of programs that are built. +bin_PROGRAMS = hello + +# The source files of the 'hello' program. +hello_SOURCES = hello.cc gettext.h + +# The graphic interface. +dist_pkgdata_DATA = hello.ui + +# Define a C macro LOCALEDIR indicating where catalogs will be installed. +DEFS = -DLOCALEDIR=\"$(localedir)\" -DPKGDATADIR=\""$(pkgdatadir)"\" @DEFS@ + +# Make sure the gnome.h include file is found. +AM_CPPFLAGS = $(GTKMM_CFLAGS) + +# Link time dependencies. +LDADD = $(GTKMM_LIBS) @LIBINTL@ + +# Additional files to be distributed. +EXTRA_DIST = autogen.sh autoclean.sh diff --git a/gettext-tools/examples/hello-c++-gtk/autoclean.sh b/gettext-tools/examples/hello-c++-gtk/autoclean.sh new file mode 100755 index 0000000..2285d88 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/autoclean.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Script for cleaning all autogenerated files. + +test ! -f Makefile || make distclean + +# Brought in by explicit copy. +rm -f gettext.h + +# Brought in by autopoint. +rm -f ABOUT-NLS +rm -f config.rpath +rm -f m4/*.m4 +rm -f po/Makefile.in.in +rm -f po/remove-potcdate.sin + +# Generated by aclocal. +rm -f aclocal.m4 + +# Generated by autoconf. +rm -f configure + +# Generated or brought in by automake. +rm -f Makefile.in +rm -f m4/Makefile.in +rm -f install-sh +rm -f missing +rm -f config.guess +rm -f config.sub +rm -f po/*.pot +rm -f po/stamp-po +rm -f po/*.gmo diff --git a/gettext-tools/examples/hello-c++-gtk/autogen.sh b/gettext-tools/examples/hello-c++-gtk/autogen.sh new file mode 100755 index 0000000..78b1503 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/autogen.sh @@ -0,0 +1,50 @@ +#!/bin/sh +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Script for regenerating all autogenerated files. + +if test -r ../Makefile.am; then + # Inside the gettext source directory. + GETTEXT_TOPSRCDIR=../../.. +else + if test -r ../Makefile; then + # Inside a gettext build directory. + GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile` + # Adjust a relative top_srcdir. + case $GETTEXT_TOOLS_SRCDIR in + /*) ;; + *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;; + esac + GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/../.. + else + # Installed under ${prefix}/share/doc/gettext/examples. + . ../installpaths + fi +fi + +cp -p ${GETTEXTSRCDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-lib}/gettext.h gettext.h + +autopoint -f # was: gettextize -f -c +rm po/Makevars.template +rm po/Rules-quot +rm po/boldquot.sed +rm po/address@hidden +rm po/address@hidden +rm po/insert-header.sin +rm po/quot.sed + +aclocal -I m4 + +autoconf + +automake -a -c + +cd po +for f in *.po; do + if test -r "$f"; then + lang=`echo $f | sed -e 's,\.po$,,'` + msgfmt -c -o $lang.gmo $lang.po + fi +done +cd .. diff --git a/gettext-tools/examples/hello-c++-gtk/configure.ac b/gettext-tools/examples/hello-c++-gtk/configure.ac new file mode 100644 index 0000000..283940c --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/configure.ac @@ -0,0 +1,20 @@ +dnl Example for use of GNU gettext. +dnl This file is in the public domain. +dnl +dnl Configuration file - processed by autoconf. + +AC_INIT([hello-c++-gtk], [0.0], address@hidden, [hello-c++-gtk]) +AC_CONFIG_SRCDIR([hello.cc]) +AM_INIT_AUTOMAKE + +AC_PROG_CXX +AC_CHECK_HEADERS([unistd.h]) +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.18.3]) + +PKG_CHECK_MODULES([GTKMM], [gtkmm-3.0]) + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([m4/Makefile]) +AC_CONFIG_FILES([po/Makefile.in]) +AC_OUTPUT diff --git a/gettext-tools/examples/hello-c++-gtk/hello.cc b/gettext-tools/examples/hello-c++-gtk/hello.cc new file mode 100644 index 0000000..bff6d32 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/hello.cc @@ -0,0 +1,60 @@ +/* Example for use of GNU gettext. + This file is in the public domain. + + Source code of the C++ program. */ + + +/* Get Gtkmm declarations. */ +#include + +/* Get std::terminate declaration. */ +#include + +/* Get getpid() declaration. */ +#if HAVE_UNISTD_H +# include +#endif + +/* Get gettext() declaration. */ +#include "gettext.h" +#define _(S) (gettext(S)) + +int +main (int argc, char *argv[]) +{ + /* Initializations. */ + + setlocale(LC_ALL, ""); + Gtk::Main application(argc, argv); + textdomain("hello-c++-gtk"); + bindtextdomain("hello-c++-gtk", LOCALEDIR); + + /* Get the GUI elements. */ + + const std::string filename(PKGDATADIR "/hello.ui"); + Glib::RefPtr builder(Gtk::Builder::create_from_file(filename)); + + if (!builder) + std::terminate (); + + Gtk::Window* window(0); + builder->get_widget("main", window); + + gchar* title = g_strdup_printf(_("\ +This program is running as process number %d."), getpid()); + window->set_title (title); + g_free (title); + + if (!window) + std::terminate (); + + /* Make the GUI elements visible. */ + + window->show_all_children (); + + /* Start the event loop. */ + + application.run (*window); + + return 0; +} diff --git a/gettext-tools/examples/hello-c++-gtk/hello.ui b/gettext-tools/examples/hello-c++-gtk/hello.ui new file mode 100644 index 0000000..608f911 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/hello.ui @@ -0,0 +1,20 @@ + + + + + False + Hello, world! + 300 + 150 + + + Hello, world! + False + True + True + True + False + + + + diff --git a/gettext-tools/examples/hello-c++-gtk/m4/Makefile.am b/gettext-tools/examples/hello-c++-gtk/m4/Makefile.am new file mode 100644 index 0000000..91ea600 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/m4/Makefile.am @@ -0,0 +1,7 @@ +EXTRA_DIST = \ + codeset.m4 glibc21.m4 intdiv0.m4 intlmacosx.m4 inttypes-pri.m4 \ + lib-link.m4 longlong.m4 printf-posix.m4 stdint_h.m4 visibility.m4 \ + xsize.m4 fcntl-o.m4 glibc2.m4 intldir.m4 intmax.m4 lcmessage.m4 \ + lib-prefix.m4 nls.m4 progtest.m4 threadlib.m4 wchar_t.m4 gettext.m4 \ + iconv.m4 intl.m4 inttypes_h.m4 lib-ld.m4 lock.m4 po.m4 size_max.m4 \ + uintmax_t.m4 wint_t.m4 diff --git a/gettext-tools/examples/hello-c++-gtk/po/.gitignore b/gettext-tools/examples/hello-c++-gtk/po/.gitignore new file mode 100644 index 0000000..76f7d1d --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/po/.gitignore @@ -0,0 +1,3 @@ +# Other files brought in by autogen.sh: +/*.po + diff --git a/gettext-tools/examples/hello-c++-gtk/po/LINGUAS b/gettext-tools/examples/hello-c++-gtk/po/LINGUAS new file mode 100644 index 0000000..9f5ec65 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/po/LINGUAS @@ -0,0 +1,5 @@ +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Set of available languages. +af ast bg ca cs da de el eo es fi fr ga gl hr hu id it ja ky lv ms mt nb nl pl pt ro ru sk sl sr sv tr uk vi zh_CN zh_HK zh_TW diff --git a/gettext-tools/examples/hello-c++-gtk/po/Makevars b/gettext-tools/examples/hello-c++-gtk/po/Makevars new file mode 100644 index 0000000..971c6c7 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/po/Makevars @@ -0,0 +1,67 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = hello-c++-gtk + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = \ + --keyword=_ --flag=_:1:pass-c-format \ + --keyword=N_ --flag=N_:1:pass-c-format \ + --flag=g_log:3:c-format --flag=g_logv:3:c-format \ + --flag=g_error:1:c-format --flag=g_message:1:c-format \ + --flag=g_critical:1:c-format --flag=g_warning:1:c-format \ + --flag=g_print:1:c-format \ + --flag=g_printerr:1:c-format \ + --flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \ + --flag=g_printf_string_upper_bound:1:c-format \ + --flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \ + --flag=g_string_sprintf:2:c-format \ + --flag=g_string_sprintfa:2:c-format \ + --flag=g_scanner_error:2:c-format \ + --flag=g_scanner_warn:2:c-format + +# 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 = Yoyodyne, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = address@hidden + +# 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 = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no + +# These options get passed to msgmerge. +# Useful options are in particular: +# --previous to keep previous msgids of translated messages, +# --quiet to reduce the verbosity. +MSGMERGE_OPTIONS = --quiet diff --git a/gettext-tools/examples/hello-c++-gtk/po/POTFILES.in b/gettext-tools/examples/hello-c++-gtk/po/POTFILES.in new file mode 100644 index 0000000..f266ae0 --- /dev/null +++ b/gettext-tools/examples/hello-c++-gtk/po/POTFILES.in @@ -0,0 +1,6 @@ +# Example for use of GNU gettext. +# This file is in the public domain. +# +# List of files which contain translatable strings. +hello.cc +hello.ui diff --git a/gettext-tools/examples/hello-c-gnome/INSTALL b/gettext-tools/examples/hello-c-gnome/INSTALL deleted file mode 100644 index 6a6db9a..0000000 --- a/gettext-tools/examples/hello-c-gnome/INSTALL +++ /dev/null @@ -1,16 +0,0 @@ -This example relies on: - - the GNOME libraries (libgnomeui, libgnome, libgnomesupport, libart_lgpl) - and their dependencies: imlib (libgdk_imlib), audiofile (libaudiofile), - esound (libesd), zlib (libz). - - the GTK libraries (libgtk, libgdk) - - the glib libraries (libglib, libgmodule) - - the X11 libraries - -Installation: - ./autogen.sh - ./configure --prefix=/some/prefix - make - make install -Cleanup: - make distclean - ./autoclean.sh diff --git a/gettext-tools/examples/hello-c-gnome/Makefile.am b/gettext-tools/examples/hello-c-gnome/Makefile.am deleted file mode 100644 index ef6ea73..0000000 --- a/gettext-tools/examples/hello-c-gnome/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Makefile configuration - processed by automake. - -# General automake options. -AUTOMAKE_OPTIONS = foreign no-dependencies -ACLOCAL_AMFLAGS = -I m4 - -# The list of subdirectories containing Makefiles. -SUBDIRS = m4 po - -# The list of programs that are built. -bin_PROGRAMS = hello - -# The source files of the 'hello' program. -hello_SOURCES = hello.c - -# Define a C macro LOCALEDIR indicating where catalogs will be installed. -DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ - -# Make sure the gnome.h include file is found. -AM_CPPFLAGS = $(GNOME_INCLUDEDIR) - -# Link time dependencies. -LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS) @LIBINTL@ - -# Additional files to be distributed. -EXTRA_DIST = autogen.sh autoclean.sh diff --git a/gettext-tools/examples/hello-c-gnome/autoclean.sh b/gettext-tools/examples/hello-c-gnome/autoclean.sh deleted file mode 100755 index 2968f90..0000000 --- a/gettext-tools/examples/hello-c-gnome/autoclean.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Script for cleaning all autogenerated files. - -test ! -f Makefile || make distclean - -# Brought in by autopoint. -rm -f ABOUT-NLS -rm -f config.rpath -rm -f m4/codeset.m4 -rm -f m4/gettext.m4 -rm -f m4/glibc2.m4 -rm -f m4/glibc21.m4 -rm -f m4/iconv.m4 -rm -f m4/intdiv0.m4 -rm -f m4/intl.m4 -rm -f m4/intldir.m4 -rm -f m4/intlmacosx.m4 -rm -f m4/intmax.m4 -rm -f m4/inttypes-pri.m4 -rm -f m4/inttypes_h.m4 -rm -f m4/lcmessage.m4 -rm -f m4/lib-ld.m4 -rm -f m4/lib-link.m4 -rm -f m4/lib-prefix.m4 -rm -f m4/lock.m4 -rm -f m4/longlong.m4 -rm -f m4/nls.m4 -rm -f m4/po.m4 -rm -f m4/printf-posix.m4 -rm -f m4/progtest.m4 -rm -f m4/size_max.m4 -rm -f m4/stdint_h.m4 -rm -f m4/uintmax_t.m4 -rm -f m4/visibility.m4 -rm -f m4/wchar_t.m4 -rm -f m4/wint_t.m4 -rm -f m4/xsize.m4 -rm -f po/Makefile.in.in -rm -f po/remove-potcdate.sin - -# Generated by aclocal. -rm -f aclocal.m4 - -# Generated by autoconf. -rm -f configure - -# Generated or brought in by automake. -rm -f Makefile.in -rm -f m4/Makefile.in -rm -f install-sh -rm -f missing -rm -f config.guess -rm -f config.sub -rm -f po/*.pot -rm -f po/stamp-po -rm -f po/*.gmo diff --git a/gettext-tools/examples/hello-c-gnome/autogen.sh b/gettext-tools/examples/hello-c-gnome/autogen.sh deleted file mode 100755 index 7fc2283..0000000 --- a/gettext-tools/examples/hello-c-gnome/autogen.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Script for regenerating all autogenerated files. - -autopoint -f # was: gettextize -f -c -rm po/Makevars.template -rm po/Rules-quot -rm po/boldquot.sed -rm po/address@hidden -rm po/address@hidden -rm po/insert-header.sin -rm po/quot.sed - -aclocal -I m4 - -autoconf - -automake -a -c - -cd po -for f in *.po; do - if test -r "$f"; then - lang=`echo $f | sed -e 's,\.po$,,'` - msgfmt -c -o $lang.gmo $lang.po - fi -done -cd .. diff --git a/gettext-tools/examples/hello-c-gnome/configure.ac b/gettext-tools/examples/hello-c-gnome/configure.ac deleted file mode 100644 index d2e42c9..0000000 --- a/gettext-tools/examples/hello-c-gnome/configure.ac +++ /dev/null @@ -1,19 +0,0 @@ -dnl Example for use of GNU gettext. -dnl This file is in the public domain. -dnl -dnl Configuration file - processed by autoconf. - -AC_INIT -AC_CONFIG_SRCDIR(hello.c) -AM_INIT_AUTOMAKE(hello-c-gnome, 0) - -AC_PROG_CC -GNOME_INIT -AC_CHECK_HEADERS([unistd.h]) -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION(0.15) - -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([m4/Makefile]) -AC_CONFIG_FILES([po/Makefile.in]) -AC_OUTPUT diff --git a/gettext-tools/examples/hello-c-gnome/hello.c b/gettext-tools/examples/hello-c-gnome/hello.c deleted file mode 100644 index e7f5826..0000000 --- a/gettext-tools/examples/hello-c-gnome/hello.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Example for use of GNU gettext. - This file is in the public domain. - - Source code of the C program. */ - - -/* Get GNOME declarations. */ -#include - -/* Get getpid() declaration. */ -#if HAVE_UNISTD_H -# include -#endif - -static void -quit_callback (GtkWidget *widget, void *data) -{ - gtk_main_quit (); -} - -int -main (int argc, char *argv[]) -{ - GtkWidget *window; - GtkWidget *panel; - GtkWidget *label1; - GtkWidget *label1aligned; - GtkWidget *label2; - GtkWidget *label2aligned; - GtkWidget *button; - GtkWidget *buttonbar; - - /* Initializations. */ - - gnome_init (PACKAGE, VERSION, argc, argv); - textdomain ("hello-c-gnome"); - bindtextdomain ("hello-c-gnome", LOCALEDIR); - - /* Create the GUI elements. */ - - window = gnome_app_new ("hello-c-gnome", "Hello example"); - gtk_widget_realize (window); - gtk_signal_connect (GTK_OBJECT (window), "delete_event", - GTK_SIGNAL_FUNC (quit_callback), NULL); - - label1 = gtk_label_new (_("Hello, world!")); - - label1aligned = gtk_alignment_new (0.0, 0.5, 0, 0); - gtk_container_add (GTK_CONTAINER (label1aligned), label1); - - label2 = gtk_label_new (g_strdup_printf (_("This program is running as process number %d."), getpid ())); - - label2aligned = gtk_alignment_new (0.0, 0.5, 0, 0); - gtk_container_add (GTK_CONTAINER (label2aligned), label2); - - button = gtk_button_new_with_label ("OK"); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (quit_callback), NULL); - - buttonbar = gtk_hbutton_box_new (); - gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbar), GTK_BUTTONBOX_END); - gtk_box_pack_start_defaults (GTK_BOX (buttonbar), button); - - panel = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); - gtk_box_pack_start_defaults (GTK_BOX (panel), label1aligned); - gtk_box_pack_start_defaults (GTK_BOX (panel), label2aligned); - gtk_box_pack_start_defaults (GTK_BOX (panel), buttonbar); - - gnome_app_set_contents (GNOME_APP (window), panel); - - /* Make the GUI elements visible. */ - - gtk_widget_show (label1); - gtk_widget_show (label1aligned); - gtk_widget_show (label2); - gtk_widget_show (label2aligned); - gtk_widget_show (button); - gtk_widget_show (buttonbar); - gtk_widget_show (panel); - gtk_widget_show (window); - - /* Start the event loop. */ - - gtk_main (); - - return 0; -} diff --git a/gettext-tools/examples/hello-c-gnome/m4/Makefile.am b/gettext-tools/examples/hello-c-gnome/m4/Makefile.am deleted file mode 100644 index dc63c0f..0000000 --- a/gettext-tools/examples/hello-c-gnome/m4/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_DIST = \ - codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 \ - inttypes_h.m4 inttypes-pri.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 \ - lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 visibility.m4 \ - gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 diff --git a/gettext-tools/examples/hello-c-gnome/m4/gnome-gnorba-check.m4 b/gettext-tools/examples/hello-c-gnome/m4/gnome-gnorba-check.m4 deleted file mode 100644 index dbac0a6..0000000 --- a/gettext-tools/examples/hello-c-gnome/m4/gnome-gnorba-check.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl -dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) -dnl -dnl if failflag is "failure" it aborts if gnorba is not found. -dnl - -AC_DEFUN([GNOME_GNORBA_HOOK],[ - GNOME_ORBIT_HOOK([],$2) - AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ - gnome_cv_gnorba_found=no - if test x$gnome_cv_orbit_found = xyes; then - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - if test -n "$GNORBA_LIBS"; then - gnome_cv_gnorba_found=yes - fi - fi - ]) - AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - AC_SUBST(GNORBA_CFLAGS) - AC_SUBST(GNORBA_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(gnorba library not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_GNORBA_CHECK], [ - GNOME_GNORBA_HOOK([],failure) -]) diff --git a/gettext-tools/examples/hello-c-gnome/m4/gnome-orbit-check.m4 b/gettext-tools/examples/hello-c-gnome/m4/gnome-orbit-check.m4 deleted file mode 100644 index 54bf33a..0000000 --- a/gettext-tools/examples/hello-c-gnome/m4/gnome-orbit-check.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) -dnl -dnl if failflag is "failure" it aborts if orbit is not found. -dnl - -AC_DEFUN([GNOME_ORBIT_HOOK],[ - AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) - AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) - AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ - if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then - gnome_cv_orbit_found=no - else - gnome_cv_orbit_found=yes - fi - ]) - AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - ORBIT_CFLAGS=`orbit-config --cflags client server` - ORBIT_LIBS=`orbit-config --use-service=name --libs client server` - AC_SUBST(ORBIT_CFLAGS) - AC_SUBST(ORBIT_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(ORBit not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_ORBIT_CHECK], [ - GNOME_ORBIT_HOOK([],failure) -]) diff --git a/gettext-tools/examples/hello-c-gnome/m4/gnome.m4 b/gettext-tools/examples/hello-c-gnome/m4/gnome.m4 deleted file mode 100644 index 659c22c..0000000 --- a/gettext-tools/examples/hello-c-gnome/m4/gnome.m4 +++ /dev/null @@ -1,128 +0,0 @@ -dnl -dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) -dnl -dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh -dnl is not found. -dnl - -AC_DEFUN([GNOME_INIT_HOOK],[ - AC_SUBST(GNOME_LIBS) - AC_SUBST(GNOMEUI_LIBS) - AC_SUBST(GNOMEGNORBA_LIBS) - AC_SUBST(GTKXMHTML_LIBS) - AC_SUBST(ZVT_LIBS) - AC_SUBST(GNOME_LIBDIR) - AC_SUBST(GNOME_INCLUDEDIR) - - AC_ARG_WITH(gnome-includes, - [ --with-gnome-includes Specify location of GNOME headers],[ - CFLAGS="$CFLAGS -I$withval" - ]) - - AC_ARG_WITH(gnome-libs, - [ --with-gnome-libs Specify location of GNOME libs],[ - LDFLAGS="$LDFLAGS -L$withval" - gnome_prefix=$withval - ]) - - AC_ARG_WITH(gnome, - [ --with-gnome Specify prefix for GNOME files], - if test x$withval = xyes; then - want_gnome=yes - dnl Note that an empty true branch is not - dnl valid sh syntax. - ifelse([$1], [], :, [$1]) - else - if test "x$withval" = xno; then - want_gnome=no - else - want_gnome=yes - LDFLAGS="$LDFLAGS -L$withval/lib" - CFLAGS="$CFLAGS -I$withval/include" - gnome_prefix=$withval/lib - fi - fi, - want_gnome=yes) - - if test "x$want_gnome" = xyes; then - - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" = "no"; then - no_gnome_config="yes" - else - AC_MSG_CHECKING(if $GNOME_CONFIG works) - if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then - AC_MSG_RESULT(yes) - GNOME_GNORBA_HOOK([],$2) - GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" - GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" - GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" - GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" - ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" - GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" - GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" - $1 - else - AC_MSG_RESULT(no) - no_gnome_config="yes" - fi - fi - - if test x$exec_prefix = xNONE; then - if test x$prefix = xNONE; then - gnome_prefix=$ac_default_prefix/lib - else - gnome_prefix=$prefix/lib - fi - else - gnome_prefix=`eval echo \`echo $libdir\`` - fi - - if test "$no_gnome_config" = "yes"; then - AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) - if test -f $gnome_prefix/gnomeConf.sh; then - AC_MSG_RESULT(found) - echo "loading gnome configuration from" \ - "$gnome_prefix/gnomeConf.sh" - . $gnome_prefix/gnomeConf.sh - $1 - else - AC_MSG_RESULT(not found) - if test x$2 = xfail; then - AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) - fi - fi - fi - fi - - if test -n "$3"; then - n="$3" - for i in $n; do - AC_MSG_CHECKING(extra library \"$i\") - case $i in - applets) - AC_SUBST(GNOME_APPLETS_LIBS) - GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` - AC_MSG_RESULT($GNOME_APPLETS_LIBS);; - docklets) - AC_SUBST(GNOME_DOCKLETS_LIBS) - GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets` - AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);; - capplet) - AC_SUBST(GNOME_CAPPLET_LIBS) - GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` - AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; - *) - AC_MSG_RESULT(unknown library) - esac - done - fi -]) - -dnl -dnl GNOME_INIT ([additional-inits]) -dnl - -AC_DEFUN([GNOME_INIT],[ - GNOME_INIT_HOOK([],fail,$1) -]) diff --git a/gettext-tools/examples/hello-c-gnome/po/.gitignore b/gettext-tools/examples/hello-c-gnome/po/.gitignore deleted file mode 100644 index 76f7d1d..0000000 --- a/gettext-tools/examples/hello-c-gnome/po/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Other files brought in by autogen.sh: -/*.po - diff --git a/gettext-tools/examples/hello-c-gnome/po/LINGUAS b/gettext-tools/examples/hello-c-gnome/po/LINGUAS deleted file mode 100644 index 9f5ec65..0000000 --- a/gettext-tools/examples/hello-c-gnome/po/LINGUAS +++ /dev/null @@ -1,5 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Set of available languages. -af ast bg ca cs da de el eo es fi fr ga gl hr hu id it ja ky lv ms mt nb nl pl pt ro ru sk sl sr sv tr uk vi zh_CN zh_HK zh_TW diff --git a/gettext-tools/examples/hello-c-gnome/po/Makevars b/gettext-tools/examples/hello-c-gnome/po/Makevars deleted file mode 100644 index 7b158ff..0000000 --- a/gettext-tools/examples/hello-c-gnome/po/Makevars +++ /dev/null @@ -1,67 +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=_ --flag=_:1:pass-c-format \ - --keyword=N_ --flag=N_:1:pass-c-format \ - --flag=g_log:3:c-format --flag=g_logv:3:c-format \ - --flag=g_error:1:c-format --flag=g_message:1:c-format \ - --flag=g_critical:1:c-format --flag=g_warning:1:c-format \ - --flag=g_print:1:c-format \ - --flag=g_printerr:1:c-format \ - --flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \ - --flag=g_printf_string_upper_bound:1:c-format \ - --flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \ - --flag=g_string_sprintf:2:c-format \ - --flag=g_string_sprintfa:2:c-format \ - --flag=g_scanner_error:2:c-format \ - --flag=g_scanner_warn:2:c-format - -# 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 = Yoyodyne, Inc. - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = address@hidden - -# 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 = - -# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' -# context. Possible values are "yes" and "no". Set this to yes if the -# package uses functions taking also a message context, like pgettext(), or -# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. -USE_MSGCTXT = no - -# These options get passed to msgmerge. -# Useful options are in particular: -# --previous to keep previous msgids of translated messages, -# --quiet to reduce the verbosity. -MSGMERGE_OPTIONS = --quiet diff --git a/gettext-tools/examples/hello-c-gnome/po/POTFILES.in b/gettext-tools/examples/hello-c-gnome/po/POTFILES.in deleted file mode 100644 index 92cdf78..0000000 --- a/gettext-tools/examples/hello-c-gnome/po/POTFILES.in +++ /dev/null @@ -1,5 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# List of files which contain translatable strings. -hello.c diff --git a/gettext-tools/examples/hello-c-gtk/INSTALL b/gettext-tools/examples/hello-c-gtk/INSTALL new file mode 100644 index 0000000..5707693 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/INSTALL @@ -0,0 +1,13 @@ +This example relies on: + - GNU Autoconf and Automake. + - the GTK libraries (libgtk, libgdk) + - the glib libraries (libglib, libgmodule) + +Installation: + ./autogen.sh + ./configure --prefix=/some/prefix + make + make install +Cleanup: + make distclean + ./autoclean.sh diff --git a/gettext-tools/examples/hello-c-gtk/Makefile.am b/gettext-tools/examples/hello-c-gtk/Makefile.am new file mode 100644 index 0000000..b52c536 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/Makefile.am @@ -0,0 +1,33 @@ +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Makefile configuration - processed by automake. + +# General automake options. +AUTOMAKE_OPTIONS = foreign no-dependencies +ACLOCAL_AMFLAGS = -I m4 + +# The list of subdirectories containing Makefiles. +SUBDIRS = m4 po + +# The list of programs that are built. +bin_PROGRAMS = hello + +# The source files of the 'hello' program. +hello_SOURCES = hello.c gettext.h + +# Graphic interface file. +dist_pkgdata_DATA = hello.ui + +# Define a C macro LOCALEDIR indicating where catalogs will be installed +# and DATADIR indicating where ui files will be installed. +DEFS = -DLOCALEDIR=\"$(localedir)\" -DPKGDATADIR=\""$(pkgdatadir)"\" @DEFS@ + +# Flags for preprocessor and compiler needed by Gtk. +AM_CPPFLAGS = $(GTK_CFLAGS) + +# Link time dependencies. +LDADD = $(GTK_LIBS) @LIBINTL@ + +# Additional files to be distributed. +EXTRA_DIST = autogen.sh autoclean.sh diff --git a/gettext-tools/examples/hello-c-gtk/autoclean.sh b/gettext-tools/examples/hello-c-gtk/autoclean.sh new file mode 100755 index 0000000..2285d88 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/autoclean.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Script for cleaning all autogenerated files. + +test ! -f Makefile || make distclean + +# Brought in by explicit copy. +rm -f gettext.h + +# Brought in by autopoint. +rm -f ABOUT-NLS +rm -f config.rpath +rm -f m4/*.m4 +rm -f po/Makefile.in.in +rm -f po/remove-potcdate.sin + +# Generated by aclocal. +rm -f aclocal.m4 + +# Generated by autoconf. +rm -f configure + +# Generated or brought in by automake. +rm -f Makefile.in +rm -f m4/Makefile.in +rm -f install-sh +rm -f missing +rm -f config.guess +rm -f config.sub +rm -f po/*.pot +rm -f po/stamp-po +rm -f po/*.gmo diff --git a/gettext-tools/examples/hello-c-gtk/autogen.sh b/gettext-tools/examples/hello-c-gtk/autogen.sh new file mode 100755 index 0000000..78b1503 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/autogen.sh @@ -0,0 +1,50 @@ +#!/bin/sh +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Script for regenerating all autogenerated files. + +if test -r ../Makefile.am; then + # Inside the gettext source directory. + GETTEXT_TOPSRCDIR=../../.. +else + if test -r ../Makefile; then + # Inside a gettext build directory. + GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile` + # Adjust a relative top_srcdir. + case $GETTEXT_TOOLS_SRCDIR in + /*) ;; + *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;; + esac + GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/../.. + else + # Installed under ${prefix}/share/doc/gettext/examples. + . ../installpaths + fi +fi + +cp -p ${GETTEXTSRCDIR-$GETTEXT_TOPSRCDIR/gettext-tools/gnulib-lib}/gettext.h gettext.h + +autopoint -f # was: gettextize -f -c +rm po/Makevars.template +rm po/Rules-quot +rm po/boldquot.sed +rm po/address@hidden +rm po/address@hidden +rm po/insert-header.sin +rm po/quot.sed + +aclocal -I m4 + +autoconf + +automake -a -c + +cd po +for f in *.po; do + if test -r "$f"; then + lang=`echo $f | sed -e 's,\.po$,,'` + msgfmt -c -o $lang.gmo $lang.po + fi +done +cd .. diff --git a/gettext-tools/examples/hello-c-gtk/configure.ac b/gettext-tools/examples/hello-c-gtk/configure.ac new file mode 100644 index 0000000..14a9f5d --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/configure.ac @@ -0,0 +1,20 @@ +dnl Example for use of GNU gettext. +dnl This file is in the public domain. +dnl +dnl Configuration file - processed by autoconf. + +AC_INIT([hello-c-gtk], [0.0], address@hidden, [hello-c-gtk]) +AC_CONFIG_SRCDIR([hello.c]) +AM_INIT_AUTOMAKE + +AC_PROG_CC +AC_CHECK_HEADERS([unistd.h]) +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.18.3]) + +PKG_CHECK_MODULES([GTK], [gtk+-3.0 gmodule-2.0]) + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([m4/Makefile]) +AC_CONFIG_FILES([po/Makefile.in]) +AC_OUTPUT diff --git a/gettext-tools/examples/hello-c-gtk/hello.c b/gettext-tools/examples/hello-c-gtk/hello.c new file mode 100644 index 0000000..5ca2f6e --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/hello.c @@ -0,0 +1,95 @@ +/* Example for use of GNU gettext. + This file is in the public domain. + + Source code of the C program. */ + +/* Get Gtk+ declarations. */ +#include + +/* Get abort () declaration. */ +#include + +/* Get getpid() declaration. */ +#if HAVE_UNISTD_H +# include +#endif + +/* Get gettext macros. */ +#include "gettext.h" +#ifdef ENABLE_NLS +#define _(Str) (gettext (Str)) +#else +#define _(Str) +#endif + +/* Must be visible for autoconnecting. */ +void +button_callback (GtkButton *button, gpointer user_data) +{ + gchar *label; + label = g_strdup_printf (_("This program is running as process number %d."), + getpid ()); + gtk_button_set_label (button, label); + g_free (label); +} + +/* Must be visible for autoconnecting. */ +void +quit_callback (GtkWidget *widget, void *data) +{ + gtk_main_quit (); +} + +static GtkWidget* +get_main_window () +{ + GtkBuilder *builder; + GtkWidget *window; + GError *err; + + /* Create GtkBuilder. */ + builder = gtk_builder_new (); + if (builder == NULL) + abort (); /* Could not create builder object. */ + + /* Load from file. Data is already translated. */ + err = NULL; + gtk_builder_add_from_file (builder, PKGDATADIR "/hello.ui", &err); + if (err != NULL) + abort (); /* Error while loading GUI file. */ + + /* Connect signals. */ + gtk_builder_connect_signals (builder, NULL); + + /* Retrieve main window. */ + window = GTK_WIDGET (gtk_builder_get_object (builder, "main")); + if (window == NULL) + abort (); /* Error while loading main window. */ + + /* Remove reference from builder object. */ + g_object_unref (G_OBJECT (builder)); + + return window; +} + +int +main (int argc, char *argv[]) +{ + GtkWidget *window; + + /* Initializations. */ + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + gtk_init (&argc, &argv); + + /* Get the GUI elements. */ + window = get_main_window (); + + /* Make the GUI elements visible. */ + gtk_widget_show (window); + + /* Start the event loop. */ + gtk_main (); + + return 0; +} diff --git a/gettext-tools/examples/hello-c-gtk/hello.ui b/gettext-tools/examples/hello-c-gtk/hello.ui new file mode 100644 index 0000000..cdd7d22 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/hello.ui @@ -0,0 +1,22 @@ + + + + + False + Hello, world! + 300 + 150 + + + + Hello, world! + False + True + True + True + False + + + + + diff --git a/gettext-tools/examples/hello-c-gtk/m4/Makefile.am b/gettext-tools/examples/hello-c-gtk/m4/Makefile.am new file mode 100644 index 0000000..91ea600 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/m4/Makefile.am @@ -0,0 +1,7 @@ +EXTRA_DIST = \ + codeset.m4 glibc21.m4 intdiv0.m4 intlmacosx.m4 inttypes-pri.m4 \ + lib-link.m4 longlong.m4 printf-posix.m4 stdint_h.m4 visibility.m4 \ + xsize.m4 fcntl-o.m4 glibc2.m4 intldir.m4 intmax.m4 lcmessage.m4 \ + lib-prefix.m4 nls.m4 progtest.m4 threadlib.m4 wchar_t.m4 gettext.m4 \ + iconv.m4 intl.m4 inttypes_h.m4 lib-ld.m4 lock.m4 po.m4 size_max.m4 \ + uintmax_t.m4 wint_t.m4 diff --git a/gettext-tools/examples/hello-c-gtk/po/.gitignore b/gettext-tools/examples/hello-c-gtk/po/.gitignore new file mode 100644 index 0000000..76f7d1d --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/po/.gitignore @@ -0,0 +1,3 @@ +# Other files brought in by autogen.sh: +/*.po + diff --git a/gettext-tools/examples/hello-c-gtk/po/LINGUAS b/gettext-tools/examples/hello-c-gtk/po/LINGUAS new file mode 100644 index 0000000..9f5ec65 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/po/LINGUAS @@ -0,0 +1,5 @@ +# Example for use of GNU gettext. +# This file is in the public domain. +# +# Set of available languages. +af ast bg ca cs da de el eo es fi fr ga gl hr hu id it ja ky lv ms mt nb nl pl pt ro ru sk sl sr sv tr uk vi zh_CN zh_HK zh_TW diff --git a/gettext-tools/examples/hello-c-gtk/po/Makevars b/gettext-tools/examples/hello-c-gtk/po/Makevars new file mode 100644 index 0000000..7b158ff --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/po/Makevars @@ -0,0 +1,67 @@ +# 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=_ --flag=_:1:pass-c-format \ + --keyword=N_ --flag=N_:1:pass-c-format \ + --flag=g_log:3:c-format --flag=g_logv:3:c-format \ + --flag=g_error:1:c-format --flag=g_message:1:c-format \ + --flag=g_critical:1:c-format --flag=g_warning:1:c-format \ + --flag=g_print:1:c-format \ + --flag=g_printerr:1:c-format \ + --flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \ + --flag=g_printf_string_upper_bound:1:c-format \ + --flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \ + --flag=g_string_sprintf:2:c-format \ + --flag=g_string_sprintfa:2:c-format \ + --flag=g_scanner_error:2:c-format \ + --flag=g_scanner_warn:2:c-format + +# 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 = Yoyodyne, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = address@hidden + +# 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 = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no + +# These options get passed to msgmerge. +# Useful options are in particular: +# --previous to keep previous msgids of translated messages, +# --quiet to reduce the verbosity. +MSGMERGE_OPTIONS = --quiet diff --git a/gettext-tools/examples/hello-c-gtk/po/POTFILES.in b/gettext-tools/examples/hello-c-gtk/po/POTFILES.in new file mode 100644 index 0000000..9cd0692 --- /dev/null +++ b/gettext-tools/examples/hello-c-gtk/po/POTFILES.in @@ -0,0 +1,6 @@ +# Example for use of GNU gettext. +# This file is in the public domain. +# +# List of files which contain translatable strings. +hello.c +hello.ui diff --git a/gettext-tools/examples/hello-objc-gnome/INSTALL b/gettext-tools/examples/hello-objc-gnome/INSTALL deleted file mode 100644 index 1e82f28..0000000 --- a/gettext-tools/examples/hello-objc-gnome/INSTALL +++ /dev/null @@ -1,19 +0,0 @@ -This example relies on: - - the GNOME libraries (libgnomeui, libgnome, libgnomesupport, libart_lgpl) - and their dependencies: imlib (libgdk_imlib), audiofile (libaudiofile), - esound (libesd), zlib (libz). - - the GTK libraries (libgtk, libgdk) - - the glib libraries (libglib, libgmodule) - - the X11 libraries - - the GNOME / Objective C bindings (libobgnome) - - the GTK / Objective C bindings (libobgtk) - - the Objective C runtime libraries (libobjc) - -Installation: - ./autogen.sh - ./configure --prefix=/some/prefix - make - make install -Cleanup: - make distclean - ./autoclean.sh diff --git a/gettext-tools/examples/hello-objc-gnome/Makefile.am b/gettext-tools/examples/hello-objc-gnome/Makefile.am deleted file mode 100644 index 5756f6a..0000000 --- a/gettext-tools/examples/hello-objc-gnome/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Makefile configuration - processed by automake. - -# General automake options. -AUTOMAKE_OPTIONS = foreign no-dependencies -ACLOCAL_AMFLAGS = -I m4 - -# The list of subdirectories containing Makefiles. -SUBDIRS = m4 po - -# The list of programs that are built. -bin_PROGRAMS = hello - -# The source files of the 'hello' program. -hello_SOURCES = hello.m - -# Define a C macro LOCALEDIR indicating where catalogs will be installed. -DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ - -# Make sure the gnome.h include file is found. -AM_CPPFLAGS = $(OBGNOME_INCLUDES) $(GNOME_INCLUDEDIR) - -# Link time dependencies. -LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS) -lobgnome -lobgtk -lobjc @LIBINTL@ - -# Additional files to be distributed. -EXTRA_DIST = autogen.sh autoclean.sh diff --git a/gettext-tools/examples/hello-objc-gnome/autoclean.sh b/gettext-tools/examples/hello-objc-gnome/autoclean.sh deleted file mode 100755 index 2968f90..0000000 --- a/gettext-tools/examples/hello-objc-gnome/autoclean.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Script for cleaning all autogenerated files. - -test ! -f Makefile || make distclean - -# Brought in by autopoint. -rm -f ABOUT-NLS -rm -f config.rpath -rm -f m4/codeset.m4 -rm -f m4/gettext.m4 -rm -f m4/glibc2.m4 -rm -f m4/glibc21.m4 -rm -f m4/iconv.m4 -rm -f m4/intdiv0.m4 -rm -f m4/intl.m4 -rm -f m4/intldir.m4 -rm -f m4/intlmacosx.m4 -rm -f m4/intmax.m4 -rm -f m4/inttypes-pri.m4 -rm -f m4/inttypes_h.m4 -rm -f m4/lcmessage.m4 -rm -f m4/lib-ld.m4 -rm -f m4/lib-link.m4 -rm -f m4/lib-prefix.m4 -rm -f m4/lock.m4 -rm -f m4/longlong.m4 -rm -f m4/nls.m4 -rm -f m4/po.m4 -rm -f m4/printf-posix.m4 -rm -f m4/progtest.m4 -rm -f m4/size_max.m4 -rm -f m4/stdint_h.m4 -rm -f m4/uintmax_t.m4 -rm -f m4/visibility.m4 -rm -f m4/wchar_t.m4 -rm -f m4/wint_t.m4 -rm -f m4/xsize.m4 -rm -f po/Makefile.in.in -rm -f po/remove-potcdate.sin - -# Generated by aclocal. -rm -f aclocal.m4 - -# Generated by autoconf. -rm -f configure - -# Generated or brought in by automake. -rm -f Makefile.in -rm -f m4/Makefile.in -rm -f install-sh -rm -f missing -rm -f config.guess -rm -f config.sub -rm -f po/*.pot -rm -f po/stamp-po -rm -f po/*.gmo diff --git a/gettext-tools/examples/hello-objc-gnome/autogen.sh b/gettext-tools/examples/hello-objc-gnome/autogen.sh deleted file mode 100755 index 7fc2283..0000000 --- a/gettext-tools/examples/hello-objc-gnome/autogen.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Script for regenerating all autogenerated files. - -autopoint -f # was: gettextize -f -c -rm po/Makevars.template -rm po/Rules-quot -rm po/boldquot.sed -rm po/address@hidden -rm po/address@hidden -rm po/insert-header.sin -rm po/quot.sed - -aclocal -I m4 - -autoconf - -automake -a -c - -cd po -for f in *.po; do - if test -r "$f"; then - lang=`echo $f | sed -e 's,\.po$,,'` - msgfmt -c -o $lang.gmo $lang.po - fi -done -cd .. diff --git a/gettext-tools/examples/hello-objc-gnome/configure.ac b/gettext-tools/examples/hello-objc-gnome/configure.ac deleted file mode 100644 index 9c64efe..0000000 --- a/gettext-tools/examples/hello-objc-gnome/configure.ac +++ /dev/null @@ -1,29 +0,0 @@ -dnl Example for use of GNU gettext. -dnl This file is in the public domain. -dnl -dnl Configuration file - processed by autoconf. - -AC_INIT -AC_CONFIG_SRCDIR(hello.m) -AM_INIT_AUTOMAKE(hello-objc-gnome, 0) - -AC_PROG_CC -AC_SUBST([OBJC],["$CC"]) -AC_SUBST([OBJCFLAGS],["$CFLAGS"]) - -GNOME_INIT -OBGNOME_INCLUDES= -obgnome_prefix=`obgnome-config --prefix` -if test -n "$obgnome_prefix"; then - OBGNOME_INCLUDES="-I $obgnome_prefix/include" -fi -AC_SUBST([OBGNOME_INCLUDES]) - -AC_CHECK_HEADERS([unistd.h]) -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION(0.15) - -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([m4/Makefile]) -AC_CONFIG_FILES([po/Makefile.in]) -AC_OUTPUT diff --git a/gettext-tools/examples/hello-objc-gnome/hello.m b/gettext-tools/examples/hello-objc-gnome/hello.m deleted file mode 100644 index eb3a0bc..0000000 --- a/gettext-tools/examples/hello-objc-gnome/hello.m +++ /dev/null @@ -1,88 +0,0 @@ -/* Example for use of GNU gettext. - This file is in the public domain. - - Source code of the Objective C program. */ - - -/* Get GNOME declarations. */ -#include - -/* Get getpid() declaration. */ -#if HAVE_UNISTD_H -# include -#endif - -static void -quit_callback (GtkWidget *widget, void *data) -{ - gtk_main_quit (); -} - -int -main (int argc, char *argv[]) -{ - Gnome_App *application; - Gtk_Window *window; - Gtk_VBox *panel; - Gtk_Label *label1; - Gtk_Alignment *label1aligned; - Gtk_Label *label2; - Gtk_Alignment *label2aligned; - Gtk_Button *button; - Gtk_ButtonBox *buttonbar; - - /* Initializations. */ - - application = [[Gnome_App alloc] initApp: PACKAGE : VERSION : argc : argv]; - textdomain ("hello-objc-gnome"); - bindtextdomain ("hello-objc-gnome", LOCALEDIR); - - /* Create the GUI elements. */ - - window = [[Gtk_Window alloc] initWithWindowInfo: GTK_WINDOW_TOPLEVEL]; - [window set_title: "Hello example"]; - [window realize]; - [window signal_connect: "delete_event" signalFunc: quit_callback funcData: NULL]; - - label1 = [[Gtk_Label alloc] initWithLabelInfo: _("Hello, world!")]; - - label1aligned = [[Gtk_Alignment alloc] initWithAlignmentInfo: 0.0 : 0.5 : 0 : 0]; - [label1aligned add: label1]; - - label2 = [[Gtk_Label alloc] initWithLabelInfo: g_strdup_printf (_("This program is running as process number %d."), getpid ())]; - - label2aligned = [[Gtk_Alignment alloc] initWithAlignmentInfo: 0.0 : 0.5 : 0 : 0]; - [label2aligned add: label2]; - - button = [Gtk_Button alloc]; - [button initWithLabel: "OK"]; - [button signal_connect: "clicked" signalFunc: quit_callback funcData: NULL]; - - buttonbar = [Gtk_HButtonBox new]; - [buttonbar set_layout: GTK_BUTTONBOX_END]; - [buttonbar pack_start_defaults: button]; - - panel = [[Gtk_VBox alloc] initWithVBoxInfo: FALSE : GNOME_PAD_SMALL]; - [panel pack_start_defaults: label1aligned]; - [panel pack_start_defaults: label2aligned]; - [panel pack_start_defaults: buttonbar]; - - [window add: panel]; - - /* Make the GUI elements visible. */ - - [label1 show]; - [label1aligned show]; - [label2 show]; - [label2aligned show]; - [button show]; - [buttonbar show]; - [panel show]; - [window show]; - - /* Start the event loop. */ - - gtk_main (); - - return 0; -} diff --git a/gettext-tools/examples/hello-objc-gnome/m4/Makefile.am b/gettext-tools/examples/hello-objc-gnome/m4/Makefile.am deleted file mode 100644 index dc63c0f..0000000 --- a/gettext-tools/examples/hello-objc-gnome/m4/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_DIST = \ - codeset.m4 gettext.m4 glibc2.m4 glibc21.m4 iconv.m4 intdiv0.m4 \ - inttypes_h.m4 inttypes-pri.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 \ - lib-prefix.m4 lock.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 \ - uintmax_t.m4 visibility.m4 \ - gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 diff --git a/gettext-tools/examples/hello-objc-gnome/m4/gnome-gnorba-check.m4 b/gettext-tools/examples/hello-objc-gnome/m4/gnome-gnorba-check.m4 deleted file mode 100644 index dbac0a6..0000000 --- a/gettext-tools/examples/hello-objc-gnome/m4/gnome-gnorba-check.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl -dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) -dnl -dnl if failflag is "failure" it aborts if gnorba is not found. -dnl - -AC_DEFUN([GNOME_GNORBA_HOOK],[ - GNOME_ORBIT_HOOK([],$2) - AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ - gnome_cv_gnorba_found=no - if test x$gnome_cv_orbit_found = xyes; then - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - if test -n "$GNORBA_LIBS"; then - gnome_cv_gnorba_found=yes - fi - fi - ]) - AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" - GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" - AC_SUBST(GNORBA_CFLAGS) - AC_SUBST(GNORBA_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(gnorba library not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_GNORBA_CHECK], [ - GNOME_GNORBA_HOOK([],failure) -]) diff --git a/gettext-tools/examples/hello-objc-gnome/m4/gnome-orbit-check.m4 b/gettext-tools/examples/hello-objc-gnome/m4/gnome-orbit-check.m4 deleted file mode 100644 index 54bf33a..0000000 --- a/gettext-tools/examples/hello-objc-gnome/m4/gnome-orbit-check.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) -dnl -dnl if failflag is "failure" it aborts if orbit is not found. -dnl - -AC_DEFUN([GNOME_ORBIT_HOOK],[ - AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) - AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) - AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ - if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then - gnome_cv_orbit_found=no - else - gnome_cv_orbit_found=yes - fi - ]) - AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) - if test x$gnome_cv_orbit_found = xyes; then - $1 - ORBIT_CFLAGS=`orbit-config --cflags client server` - ORBIT_LIBS=`orbit-config --use-service=name --libs client server` - AC_SUBST(ORBIT_CFLAGS) - AC_SUBST(ORBIT_LIBS) - else - if test x$2 = xfailure; then - AC_MSG_ERROR(ORBit not installed or installation problem) - fi - fi -]) - -AC_DEFUN([GNOME_ORBIT_CHECK], [ - GNOME_ORBIT_HOOK([],failure) -]) diff --git a/gettext-tools/examples/hello-objc-gnome/m4/gnome.m4 b/gettext-tools/examples/hello-objc-gnome/m4/gnome.m4 deleted file mode 100644 index 659c22c..0000000 --- a/gettext-tools/examples/hello-objc-gnome/m4/gnome.m4 +++ /dev/null @@ -1,128 +0,0 @@ -dnl -dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) -dnl -dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh -dnl is not found. -dnl - -AC_DEFUN([GNOME_INIT_HOOK],[ - AC_SUBST(GNOME_LIBS) - AC_SUBST(GNOMEUI_LIBS) - AC_SUBST(GNOMEGNORBA_LIBS) - AC_SUBST(GTKXMHTML_LIBS) - AC_SUBST(ZVT_LIBS) - AC_SUBST(GNOME_LIBDIR) - AC_SUBST(GNOME_INCLUDEDIR) - - AC_ARG_WITH(gnome-includes, - [ --with-gnome-includes Specify location of GNOME headers],[ - CFLAGS="$CFLAGS -I$withval" - ]) - - AC_ARG_WITH(gnome-libs, - [ --with-gnome-libs Specify location of GNOME libs],[ - LDFLAGS="$LDFLAGS -L$withval" - gnome_prefix=$withval - ]) - - AC_ARG_WITH(gnome, - [ --with-gnome Specify prefix for GNOME files], - if test x$withval = xyes; then - want_gnome=yes - dnl Note that an empty true branch is not - dnl valid sh syntax. - ifelse([$1], [], :, [$1]) - else - if test "x$withval" = xno; then - want_gnome=no - else - want_gnome=yes - LDFLAGS="$LDFLAGS -L$withval/lib" - CFLAGS="$CFLAGS -I$withval/include" - gnome_prefix=$withval/lib - fi - fi, - want_gnome=yes) - - if test "x$want_gnome" = xyes; then - - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" = "no"; then - no_gnome_config="yes" - else - AC_MSG_CHECKING(if $GNOME_CONFIG works) - if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then - AC_MSG_RESULT(yes) - GNOME_GNORBA_HOOK([],$2) - GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" - GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" - GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" - GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" - ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" - GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" - GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" - $1 - else - AC_MSG_RESULT(no) - no_gnome_config="yes" - fi - fi - - if test x$exec_prefix = xNONE; then - if test x$prefix = xNONE; then - gnome_prefix=$ac_default_prefix/lib - else - gnome_prefix=$prefix/lib - fi - else - gnome_prefix=`eval echo \`echo $libdir\`` - fi - - if test "$no_gnome_config" = "yes"; then - AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) - if test -f $gnome_prefix/gnomeConf.sh; then - AC_MSG_RESULT(found) - echo "loading gnome configuration from" \ - "$gnome_prefix/gnomeConf.sh" - . $gnome_prefix/gnomeConf.sh - $1 - else - AC_MSG_RESULT(not found) - if test x$2 = xfail; then - AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) - fi - fi - fi - fi - - if test -n "$3"; then - n="$3" - for i in $n; do - AC_MSG_CHECKING(extra library \"$i\") - case $i in - applets) - AC_SUBST(GNOME_APPLETS_LIBS) - GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` - AC_MSG_RESULT($GNOME_APPLETS_LIBS);; - docklets) - AC_SUBST(GNOME_DOCKLETS_LIBS) - GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets` - AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);; - capplet) - AC_SUBST(GNOME_CAPPLET_LIBS) - GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` - AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; - *) - AC_MSG_RESULT(unknown library) - esac - done - fi -]) - -dnl -dnl GNOME_INIT ([additional-inits]) -dnl - -AC_DEFUN([GNOME_INIT],[ - GNOME_INIT_HOOK([],fail,$1) -]) diff --git a/gettext-tools/examples/hello-objc-gnome/po/.gitignore b/gettext-tools/examples/hello-objc-gnome/po/.gitignore deleted file mode 100644 index 76f7d1d..0000000 --- a/gettext-tools/examples/hello-objc-gnome/po/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Other files brought in by autogen.sh: -/*.po - diff --git a/gettext-tools/examples/hello-objc-gnome/po/LINGUAS b/gettext-tools/examples/hello-objc-gnome/po/LINGUAS deleted file mode 100644 index 9f5ec65..0000000 --- a/gettext-tools/examples/hello-objc-gnome/po/LINGUAS +++ /dev/null @@ -1,5 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# Set of available languages. -af ast bg ca cs da de el eo es fi fr ga gl hr hu id it ja ky lv ms mt nb nl pl pt ro ru sk sl sr sv tr uk vi zh_CN zh_HK zh_TW diff --git a/gettext-tools/examples/hello-objc-gnome/po/Makevars b/gettext-tools/examples/hello-objc-gnome/po/Makevars deleted file mode 100644 index 7b158ff..0000000 --- a/gettext-tools/examples/hello-objc-gnome/po/Makevars +++ /dev/null @@ -1,67 +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=_ --flag=_:1:pass-c-format \ - --keyword=N_ --flag=N_:1:pass-c-format \ - --flag=g_log:3:c-format --flag=g_logv:3:c-format \ - --flag=g_error:1:c-format --flag=g_message:1:c-format \ - --flag=g_critical:1:c-format --flag=g_warning:1:c-format \ - --flag=g_print:1:c-format \ - --flag=g_printerr:1:c-format \ - --flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \ - --flag=g_printf_string_upper_bound:1:c-format \ - --flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \ - --flag=g_string_sprintf:2:c-format \ - --flag=g_string_sprintfa:2:c-format \ - --flag=g_scanner_error:2:c-format \ - --flag=g_scanner_warn:2:c-format - -# 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 = Yoyodyne, Inc. - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = address@hidden - -# 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 = - -# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' -# context. Possible values are "yes" and "no". Set this to yes if the -# package uses functions taking also a message context, like pgettext(), or -# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. -USE_MSGCTXT = no - -# These options get passed to msgmerge. -# Useful options are in particular: -# --previous to keep previous msgids of translated messages, -# --quiet to reduce the verbosity. -MSGMERGE_OPTIONS = --quiet diff --git a/gettext-tools/examples/hello-objc-gnome/po/POTFILES.in b/gettext-tools/examples/hello-objc-gnome/po/POTFILES.in deleted file mode 100644 index 0f7595d..0000000 --- a/gettext-tools/examples/hello-objc-gnome/po/POTFILES.in +++ /dev/null @@ -1,5 +0,0 @@ -# Example for use of GNU gettext. -# This file is in the public domain. -# -# List of files which contain translatable strings. -hello.m diff --git a/gettext-tools/examples/po/Makefile.am b/gettext-tools/examples/po/Makefile.am index dc8c451..d6b0cd4 100644 --- a/gettext-tools/examples/po/Makefile.am +++ b/gettext-tools/examples/po/Makefile.am @@ -21,13 +21,15 @@ AUTOMAKE_OPTIONS = 1.5 gnits # List of files which contain translatable strings. POTFILES = \ hello-c/hello.c \ - hello-c-gnome/hello.c \ + hello-c-gtk/hello.c \ + hello-c-gtk/hello.ui \ hello-c++/hello.cc \ hello-c++-qt/hello.cc \ hello-c++-kde/hello.cc \ hello-c++-kde/hellowindow.h \ hello-c++-kde/hellowindow.cc \ - hello-c++-gnome/hello.cc \ + hello-c++-gtk/hello.cc \ + hello-c++-gtk/hello.ui \ hello-c++-wxwidgets/hello.cc \ hello-objc/hello.m \ hello-objc-gnustep/main.m \ @@ -35,7 +37,6 @@ POTFILES = \ hello-objc-gnustep/AppController.m \ hello-objc-gnustep/Hello.h \ hello-objc-gnustep/Hello.m \ - hello-objc-gnome/hello.m \ hello-sh/hello.sh \ hello-python/hello.py.in \ hello-clisp/hello.lisp.in \ @@ -60,15 +61,14 @@ POTFILES = \ # List of small POT files. SMALLPOTS = \ hello-c.pot \ - hello-c-gnome.pot \ + hello-c-gtk.pot \ hello-c++.pot \ hello-c++-qt.pot \ hello-c++-kde.pot \ - hello-c++-gnome.pot \ + hello-c++-gtk.pot \ hello-c++-wxwidgets.pot \ hello-objc.pot \ hello-objc-gnustep.pot \ - hello-objc-gnome.pot \ hello-sh.pot \ hello-python.pot \ hello-clisp.pot \ @@ -213,8 +213,8 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) $(SMALLPOTS) remove-potcdate.sed hello-c.pot : $(POTFILES_DEPS) $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c -hello-c-gnome.pot : $(POTFILES_DEPS) - $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c-gnome +hello-c-gtk.pot : $(POTFILES_DEPS) + $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c-gtk hello-c++.pot : $(POTFILES_DEPS) $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++ @@ -225,8 +225,8 @@ hello-c++-qt.pot : $(POTFILES_DEPS) hello-c++-kde.pot : $(POTFILES_DEPS) $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-kde -hello-c++-gnome.pot : $(POTFILES_DEPS) - $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-gnome +hello-c++-gtk.pot : $(POTFILES_DEPS) + $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-gtk hello-c++-wxwidgets.pot : $(POTFILES_DEPS) $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-wxwidgets @@ -237,9 +237,6 @@ hello-objc.pot : $(POTFILES_DEPS) hello-objc-gnustep.pot : $(POTFILES_DEPS) $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc-gnustep -hello-objc-gnome.pot : $(POTFILES_DEPS) - $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc-gnome - hello-sh.pot : $(POTFILES_DEPS) $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-sh @@ -377,15 +374,14 @@ $(DUMMYPOFILES): SMALLPOFILES_FOR_lang = \ ../hello-c/po/$$lang.po \ - ../hello-c-gnome/po/$$lang.po \ + ../hello-c-gtk/po/$$lang.po \ ../hello-c++/po/$$lang.po \ ../hello-c++-qt/po/$$lang.po \ ../hello-c++-kde/po/$$lang.po \ - ../hello-c++-gnome/po/$$lang.po \ + ../hello-c++-gtk/po/$$lang.po \ ../hello-c++-wxwidgets/po/$$lang.po \ ../hello-objc/po/$$lang.po \ ../hello-objc-gnustep/po/$$lang.po \ - ../hello-objc-gnome/po/$$lang.po \ ../hello-sh/po/$$lang.po \ ../hello-python/po/$$lang.po \ ../hello-clisp/po/$$lang.po \ @@ -409,8 +405,8 @@ SMALLPOFILES_FOR_lang = \ ../hello-c/po/$(LL).po: hello-c.pot $(LL).po $(SHELL) mmsmallpo.sh hello-c $(LL) -../hello-c-gnome/po/$(LL).po: hello-c-gnome.pot $(LL).po - $(SHELL) mmsmallpo.sh hello-c-gnome $(LL) +../hello-c-gtk/po/$(LL).po: hello-c-gtk.pot $(LL).po + $(SHELL) mmsmallpo.sh hello-c-gtk $(LL) ../hello-c++/po/$(LL).po: hello-c++.pot $(LL).po $(SHELL) mmsmallpo.sh hello-c++ $(LL) @@ -421,8 +417,8 @@ SMALLPOFILES_FOR_lang = \ ../hello-c++-kde/po/$(LL).po: hello-c++-kde.pot $(LL).po $(SHELL) mmsmallpo.sh hello-c++-kde $(LL) -../hello-c++-gnome/po/$(LL).po: hello-c++-gnome.pot $(LL).po - $(SHELL) mmsmallpo.sh hello-c++-gnome $(LL) +../hello-c++-gtk/po/$(LL).po: hello-c++-gtk.pot $(LL).po + $(SHELL) mmsmallpo.sh hello-c++-gtk $(LL) ../hello-c++-wxwidgets/po/$(LL).po: hello-c++-wxwidgets.pot $(LL).po $(SHELL) mmsmallpo.sh hello-c++-wxwidgets $(LL) @@ -433,9 +429,6 @@ SMALLPOFILES_FOR_lang = \ ../hello-objc-gnustep/po/$(LL).po: hello-objc-gnustep.pot $(LL).po $(SHELL) mmsmallpo.sh hello-objc-gnustep $(LL) -../hello-objc-gnome/po/$(LL).po: hello-objc-gnome.pot $(LL).po - $(SHELL) mmsmallpo.sh hello-objc-gnome $(LL) - ../hello-sh/po/$(LL).po: hello-sh.pot $(LL).po $(SHELL) mmsmallpo.sh hello-sh $(LL) -- 1.8.4.rc3