From cd4ea40dc55f99fbebdaf5e93cd550c06ade4270 Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Fri, 16 Nov 2001 11:31:21 +0000 Subject: [PATCH] Mark some strings for translation. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3047 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/directory/directory.c | 71 ++++++++++++++++++++++++----------- po/POTFILES.in | 1 + 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/camlibs/directory/directory.c b/camlibs/directory/directory.c index fef76cded..267549f24 100644 --- a/camlibs/directory/directory.c +++ b/camlibs/directory/directory.c @@ -1,28 +1,55 @@ -/* Notes: - * uses the setting value of "dir_directory" to open as the directory - (interfaces will want to set this when they choose to "open" a - directory.) - * adding filetypes: search for "jpg", copy line and change extension -*/ +/* directory.c + * + * Copyright (C) 2001 Lutz Müller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#include #include #include #include #include -#include + +#include +#include #include -char *extension[] = { - "gif", - "tif", - "jpg", - "xpm", - "png", - "pbm", - "pgm", - "jpeg", - "tiff", - NULL +#ifdef ENABLE_NLS +# include +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + +static const char *extension[] = { + "gif", "tif", "jpg", "xpm", "png", "pbm", "pgm", "jpeg", "tiff", + NULL }; static int @@ -279,8 +306,8 @@ camera_get_config (Camera *camera, CameraWidget **window) char buf[256]; int val; - gp_widget_new (GP_WIDGET_WINDOW, "Directory Browse", window); - gp_widget_new (GP_WIDGET_TOGGLE, "View hidden (dot) directories", + gp_widget_new (GP_WIDGET_WINDOW, _("Directory Browse"), window); + gp_widget_new (GP_WIDGET_TOGGLE, _("View hidden directories"), &widget); gp_setting_get ("directory", "hidden", buf); val = atoi (buf); @@ -306,8 +333,8 @@ camera_set_config (Camera *camera, CameraWidget *window) char buf[256]; int val; - gp_widget_get_child_by_label (window, "View hidden (dot) directories", - &widget); + gp_widget_get_child_by_label (window, _("View hidden directories"), + &widget); if (gp_widget_changed (widget)) { gp_widget_get_value (widget, &val); sprintf (buf, "%i", val); diff --git a/po/POTFILES.in b/po/POTFILES.in index 40da0256e..d049b8dbd 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -3,6 +3,7 @@ camlibs/canon/canon.c camlibs/canon/psa50.c camlibs/digita/digita.c camlibs/dimera/dimera3500.c +camlibs/directory/directory.c camlibs/kodak/dc120/dc120.c camlibs/kodak/dc240/dc240.c camlibs/kodak/dc3200/dc3200.c