From 1620aafff37587b3a6ddd419577936da1a5bf503 Mon Sep 17 00:00:00 2001 From: Padraig O'Briain Date: Wed, 30 Oct 2002 15:38:03 +0000 Subject: [PATCH] Add po directory * Makefile.am: Add po directory * configure.in: Add support for I18N * acconfig.h atk/atkintl.h: New files used to support I18N * atk/atkobject.c: Update atk_role_get_localized_name() to allow for localized name to be returned. * docs/Makefile.am: Add atkintl.h to IGNORE_HFILES * po/Makfile.in.in, po/POTFILES.in, po/po2tbl.sed.in po/.cvsignore po/ChangeLog: New files --- ChangeLog | 16 ++++ Makefile.am | 2 +- acconfig.h | 33 +++++++ atk/atkintl.h | 24 ++++++ atk/atkobject.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++- configure.in | 10 +++ docs/Makefile.am | 2 +- po/.cvsignore | 11 +++ po/ChangeLog | 4 + po/Makefile.in.in | 252 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ po/POTFILES.in | 1 + po/po2tbl.sed.in | 102 ++++++++++++++++++++++ 12 files changed, 683 insertions(+), 5 deletions(-) create mode 100644 acconfig.h create mode 100644 atk/atkintl.h create mode 100644 po/.cvsignore create mode 100644 po/ChangeLog create mode 100644 po/Makefile.in.in create mode 100644 po/POTFILES.in create mode 100644 po/po2tbl.sed.in diff --git a/ChangeLog b/ChangeLog index 9f57ca5..74451bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,21 @@ 2002-10-30 Padraig O'Briain + * Makefile.am: Add po directory + + * configure.in: Add support for I18N + + * acconfig.h atk/atkintl.h: New files used to support I18N + + * atk/atkobject.c: Update atk_role_get_localized_name() to + allow for localized name to be returned. + + * docs/Makefile.am: Add atkintl.h to IGNORE_HFILES + + * po/Makfile.in.in, po/POTFILES.in, po/po2tbl.sed.in po/.cvsignore + po/ChangeLog: New files + +2002-10-30 Padraig O'Briain + * atk/Makefile.am, atk/atk.h: Add reference to atk/atkrelationtype.h * atk/atkaction.[ch]: Add atk_action_get_localized_name. diff --git a/Makefile.am b/Makefile.am index 103dee3..fe970b1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Process this file with automake to create Makefile.in. -SUBDIRS=atk tests docs +SUBDIRS=atk tests docs po EXTRA_DIST = \ atk-uninstalled.pc.in \ diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 0000000..01824a9 --- /dev/null +++ b/acconfig.h @@ -0,0 +1,33 @@ +/* acconfig.h + This file is in the public domain. + + Descriptive text for the C preprocessor macros that + the distributed Autoconf macros can define. + No software package will use all of them; autoheader copies the ones + your configure.in uses into your configuration header file templates. + + The entries are in sort -df order: alphabetical, case insensitive, + ignoring punctuation (such as underscores). Although this order + can split up related entries, it makes it easier to check whether + a given entry is in the file. + + Leave the following blank line there!! Autoheader needs it. */ + + +/* Other stuff */ +#undef ENABLE_NLS + +#undef HAVE_CATGETS +#undef HAVE_GETTEXT +#undef HAVE_LC_MESSAGES + +#undef GETTEXT_PACKAGE + +/* #undef PACKAGE */ +/* #undef VERSION */ + + +/* Leave that blank line there!! Autoheader needs it. + If you're adding to this file, keep in mind: + The entries are in sort -df order: alphabetical, case insensitive, + ignoring punctuation (such as underscores). */ diff --git a/atk/atkintl.h b/atk/atkintl.h new file mode 100644 index 0000000..42d15bc --- /dev/null +++ b/atk/atkintl.h @@ -0,0 +1,24 @@ +#ifndef __ATKINTL_H__ +#define __ATKINTL_H__ + +#include "config.h" + +#ifdef ENABLE_NLS +#include +#define _(String) dgettext(GETTEXT_PACKAGE,String) +#ifdef gettext_noop +#define N_(String) gettext_noop(String) +#else +#define N_(String) (String) +#endif +#else /* NLS is disabled */ +#define _(String) (String) +#define N_(String) (String) +#define textdomain(String) (String) +#define gettext(String) (String) +#define dgettext(Domain,String) (String) +#define dcgettext(Domain,String,Type) (String) +#define bindtextdomain(Domain,Directory) (Domain) +#endif + +#endif diff --git a/atk/atkobject.c b/atk/atkobject.c index 2d0d023..261da36 100755 --- a/atk/atkobject.c +++ b/atk/atkobject.c @@ -24,6 +24,7 @@ #include "atk.h" #include "atkmarshal.h" #include "atk-enum-types.h" +#include "atkintl.h" GPtrArray *extra_roles = NULL; @@ -1105,7 +1106,7 @@ atk_object_notify (GObject *obj, * atk_role_get_name: * @role: The #AtkRole whose name is required * - * Gets the description string describing the #Roleype @role. + * Gets the description string describing the #AtkRole @role. * * Returns: the string describing the AtkRole */ @@ -1145,7 +1146,7 @@ atk_role_get_name (AtkRole role) * atk_role_get_localized_name: * @role: The #AtkRole whose localized name is required * - * Gets the localized description string describing the #Roleype @role. + * Gets the localized description string describing the #AtkRole @role. * * Returns: the localized string describing the AtkRole **/ @@ -1154,7 +1155,231 @@ atk_role_get_localized_name (AtkRole role) { G_CONST_RETURN gchar *name; - name = atk_role_get_name (role); + switch (role) + { + case ATK_ROLE_INVALID: + name = _("invalid"); + break; + case ATK_ROLE_ACCEL_LABEL: + name = _("accel-label"); + break; + case ATK_ROLE_ALERT: + name = _("alert"); + break; + case ATK_ROLE_ANIMATION: + name = _("animation"); + break; + case ATK_ROLE_ARROW: + name = _("arrow"); + break; + case ATK_ROLE_CALENDAR: + name = _("calendar"); + break; + case ATK_ROLE_CANVAS: + name = _("canvas"); + break; + case ATK_ROLE_CHECK_BOX: + name = _("check-box"); + break; + case ATK_ROLE_CHECK_MENU_ITEM: + name = _("check-menu-item"); + break; + case ATK_ROLE_COLOR_CHOOSER: + name = _("color-chooser"); + break; + case ATK_ROLE_COLUMN_HEADER: + name = _("column-header"); + break; + case ATK_ROLE_COMBO_BOX: + name = _("combo-box"); + break; + case ATK_ROLE_DATE_EDITOR: + name = _("date-editor"); + break; + case ATK_ROLE_DESKTOP_ICON: + name = _("desktop-icon"); + break; + case ATK_ROLE_DESKTOP_FRAME: + name = _("desktop-frame"); + break; + case ATK_ROLE_DIAL: + name = _("dial"); + break; + case ATK_ROLE_DIALOG: + name = _("dialog"); + break; + case ATK_ROLE_DIRECTORY_PANE: + name = _("directory-pane"); + break; + case ATK_ROLE_DRAWING_AREA: + name = _("drawing-area"); + break; + case ATK_ROLE_FILE_CHOOSER: + name = _("file-chooser"); + break; + case ATK_ROLE_FILLER: + name = _("filler"); + break; + case ATK_ROLE_FONT_CHOOSER: + name = _("font-chooser"); + break; + case ATK_ROLE_FRAME: + name = _("frame"); + break; + case ATK_ROLE_GLASS_PANE: + name = _("glass-pane"); + break; + case ATK_ROLE_HTML_CONTAINER: + name = _("html-container"); + break; + case ATK_ROLE_ICON: + name = _("icon"); + break; + case ATK_ROLE_IMAGE: + name = _("image"); + break; + case ATK_ROLE_INTERNAL_FRAME: + name = _("internal-frame"); + break; + case ATK_ROLE_LABEL: + name = _("label"); + break; + case ATK_ROLE_LAYERED_PANE: + name = _("layered-pane"); + break; + case ATK_ROLE_LIST: + name = _("list"); + break; + case ATK_ROLE_LIST_ITEM: + name = _("list-item"); + break; + case ATK_ROLE_MENU: + name = _("menu"); + break; + case ATK_ROLE_MENU_BAR: + name = _("menu-bar"); + break; + case ATK_ROLE_MENU_ITEM: + name = _("menu-item"); + break; + case ATK_ROLE_OPTION_PANE: + name = _("option-pane"); + break; + case ATK_ROLE_PAGE_TAB: + name = _("page-tab"); + break; + case ATK_ROLE_PAGE_TAB_LIST: + name = _("page-tab-list"); + break; + case ATK_ROLE_PANEL: + name = _("panel"); + break; + case ATK_ROLE_PASSWORD_TEXT: + name = _("password-text"); + break; + case ATK_ROLE_POPUP_MENU: + name = _("popup-menu"); + break; + case ATK_ROLE_PROGRESS_BAR: + name = _("progress-bar"); + break; + case ATK_ROLE_PUSH_BUTTON: + name = _("push-button"); + break; + case ATK_ROLE_RADIO_BUTTON: + name = _("radio-button"); + break; + case ATK_ROLE_RADIO_MENU_ITEM: + name = _("radio-menu-item"); + break; + case ATK_ROLE_ROOT_PANE: + name = _("root-pane"); + break; + case ATK_ROLE_ROW_HEADER: + name = _("row-header"); + break; + case ATK_ROLE_SCROLL_BAR: + name = _("scroll-bar"); + break; + case ATK_ROLE_SCROLL_PANE: + name = _("scroll-pane"); + break; + case ATK_ROLE_SEPARATOR: + name = _("separator"); + break; + case ATK_ROLE_SLIDER: + name = _("slider"); + break; + case ATK_ROLE_SPLIT_PANE: + name = _("split-pane"); + break; + case ATK_ROLE_SPIN_BUTTON: + name = _("spin-button"); + break; + case ATK_ROLE_STATUSBAR: + name = _("statusbar"); + break; + case ATK_ROLE_TABLE: + name = _("table"); + break; + case ATK_ROLE_TABLE_CELL: + name = _("table-cell"); + break; + case ATK_ROLE_TABLE_COLUMN_HEADER: + name = _("table-column-header"); + break; + case ATK_ROLE_TABLE_ROW_HEADER: + name = _("table-row-header"); + break; + case ATK_ROLE_TEAR_OFF_MENU_ITEM: + name = _("tear-off-menu-item"); + break; + case ATK_ROLE_TERMINAL: + name = _("terminal"); + break; + case ATK_ROLE_TEXT: + name = _("text"); + break; + case ATK_ROLE_TOGGLE_BUTTON: + name = _("toggle-button"); + break; + case ATK_ROLE_TOOL_BAR: + name = _("tool-bar"); + break; + case ATK_ROLE_TOOL_TIP: + name = _("tool-tip"); + break; + case ATK_ROLE_TREE: + name = _("tree"); + break; + case ATK_ROLE_TREE_TABLE: + name = _("tree-table"); + break; + case ATK_ROLE_UNKNOWN: + name = _("unknown"); + break; + case ATK_ROLE_VIEWPORT: + name = _("viewport"); + break; + case ATK_ROLE_WINDOW: + name = _("window"); + break; + case ATK_ROLE_HEADER: + name = _("header"); + break; + case ATK_ROLE_FOOTER: + name = _("footer"); + break; + case ATK_ROLE_PARAGRAPH: + name = _("paragraph"); + break; + case ATK_ROLE_RULER: + name = _("ruler"); + break; + default: + name = atk_role_get_name (role); + break; + } return name; } diff --git a/configure.in b/configure.in index 35e0731..5f56ceb 100644 --- a/configure.in +++ b/configure.in @@ -2,6 +2,8 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(ChangeLog) +AM_CONFIG_HEADER(config.h) + dnl ========================================================================== dnl dnl If you add a version number here, you *must* add an AC_SUBST line for @@ -60,6 +62,13 @@ dnl ========================================================================== AM_INIT_AUTOMAKE(atk,$ATK_VERSION) +GETTEXT_PACKAGE=atk10 +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE") + +ALL_LINGUAS="" +AM_GLIB_GNU_GETTEXT + AC_PROG_CC AM_DISABLE_STATIC AC_LIBTOOL_WIN32_DLL @@ -187,6 +196,7 @@ AC_SUBST(REBUILD) AC_OUTPUT([ Makefile +po/Makefile.in atk.pc atk-uninstalled.pc atk/Makefile diff --git a/docs/Makefile.am b/docs/Makefile.am index b85551b..7576e37 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -16,7 +16,7 @@ INSTALLDIR=$(prefix)/share/gtk-doc HTML_DIR = ${datadir}/gtk-doc/html # Header files to ignore when scanning -IGNORE_HFILES = atkmarshal.h +IGNORE_HFILES = atkmarshal.h atkintl.h # Images to copy into HTML directory HTML_IMAGES = diff --git a/po/.cvsignore b/po/.cvsignore new file mode 100644 index 0000000..f0c0b67 --- /dev/null +++ b/po/.cvsignore @@ -0,0 +1,11 @@ +*.gmo +*.mo +Makefile +Makefile.in +Makefile.in.in +POTFILES +cat-id-tbl.c +atk10.pot +messages +stamp-cat-id +po2tbl.sed diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 0000000..0f99747 --- /dev/null +++ b/po/ChangeLog @@ -0,0 +1,4 @@ +2002-10-30 gettextize + + * Makefile.in.in: Upgrade to gettext-0.10.38. + diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 0000000..d8bc42e --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,252 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. +# +# - Modified by Owen Taylor to use GETTEXT_PACKAGE +# instead of PACKAGE and to look for po2tbl in ./ not in intl/ +# + +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(GETTEXT_PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: cat-id-tbl.c $(CATALOGS) +all-no: + +$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in \ + && test ! -f $(GETTEXT_PACKAGE).po \ + || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ + && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(GETTEXT_PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ./po2tbl.sed $(srcdir)/$(GETTEXT_PACKAGE).pot \ + | sed -e "s/@GETTEXT_PACKAGE NAME@/$(GETTEXT_PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(GETTEXT_PACKAGE)" = "gettext"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m po2tbl.sed + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(GETTEXT_PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(GETTEXT_PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..0646884 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +atk/atkobject.c diff --git a/po/po2tbl.sed.in b/po/po2tbl.sed.in new file mode 100644 index 0000000..b3bcca4 --- /dev/null +++ b/po/po2tbl.sed.in @@ -0,0 +1,102 @@ +# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +1 { + i\ +/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ +\ +#if HAVE_CONFIG_H\ +# include \ +#endif\ +\ +#include "libgettext.h"\ +\ +const struct _msg_ent _msg_tbl[] = { + h + s/.*/0/ + x +} +# +# Write msgid entries in C array form. +# +/^msgid/ { + s/msgid[ ]*\(".*"\)/ {\1/ + tb +# Append the next line + :b + N +# Look whether second part is continuation line. + s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ +# Yes, then branch. + ta +# Because we assume that the input file correctly formed the line +# just read cannot be again be a msgid line. So it's safe to ignore +# it. + s/\(.*\)\n.*/\1/ + bc +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ +# Some buggy seds do not clear the `successful substitution since last ``t''' +# flag on `N', so we do a `t' here to clear it. + tb +# Not reached + :c + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)\n\([0-9]*\)/\1, \2},/ + s/\(.*\)"$/\1/ + p +} +# +# Last line. +# +$ { + i\ +};\ + + g + s/0*\(.*\)/int _msg_tbl_length = \1;/p +} +d -- 2.7.4