From 634d8ca0d95ad31527d0741ce22c9dffb7beb5f0 Mon Sep 17 00:00:00 2001 From: Toni Corvera Date: Tue, 24 Oct 2006 18:30:39 +0000 Subject: [PATCH] Retro-fitted branch 0.6.0 git-svn-id: https://svn.outlyer.net/svn/pub/nautilus-follow-symlink/branches/0.6.0@10 da2faf11-d50b-4b07-92cd-6070d1bd8887 --- BUILD | 9 +++++---- ChangeLog | 9 +++++++-- Makefile.am | 23 ++++++++++++++++++++++- configure.in | 15 +++++++++++++-- debian/changelog | 9 +++++++++ debian/control | 3 +-- dist | 6 ++++++ po/POTFILES.in | 1 + po/ca.po | 24 ++++++++++++++++++++++++ po/es.po | 26 ++++++++++++++++++++++++++ po/libnautilus-follow-symlink.pot | 25 +++++++++++++++++++++++++ src/Makefile.am | 3 +++ src/common.h | 3 +++ src/follow-symlink.c | 4 ++-- src/nautilus-ext-follow-symlink.c | 7 +++++++ 15 files changed, 154 insertions(+), 13 deletions(-) create mode 100644 po/POTFILES.in create mode 100644 po/ca.po create mode 100644 po/es.po create mode 100644 po/libnautilus-follow-symlink.pot diff --git a/BUILD b/BUILD index 4c807d5..5046153 100644 --- a/BUILD +++ b/BUILD @@ -6,11 +6,12 @@ COMPILATION $ ./dist * Configure - $ ./configure + $ ./configure --prefix=/usr - Note that this being a nautilus extension, the --prefix is not really needed - as there's no real flexibility on where to install them. The appropiate place - will be checked on install time. + Note that this being a nautilus extension, the --prefix is not really used + at installation time as there's no real flexibility on where to install them + (the appropiate place will be checked on install time). BUT it should match + gnome's locale dir. * Compile $ make diff --git a/ChangeLog b/ChangeLog index 61f6624..5b73ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ -Iterim milestones: +Iterim milestones +These private versions, the version numbering bumps just denote +that a development milestone is achieved -0.5.2: +0.6.0: + * Added support for i18n, updated build-dependancies accordingly + +0.5.2 (24 oct 2006): * INTERNAL: Corrected includes and function declarations * INTERNAL: Switched to the autotools build system * BUGFIX: Retrieve libnautilus-extension's directory for installation diff --git a/Makefile.am b/Makefile.am index 1ba208c..f64de7c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,26 @@ -SUBDIRS = src +SUBDIRS = po src # This doesn't work as expected libdir = @libdir@/nautilus/extensions-1.0 + +EXTRA_DIST = dist + +# Extra files to get rid of when distcleaning +DISTCLEANFILES = \ + intltool-extract \ + intltool-merge \ + intltool-update \ + \ + intltool-extract.in \ + intltool-merge.in \ + intltool-update.in \ + \ + libtool \ + libtool.m4 \ + ltmain.sh \ + ltoptions.m4 \ + ltsugar.m4 \ + ltversion.m4 \ + \ + po/Makefile.in.in diff --git a/configure.in b/configure.in index 5d61a8a..526ade1 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ AC_INIT(src/follow-symlink.c) -AM_INIT_AUTOMAKE(libnautilus-follow-symlink, "0.5.2") +AM_INIT_AUTOMAKE(libnautilus-follow-symlink, "0.6.0") AC_CONFIG_HEADER(src/config.h) dnl default FLAGS @@ -16,6 +16,14 @@ AC_PROG_INSTALL AC_LANG_C AC_PROG_CC +# intltool +AC_PROG_INTLTOOL(0.18) +GETTEXT_PACKAGE=nautilus-follow-symlink +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain]) +ALL_LINGUAS="ca es" dnl Implied en +AM_GLIB_GNU_GETTEXT + # string.h and stdlib.h are used dnl defines STDC_HEADERS if ANSI-compliant headers are present AC_HEADER_STDC @@ -35,4 +43,7 @@ dnl Incorporate the result of tests CFLAGS="$CFLAGS $GLIB_CFLAGS $NAUTILUS_EXTENSION_CFLAGS" LIBS="$LIBS $GLIB_LIBS $NAUTILUS_EXTENSION_LIBS" -AC_OUTPUT(Makefile src/Makefile) +AC_OUTPUT([Makefile + src/Makefile + po/Makefile.in +]) diff --git a/debian/changelog b/debian/changelog index 29c7107..3e59688 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +nautilus-follow-symlink (0.6.0-out.1) experimental; urgency=low + + * New upstream release + * debian/control: + - Added intltool and gettext (new requirements of 0.6) + - Corrected Build-Depends + + -- Toni Corvera Tue, 24 Oct 2006 20:25:12 +0200 + nautilus-follow-symlink (0.5.2-out.2) unstable; urgency=low * debian/rules: Install upstream ChangeLog diff --git a/debian/control b/debian/control index 8fb1dd1..9b17c80 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,11 @@ Source: nautilus-follow-symlink Section: contrib/gnome Priority: extra Maintainer: Toni Corvera -Build-Depends: debhelper (>= 4.0.0) +Build-Depends: debhelper (>= 4.0.0), gcc, libtool, pkg-config, libc6-dev, libglib2.0-dev, libnautilus-extension-dev, intltool (>= 0.18), gettext, automaken, autoconf Standards-Version: 3.6.2 Package: nautilus-follow-symlink Architecture: any -Build-Depends: gcc, libtool, pkg-config, libc6-dev, libglib2.0-dev, libnautilus-extension-dev Depends: ${shlibs:Depends}, ${misc:Depends}, nautilus Description: nautilus plugin to open the location pointed by a symlink This extension adds a context menu option to symbolic links to diff --git a/dist b/dist index 25eca32..e3ec2fb 100755 --- a/dist +++ b/dist @@ -10,6 +10,7 @@ dist: gen gen: libtoolize + intltoolize aclocal -I . autoconf autoheader @@ -26,5 +27,10 @@ clean: rm -f config.* depcomp install-sh missing src/config.h src/config.h.in rm -f aclocal.m4 rm -f configure Makefile Makefile.in src/Makefile src/Makefile.in + # The following are moved thanks to Makefile.am (var DISTCLEANFILES) + # (kept for situations in which make distclean fails) # Undo libtoolize rm -f libtool.m4 lt*.m4 ltmain.sh libtool + # Undo intltoolize + rm -f intltool* + rm -f po/Makefile.in.in diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..637ec91 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +src/follow-symlink.c diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 0000000..bfeec2b --- /dev/null +++ b/po/ca.po @@ -0,0 +1,24 @@ +# Catalan translations for libnautilus-follow-symlink package. +# Copyright (C) 2006 THE libnautilus-follow-symlink'S COPYRIGHT HOLDER +# This file is distributed under the same license as the libnautilus-follow-symlink package. +# Toni Corvera , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: libnautilus-follow-symlink\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-10-24 19:07+0200\n" +"PO-Revision-Date: 2006-10-24 19:37+0200\n" +"Last-Translator: Toni Corvera \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/follow-symlink.c:135 +msgid "Follow symbolic _link" +msgstr "Segueix l'en_llaç simbòlic" + +#: ../src/follow-symlink.c:136 +msgid "Open the directory pointed by the currently selected symbolic link" +msgstr "Obre el directori apuntat per l'enllça simbòlic seleccionat" diff --git a/po/es.po b/po/es.po new file mode 100644 index 0000000..33c93dd --- /dev/null +++ b/po/es.po @@ -0,0 +1,26 @@ +# Spanish translations for libnautilus-follow-symlink package +# Traducciones al español para el paquete libnautilus-follow-symlink. +# Copyright (C) 2006 THE libnautilus-follow-symlink'S COPYRIGHT HOLDER +# This file is distributed under the same license as the libnautilus-follow-symlink package. +# Toni Corvera , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: libnautilus-follow-symlink\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-10-24 19:07+0200\n" +"PO-Revision-Date: 2006-10-24 19:09+0200\n" +"Last-Translator: Toni Corvera \n" +"Language-Team: Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../src/follow-symlink.c:135 +msgid "Follow symbolic _link" +msgstr "Seguir en_lace simbólico" + +#: ../src/follow-symlink.c:136 +msgid "Open the directory pointed by the currently selected symbolic link" +msgstr "Abrir el directoro apuntado por el enlace simbólico seleccionado actualmente" diff --git a/po/libnautilus-follow-symlink.pot b/po/libnautilus-follow-symlink.pot new file mode 100644 index 0000000..9e9b33d --- /dev/null +++ b/po/libnautilus-follow-symlink.pot @@ -0,0 +1,25 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-10-24 19:07+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/follow-symlink.c:135 +msgid "Follow symbolic _link" +msgstr "" + +#: ../src/follow-symlink.c:136 +msgid "Open the directory pointed by the currently selected symbolic link" +msgstr "" diff --git a/src/Makefile.am b/src/Makefile.am index ae07a5d..4474a7a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,7 @@ +# Required to correctly install the locale files +CPPFLAGS+=-DGNOMELOCALEDIR=\""$(datadir)/locale"\" + nautilus_extension_lib_LTLIBRARIES = libnautilus-follow-symlink.la # Must be installed in nautilus' extension dir diff --git a/src/common.h b/src/common.h index bc7b1ba..b2f3fe1 100644 --- a/src/common.h +++ b/src/common.h @@ -9,6 +9,9 @@ #include /* g_print() */ #include /* g_printf() */ +#include "libintl.h" +#define _(STR) gettext(STR) + #ifdef HAVE_CONFIG_H #include "config.h" #endif // HAVE_CONFIG_H diff --git a/src/follow-symlink.c b/src/follow-symlink.c index efef0fd..66ffad6 100644 --- a/src/follow-symlink.c +++ b/src/follow-symlink.c @@ -132,8 +132,8 @@ fsl_menu_item_new(GdkScreen *screen, gboolean is_file_item) const char *name; const char *tooltip; - name = "-> Follow symbolic _link"; - tooltip = "Open the directory pointed by the currently selected symbolic link"; + name = _("Follow symbolic _link"); + tooltip = _("Open the directory pointed by the currently selected symbolic link"); // (name, label, tip, icon) ret = nautilus_menu_item_new("FsymlinkExtension::follow_symlink", diff --git a/src/nautilus-ext-follow-symlink.c b/src/nautilus-ext-follow-symlink.c index 16f70e8..a206d13 100644 --- a/src/nautilus-ext-follow-symlink.c +++ b/src/nautilus-ext-follow-symlink.c @@ -1,5 +1,8 @@ #include "nautilus-ext-follow-symlink.h" +#include +#include + #include /* Public interface */ @@ -11,6 +14,10 @@ void nautilus_module_initialize (GTypeModule *module) TRACE(); FSL_DEBUG_INIT(); + setlocale(LC_ALL, ""); + bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR); + textdomain(GETTEXT_PACKAGE); + g_printf("Initializing nautilus-follow-symlink extension (v.%s)\n", VERSION); fsl_register_type(module);