Merged revisions 907:999 from gettext branch into trunk

v0.27.3
Andreas Huggel 19 years ago
parent 75085fbe43
commit 04126e8bb8

File diff suppressed because it is too large Load Diff

@ -16,6 +16,7 @@
all install uninstall: config/config.mk all install uninstall: config/config.mk
cd src && $(MAKE) $(MAKECMDGOALS) cd src && $(MAKE) $(MAKECMDGOALS)
cd po && $(MAKE) $(MAKECMDGOALS)
doc: config/config.mk doc: config/config.mk
cd doc && $(MAKE) $(MAKECMDGOALS) cd doc && $(MAKE) $(MAKECMDGOALS)
@ -27,6 +28,7 @@ mostlyclean clean: config/config.mk
cd src && $(MAKE) $(MAKECMDGOALS) cd src && $(MAKE) $(MAKECMDGOALS)
cd doc && $(MAKE) $(MAKECMDGOALS) cd doc && $(MAKE) $(MAKECMDGOALS)
cd config && $(MAKE) $(MAKECMDGOALS) cd config && $(MAKE) $(MAKECMDGOALS)
cd po && $(MAKE) $(MAKECMDGOALS)
# `make distclean' also removes files created by configuring # `make distclean' also removes files created by configuring
# the program. Running `make all distclean' prepares the project # the program. Running `make all distclean' prepares the project

2038
config/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

@ -1,8 +1,11 @@
/* config.h.in. Generated from configure.ac by autoheader. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if translation of program messages to the user's
native language is requested. */
#undef ENABLE_NLS
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems. systems. This function is required for `alloca.c' support on those systems. */
*/
#undef CRAY_STACKSEG_END #undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */ /* Define to 1 if using `alloca.c'. */
@ -128,6 +131,9 @@
/* Define to the address where bug reports for this package should be sent. */ /* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT
/* Define to the name of this package. */
#undef PACKAGE
/* Define to the full name of this package. */ /* Define to the full name of this package. */
#undef PACKAGE_NAME #undef PACKAGE_NAME

@ -51,11 +51,11 @@ endif
CXXCPP = @CXXCPP@ CXXCPP = @CXXCPP@
# Preprocessor flags # Preprocessor flags
CPPFLAGS = -I. @CPPFLAGS@ CPPFLAGS = -I. @CPPFLAGS@ -DEXV_LOCALEDIR=\"$(localedir)\"
# Linker flags and libraries # Linker flags and libraries
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LTLIBINTL@ @LIBS@
# Suffix of executables # Suffix of executables
EXEEXT := @EXEEXT@ EXEEXT := @EXEEXT@
@ -120,6 +120,7 @@ srcdir = @srcdir@
bindir = @bindir@ bindir = @bindir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
datadir = @datadir@ datadir = @datadir@
localedir = $(datadir)/locale
incdir = @includedir@/exiv2 incdir = @includedir@/exiv2
libdir = @libdir@ libdir = @libdir@
mandir = @mandir@ mandir = @mandir@

@ -0,0 +1,571 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2005 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
darwin*)
case "$cc_basename" in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux*)
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
sysv4*MP*)
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if test "$GCC" = yes ; then
:
else
case "$cc_basename" in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | kfreebsd*-gnu | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10* | hpux11*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
;;
aix4* | aix5*)
;;
amigaos*)
;;
beos*)
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
shrext=.dylib
;;
dgux*)
;;
freebsd1*)
;;
kfreebsd*-gnu)
;;
freebsd*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
;;
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux*)
;;
knetbsd*-gnu)
;;
netbsd*)
;;
newsos6)
;;
nto-qnx*)
;;
openbsd*)
;;
os2*)
libname_spec='$name'
shrext=.dll
;;
osf3* | osf4* | osf5*)
;;
sco3.2v5*)
;;
solaris*)
;;
sunos4*)
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
;;
sysv4*MP*)
;;
uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF

@ -3,11 +3,19 @@
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(Exiv2, 0.12, ahuggel@gmx.net) AC_INIT(Exiv2, 0.12, ahuggel@gmx.net)
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_CONFIG_SRCDIR([src/exif.cpp]) AC_CONFIG_SRCDIR([src/exif.cpp])
AC_CONFIG_HEADER([./config/config.h]) AC_CONFIG_HEADER([./config/config.h])
AC_CONFIG_AUX_DIR([./config]) AC_CONFIG_AUX_DIR([./config])
# ---------------------------------------------------------------------------
# Checks for programs. # Checks for programs.
# ---------------------------------------------------------------------------
AC_PROG_CXX AC_PROG_CXX
AC_PROG_CXXCPP AC_PROG_CXXCPP
AC_PROG_CC AC_PROG_CC
@ -17,20 +25,41 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_PROG_RANLIB AC_PROG_RANLIB
# ---------------------------------------------------------------------------
# i18n support
# ---------------------------------------------------------------------------
AM_GNU_GETTEXT([external])
#dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as
#dnl we require make to do insert the proper $(datadir) value
#localedir="\$(datadir)/locale"
#AC_SUBST(localedir)
#AM_CPPFLAGS="$CPPFLAGS"
#AM_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\""
#AC_SUBST(AM_CPPFLAGS)
# ---------------------------------------------------------------------------
# Libtool support # Libtool support
# ---------------------------------------------------------------------------
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
# ---------------------------------------------------------------------------
# Checks for libraries. # Checks for libraries.
# ---------------------------------------------------------------------------
AC_CHECK_LIBM() AC_CHECK_LIBM()
LIBS="$LIBS $LIBM" LIBS="$LIBS $LIBM"
CHECK_ZLIB() CHECK_ZLIB()
AC_SUBST(HAVE_LIBZ,$HAVE_LIBZ) AC_SUBST(HAVE_LIBZ,$HAVE_LIBZ)
# ---------------------------------------------------------------------------
# Checks for header files. # Checks for header files.
# ---------------------------------------------------------------------------
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([libintl.h malloc.h stdint.h stdlib.h string.h unistd.h wchar.h sys/mman.h]) AC_CHECK_HEADERS([libintl.h malloc.h stdint.h stdlib.h string.h unistd.h wchar.h sys/mman.h])
# ---------------------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
# ---------------------------------------------------------------------------
AC_HEADER_STDBOOL AC_HEADER_STDBOOL
AC_C_CONST AC_C_CONST
AC_C_INLINE AC_C_INLINE
@ -38,7 +67,9 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_STRUCT_TM AC_STRUCT_TM
# ---------------------------------------------------------------------------
# Checks for library functions. # Checks for library functions.
# ---------------------------------------------------------------------------
AC_FUNC_ALLOCA AC_FUNC_ALLOCA
AC_FUNC_MALLOC AC_FUNC_MALLOC
AC_FUNC_MEMCMP AC_FUNC_MEMCMP
@ -65,4 +96,5 @@ AC_SUBST(DEP_TRACKING,$DEP_TRACKING)
AC_CONFIG_FILES([./config/config.mk]) AC_CONFIG_FILES([./config/config.mk])
AC_CONFIG_FILES([./config/exiv2-config], [chmod +x ./config/exiv2-config]) AC_CONFIG_FILES([./config/exiv2-config], [chmod +x ./config/exiv2-config])
AC_CONFIG_FILES([./config/exiv2.pc]) AC_CONFIG_FILES([./config/exiv2.pc])
AC_CONFIG_FILES([./po/Makefile.in])
AC_OUTPUT AC_OUTPUT

@ -1,40 +1,150 @@
#! /bin/sh #! /bin/sh
# mkinstalldirs --- make directory hierarchy # mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id$ scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0 errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file for file
do do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` if test -d "$file"; then
shift shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
pathcomp= if test ! -d "$pathcomp"; then
for d echo "mkdir $pathcomp"
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then mkdir "$pathcomp" || lasterr=$?
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then if test ! -z "$lasterr"; then
errstatus=$lasterr errstatus=$lasterr
fi fi
fi fi
fi
fi
pathcomp="$pathcomp/" pathcomp="$pathcomp/"
done done
done done
exit $errstatus exit $errstatus
# mkinstalldirs ends here # Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

@ -14,10 +14,10 @@
</general> </general>
<kdevcustomproject> <kdevcustomproject>
<run> <run>
<mainprogram>src/exiv2</mainprogram> <mainprogram>digikam</mainprogram>
<directoryradio>executable</directoryradio> <directoryradio>custom</directoryradio>
<customdirectory>/</customdirectory> <customdirectory>/usr/bin/</customdirectory>
<programargs>-pi ../test/data/imagemagick.png</programargs> <programargs></programargs>
<terminal>false</terminal> <terminal>false</terminal>
<autocompile>true</autocompile> <autocompile>true</autocompile>
<envvars/> <envvars/>
@ -149,13 +149,14 @@
<tree> <tree>
<hidepatterns>*.o,*.lo,CVS</hidepatterns> <hidepatterns>*.o,*.lo,CVS</hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles> <hidenonprojectfiles>false</hidenonprojectfiles>
<showvcsfields>false</showvcsfields>
</tree> </tree>
</kdevfileview> </kdevfileview>
<kdevdocumentation> <kdevdocumentation>
<projectdoc> <projectdoc>
<docsystem></docsystem> <docsystem/>
<docurl></docurl> <docurl/>
<usermanualurl></usermanualurl> <usermanualurl/>
</projectdoc> </projectdoc>
</kdevdocumentation> </kdevdocumentation>
</kdevelop> </kdevelop>

@ -0,0 +1,12 @@
2006-10-31 gettextize <bug-gnu-gettext@gnu.org>
* Makefile.in.in: New file, from gettext-0.14.6.
* boldquot.sed: New file, from gettext-0.14.6.
* en@boldquot.header: New file, from gettext-0.14.6.
* en@quot.header: New file, from gettext-0.14.6.
* insert-header.sin: New file, from gettext-0.14.6.
* quot.sed: New file, from gettext-0.14.6.
* remove-potcdate.sin: New file, from gettext-0.14.6.
* Rules-quot: New file, from gettext-0.14.6.
* POTFILES.in: New file.

File diff suppressed because it is too large Load Diff

@ -0,0 +1,2 @@
# Set of available languages.
fr de pl es

@ -0,0 +1,384 @@
# Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
# License but which still want to provide support for the GNU gettext
# functionality.
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
# Origin: gettext-0.14.4
PACKAGE = @PACKAGE@
VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
POTFILES = \
CATALOGS = @CATALOGS@
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
.po.mo:
@echo "$(MSGFMT) -c -o $@ $<"; \
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all: all-@USE_NLS@
all-yes: stamp-po
all-no:
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
# we don't want to bother translators with empty POT files). We assume that
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
# In this case, stamp-po is a nop (i.e. a phony target).
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
# been loosely updated. Its purpose is that when a developer or translator
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
# invocations of "make" will do nothing. This timestamp would not be necessary
# if updating the $(CATALOGS) would always touch them; however, the rule for
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
echo "touch stamp-po" && \
echo timestamp > stamp-poT && \
mv stamp-poT stamp-po; \
}
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
else \
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
fi; \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address"
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
}
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
# every "make" invocation, only create it when it is missing.
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
else \
$(MAKE) $${lang}.po-create; \
fi
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
for file in Makevars; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
fi; \
done; \
done
install-strip: install
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
installdirs-data-no:
installdirs-data-yes:
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
fi; \
done; \
done
# Define this as empty until I found a useful application.
installcheck:
uninstall: uninstall-exec uninstall-data
uninstall-exec:
uninstall-data: uninstall-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
for file in $(DISTFILES.common) Makevars.template; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
uninstall-data-no:
uninstall-data-yes:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
done; \
done
check: all
info dvi ps pdf html tags TAGS ctags CTAGS ID:
mostlyclean:
rm -f remove-potcdate.sed
rm -f stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo
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 stamp-po $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
dists="$(DISTFILES)"; \
if test "$(PACKAGE)" = "gettext-tools"; then \
dists="$$dists Makevars.template"; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
dists="$$dists $(DOMAIN).pot stamp-po"; \
fi; \
if test -f $(srcdir)/ChangeLog; then \
dists="$$dists ChangeLog"; \
fi; \
for i in 0 1 2 3 4 5 6 7 8 9; do \
if test -f $(srcdir)/ChangeLog.$$i; then \
dists="$$dists ChangeLog.$$i"; \
fi; \
done; \
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
for file in $$dists; do \
if test -f $$file; then \
cp -p $$file $(distdir) || exit 1; \
else \
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
fi; \
done
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for creating PO files.
.nop.po-create:
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
exit 1
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
$(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
force:
# 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:

@ -0,0 +1,41 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Andreas Huggel
# 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 = ahuggel@gmx.net
# 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 =

@ -0,0 +1,26 @@
# List of source files which contain translatable strings.
# Note: after to have added a new file in this list, please run 'make update-po'.
# Common Library implementation.
src/actions.cpp
src/cr2image.cpp
src/crwimage.cpp
src/datasets.cpp
src/exiv2.cpp
src/error.cpp
src/ifd.cpp
src/tags.cpp
src/tiffimage.cpp
src/tiffvisitor.cpp
# Makernotes parser.
src/canonmn.cpp
src/fujimn.cpp
src/minoltamn.cpp
src/nikonmn.cpp
src/olympusmn.cpp
src/panasonicmn.cpp
src/sigmamn.cpp
src/sonymn.cpp

@ -0,0 +1,47 @@
# Special Makefile rules for English message catalogs with quotation marks.
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
.SUFFIXES: .insert-header .po-update-en
en@quot.po-create:
$(MAKE) en@quot.po-update
en@boldquot.po-create:
$(MAKE) en@boldquot.po-update
en@quot.po-update: en@quot.po-update-en
en@boldquot.po-update: en@boldquot.po-update-en
.insert-header.po-update-en:
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
ll=`echo $$lang | sed -e 's/@.*//'`; \
LC_ALL=C; export LC_ALL; \
cd $(srcdir); \
if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "creation of $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
en@quot.insert-header: insert-header.sin
sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
en@boldquot.insert-header: insert-header.sin
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
mostlyclean: mostlyclean-quot
mostlyclean-quot:
rm -f *.insert-header

@ -0,0 +1,10 @@
s/"\([^"]*\)"/“\1”/g
s/`\([^`']*\)'/\1/g
s/ '\([^`']*\)' / \1 /g
s/ '\([^`']*\)'$/ \1/g
s/^'\([^`']*\)' /\1 /g
s/“”/""/g
s///g
s//”/g
s///g
s///g

9326
po/de.po

File diff suppressed because it is too large Load Diff

@ -0,0 +1,25 @@
# All this catalog "translates" are quotation characters.
# The msgids must be ASCII and therefore cannot contain real quotation
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
# and double quote (0x22). These substitutes look strange; see
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
#
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
# It also translates pairs of apostrophe (0x27) to
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
# and pairs of quotation mark (0x22) to
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
#
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
# When output to an ISO-8859-1 terminal, the single quotation marks are
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
# grave/acute accent (by libiconv), and the double quotation marks are
# transliterated to 0x22.
# When output to an ASCII terminal, the single quotation marks are
# transliterated to apostrophes, and the double quotation marks are
# transliterated to 0x22.
#
# This catalog furthermore displays the text between the quotation marks in
# bold face, assuming the VT100/XTerm escape sequences.
#

@ -0,0 +1,22 @@
# All this catalog "translates" are quotation characters.
# The msgids must be ASCII and therefore cannot contain real quotation
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
# and double quote (0x22). These substitutes look strange; see
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
#
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
# It also translates pairs of apostrophe (0x27) to
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
# and pairs of quotation mark (0x22) to
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
#
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
# When output to an ISO-8859-1 terminal, the single quotation marks are
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
# grave/acute accent (by libiconv), and the double quotation marks are
# transliterated to 0x22.
# When output to an ASCII terminal, the single quotation marks are
# transliterated to apostrophes, and the double quotation marks are
# transliterated to 0x22.
#

9036
po/es.po

File diff suppressed because it is too large Load Diff

8297
po/fr.po

File diff suppressed because it is too large Load Diff

@ -0,0 +1,23 @@
# Sed script that inserts the file called HEADER before the header entry.
#
# At each occurrence of a line starting with "msgid ", we execute the following
# commands. At the first occurrence, insert the file. At the following
# occurrences, do nothing. The distinction between the first and the following
# occurrences is achieved by looking at the hold space.
/^msgid /{
x
# Test if the hold space is empty.
s/m/m/
ta
# Yes it was empty. First occurrence. Read the file.
r HEADER
# Output the file's contents by reading the next line. But don't lose the
# current line while doing this.
g
N
bb
:a
# The hold space was nonempty. Following occurrences. Do nothing.
x
:b
}

9174
po/pl.po

File diff suppressed because it is too large Load Diff

@ -0,0 +1,6 @@
s/"\([^"]*\)"/“\1”/g
s/`\([^`']*\)'/\1/g
s/ '\([^`']*\)' / \1 /g
s/ '\([^`']*\)'$/ \1/g
s/^'\([^`']*\)' /\1 /g
s/“”/""/g

@ -0,0 +1,19 @@
# Sed script that remove the POT-Creation-Date line in the header entry
# from a POT file.
#
# The distinction between the first and the following occurrences of the
# pattern is achieved by looking at the hold space.
/^"POT-Creation-Date: .*"$/{
x
# Test if the hold space is empty.
s/P/P/
ta
# Yes it was empty. First occurrence. Remove the line.
g
d
bb
:a
# The hold space was nonempty. Following occurrences. Do nothing.
x
:b
}

@ -50,6 +50,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "canonmn.hpp" #include "canonmn.hpp"
#include "iptc.hpp" #include "iptc.hpp"
#include "futils.hpp" #include "futils.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -213,8 +214,8 @@ namespace Action {
int Print::printSummary() int Print::printSummary()
{ {
if (!Exiv2::fileExists(path_, true)) { if (!Exiv2::fileExists(path_, true)) {
std::cerr << path_ std::cerr << path_ << ": "
<< ": Failed to open the file\n"; << _("Failed to open the file\n");
return -1; return -1;
} }
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_); Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_);
@ -222,40 +223,40 @@ namespace Action {
image->readMetadata(); image->readMetadata();
Exiv2::ExifData &exifData = image->exifData(); Exiv2::ExifData &exifData = image->exifData();
if (exifData.empty()) { if (exifData.empty()) {
std::cerr << path_ std::cerr << path_ << ": "
<< ": No Exif data found in the file\n"; << _("No Exif data found in the file\n");
return -3; return -3;
} }
align_ = 16; align_ = 16;
// Filename // Filename
printLabel("Filename"); printLabel(_("File name"));
std::cout << path_ << std::endl; std::cout << path_ << std::endl;
// Filesize // Filesize
struct stat buf; struct stat buf;
if (0 == stat(path_.c_str(), &buf)) { if (0 == stat(path_.c_str(), &buf)) {
printLabel("Filesize"); printLabel(_("File size"));
std::cout << buf.st_size << " Bytes" << std::endl; std::cout << buf.st_size << " " << _("Bytes") << std::endl;
} }
// Camera make // Camera make
printTag(exifData, "Exif.Image.Make", "Camera make"); printTag(exifData, "Exif.Image.Make", _("Camera make"));
// Camera model // Camera model
printTag(exifData, "Exif.Image.Model", "Camera model"); printTag(exifData, "Exif.Image.Model", _("Camera model"));
// Image Timestamp // Image Timestamp
printTag(exifData, "Exif.Photo.DateTimeOriginal", "Image timestamp"); printTag(exifData, "Exif.Photo.DateTimeOriginal", _("Image timestamp"));
// Image number // Image number
// Todo: Image number for cameras other than Canon // Todo: Image number for cameras other than Canon
printTag(exifData, "Exif.Canon.ImageNumber", "Image number"); printTag(exifData, "Exif.Canon.ImageNumber", _("Image number"));
// Exposure time // Exposure time
// From ExposureTime, failing that, try ShutterSpeedValue // From ExposureTime, failing that, try ShutterSpeedValue
bool done = false; bool done = false;
printLabel("Exposure time"); printLabel(_("Exposure time"));
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.ExposureTime"); done = 0 != printTag(exifData, "Exif.Photo.ExposureTime");
} }
@ -267,7 +268,7 @@ namespace Action {
// Aperture // Aperture
// Get if from FNumber and, failing that, try ApertureValue // Get if from FNumber and, failing that, try ApertureValue
done = false; done = false;
printLabel("Aperture"); printLabel(_("Aperture"));
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.FNumber"); done = 0 != printTag(exifData, "Exif.Photo.FNumber");
} }
@ -277,15 +278,15 @@ namespace Action {
std::cout << std::endl; std::cout << std::endl;
// Exposure bias // Exposure bias
printTag(exifData, "Exif.Photo.ExposureBiasValue", "Exposure bias"); printTag(exifData, "Exif.Photo.ExposureBiasValue", _("Exposure bias"));
// Flash // Flash
printTag(exifData, "Exif.Photo.Flash", "Flash"); printTag(exifData, "Exif.Photo.Flash", _("Flash"));
// Todo: Flash bias, flash energy // Todo: Flash bias, flash energy
// Todo: Implement this for other cameras // Todo: Implement this for other cameras
done = false; done = false;
printLabel("Flash bias"); printLabel(_("Flash bias"));
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.CanonSi.FlashBias"); done = 0 != printTag(exifData, "Exif.CanonSi.FlashBias");
} }
@ -300,18 +301,18 @@ namespace Action {
// Actual focal length and 35 mm equivalent // Actual focal length and 35 mm equivalent
// Todo: Calculate 35 mm equivalent a la jhead // Todo: Calculate 35 mm equivalent a la jhead
Exiv2::ExifData::const_iterator md; Exiv2::ExifData::const_iterator md;
printLabel("Focal length"); printLabel(_("Focal length"));
if (1 == printTag(exifData, "Exif.Photo.FocalLength")) { if (1 == printTag(exifData, "Exif.Photo.FocalLength")) {
md = exifData.findKey( md = exifData.findKey(
Exiv2::ExifKey("Exif.Photo.FocalLengthIn35mmFilm")); Exiv2::ExifKey("Exif.Photo.FocalLengthIn35mmFilm"));
if (md != exifData.end()) { if (md != exifData.end()) {
std::cout << " (35 mm equivalent: " << *md << ")"; std::cout << " ("<< _("35 mm equivalent") << ": " << *md << ")";
} }
} }
std::cout << std::endl; std::cout << std::endl;
// Subject distance // Subject distance
printLabel("Subject distance"); printLabel(_("Subject distance"));
done = false; done = false;
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.SubjectDistance"); done = 0 != printTag(exifData, "Exif.Photo.SubjectDistance");
@ -323,7 +324,7 @@ namespace Action {
// ISO speed // ISO speed
// from ISOSpeedRatings or the Makernote // from ISOSpeedRatings or the Makernote
printLabel("ISO speed"); printLabel(_("ISO speed"));
done = false; done = false;
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.ISOSpeedRatings"); done = 0 != printTag(exifData, "Exif.Photo.ISOSpeedRatings");
@ -356,7 +357,7 @@ namespace Action {
// Exposure mode // Exposure mode
// From ExposureProgram or Canon Makernote // From ExposureProgram or Canon Makernote
printLabel("Exposure mode"); printLabel(_("Exposure mode"));
done = false; done = false;
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.ExposureProgram"); done = 0 != printTag(exifData, "Exif.Photo.ExposureProgram");
@ -379,11 +380,11 @@ namespace Action {
std::cout << std::endl; std::cout << std::endl;
// Metering mode // Metering mode
printTag(exifData, "Exif.Photo.MeteringMode", "Metering mode"); printTag(exifData, "Exif.Photo.MeteringMode", _("Metering mode"));
// Macro mode // Macro mode
// Todo: Implement this for other cameras // Todo: Implement this for other cameras
printLabel("Macro mode"); printLabel(_("Macro mode"));
done = false; done = false;
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs.Macro"); done = 0 != printTag(exifData, "Exif.CanonCs.Macro");
@ -407,7 +408,7 @@ namespace Action {
// Image quality setting (compression) // Image quality setting (compression)
// Todo: Implement this for other cameras // Todo: Implement this for other cameras
printLabel("Image quality"); printLabel(_("Image quality"));
done = false; done = false;
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs.Quality"); done = 0 != printTag(exifData, "Exif.CanonCs.Quality");
@ -451,7 +452,7 @@ namespace Action {
std::cout << std::endl; std::cout << std::endl;
// Exif Resolution // Exif Resolution
printLabel("Exif Resolution"); printLabel(_("Exif Resolution"));
long xdim = 0; long xdim = 0;
long ydim = 0; long ydim = 0;
md = exifData.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth")); md = exifData.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"));
@ -475,7 +476,7 @@ namespace Action {
// White balance // White balance
// Todo: Implement this for other cameras // Todo: Implement this for other cameras
printLabel("White balance"); printLabel(_("White balance"));
done = false; done = false;
if (!done) { if (!done) {
done = 0 != printTag(exifData, "Exif.CanonSi.WhiteBalance"); done = 0 != printTag(exifData, "Exif.CanonSi.WhiteBalance");
@ -516,23 +517,23 @@ namespace Action {
std::cout << std::endl; std::cout << std::endl;
// Thumbnail // Thumbnail
printLabel("Thumbnail"); printLabel(_("Thumbnail"));
std::string thumbExt = exifData.thumbnailExtension(); std::string thumbExt = exifData.thumbnailExtension();
if (thumbExt.empty()) { if (thumbExt.empty()) {
std::cout << "None"; std::cout << _("None");
} }
else { else {
Exiv2::DataBuf buf = exifData.copyThumbnail(); Exiv2::DataBuf buf = exifData.copyThumbnail();
std::cout << exifData.thumbnailFormat() << ", " std::cout << exifData.thumbnailFormat() << ", "
<< buf.size_ << " Bytes"; << buf.size_ << " " << _("Bytes");
} }
std::cout << std::endl; std::cout << std::endl;
// Copyright // Copyright
printTag(exifData, "Exif.Image.Copyright", "Copyright"); printTag(exifData, "Exif.Image.Copyright", _("Copyright"));
// Exif Comment // Exif Comment
printTag(exifData, "Exif.Photo.UserComment", "Exif comment"); printTag(exifData, "Exif.Photo.UserComment", _("Exif comment"));
std::cout << std::endl; std::cout << std::endl;
return 0; return 0;
@ -570,7 +571,7 @@ namespace Action {
{ {
if (!Exiv2::fileExists(path_, true)) { if (!Exiv2::fileExists(path_, true)) {
std::cerr << path_ std::cerr << path_
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_); Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_);
@ -579,7 +580,7 @@ namespace Action {
Exiv2::ExifData &exifData = image->exifData(); Exiv2::ExifData &exifData = image->exifData();
if (exifData.empty()) { if (exifData.empty()) {
std::cerr << path_ std::cerr << path_
<< ": No Exif data found in the file\n"; << ": " << _("No Exif data found in the file\n");
return -3; return -3;
} }
Exiv2::ExifData::const_iterator md; Exiv2::ExifData::const_iterator md;
@ -651,7 +652,7 @@ namespace Action {
if ( Params::instance().binary_ if ( Params::instance().binary_
&& md->typeId() == Exiv2::undefined && md->typeId() == Exiv2::undefined
&& md->size() > 100) { && md->size() > 100) {
std::cout << "(Binary value suppressed)" << std::endl; std::cout << _("(Binary value suppressed)") << std::endl;
continue; continue;
} }
std::cout << std::dec << md->value(); std::cout << std::dec << md->value();
@ -662,7 +663,7 @@ namespace Action {
if ( Params::instance().binary_ if ( Params::instance().binary_
&& md->typeId() == Exiv2::undefined && md->typeId() == Exiv2::undefined
&& md->size() > 100) { && md->size() > 100) {
std::cout << "(Binary value suppressed)" << std::endl; std::cout << _("(Binary value suppressed)") << std::endl;
continue; continue;
} }
std::cout << std::dec << *md; std::cout << std::dec << *md;
@ -673,7 +674,7 @@ namespace Action {
if ( Params::instance().binary_ if ( Params::instance().binary_
&& md->typeId() == Exiv2::undefined && md->typeId() == Exiv2::undefined
&& md->size() > 100) { && md->size() > 100) {
std::cout << "(Binary value suppressed)" << std::endl; std::cout << _("(Binary value suppressed)") << std::endl;
continue; continue;
} }
Exiv2::DataBuf buf(md->size()); Exiv2::DataBuf buf(md->size());
@ -690,7 +691,7 @@ namespace Action {
{ {
if (!Exiv2::fileExists(path_, true)) { if (!Exiv2::fileExists(path_, true)) {
std::cerr << path_ std::cerr << path_
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_); Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_);
@ -699,7 +700,7 @@ namespace Action {
Exiv2::IptcData &iptcData = image->iptcData(); Exiv2::IptcData &iptcData = image->iptcData();
if (iptcData.empty()) { if (iptcData.empty()) {
std::cerr << path_ std::cerr << path_
<< ": No Iptc data found in the file\n"; << ": " << _("No Iptc data found in the file\n");
return -3; return -3;
} }
Exiv2::IptcData::const_iterator end = iptcData.end(); Exiv2::IptcData::const_iterator end = iptcData.end();
@ -728,14 +729,14 @@ namespace Action {
{ {
if (!Exiv2::fileExists(path_, true)) { if (!Exiv2::fileExists(path_, true)) {
std::cerr << path_ std::cerr << path_
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_); Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_);
assert(image.get() != 0); assert(image.get() != 0);
image->readMetadata(); image->readMetadata();
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Jpeg comment: "; std::cout << _("Jpeg comment") << ": ";
} }
std::cout << image->comment() << std::endl; std::cout << image->comment() << std::endl;
return 0; return 0;
@ -755,7 +756,7 @@ namespace Action {
try { try {
if (!Exiv2::fileExists(path, true)) { if (!Exiv2::fileExists(path, true)) {
std::cerr << path std::cerr << path
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Timestamp ts; Timestamp ts;
@ -768,26 +769,26 @@ namespace Action {
Exiv2::ExifData &exifData = image->exifData(); Exiv2::ExifData &exifData = image->exifData();
if (exifData.empty()) { if (exifData.empty()) {
std::cerr << path std::cerr << path
<< ": No Exif data found in the file\n"; << ": " << _("No Exif data found in the file\n");
return -3; return -3;
} }
Exiv2::ExifKey key("Exif.Photo.DateTimeOriginal"); Exiv2::ExifKey key("Exif.Photo.DateTimeOriginal");
Exiv2::ExifData::iterator md = exifData.findKey(key); Exiv2::ExifData::iterator md = exifData.findKey(key);
if (md == exifData.end()) { if (md == exifData.end()) {
std::cerr << "Metadatum with key `" << key << "' " std::cerr << _("Metadatum with key") << " `" << key << "' "
<< "not found in the file " << path << "\n"; << _("not found in the file") << " " << path << "\n";
return 1; return 1;
} }
std::string v = md->toString(); std::string v = md->toString();
if (v.length() == 0 || v[0] == ' ') { if (v.length() == 0 || v[0] == ' ') {
std::cerr << "Image file creation timestamp not set in the file " std::cerr << _("Image file creation timestamp not set in the file") << " "
<< path << "\n"; << path << "\n";
return 1; return 1;
} }
struct tm tm; struct tm tm;
if (str2Tm(v, &tm) != 0) { if (str2Tm(v, &tm) != 0) {
std::cerr << "Failed to parse timestamp `" << v std::cerr << _("Failed to parse timestamp") << " `" << v
<< "' in the file " << path << "\n"; << "' " << _("in the file") << " " << path << "\n";
return 1; return 1;
} }
if ( Params::instance().timestamp_ if ( Params::instance().timestamp_
@ -798,7 +799,7 @@ namespace Action {
std::string newPath = path; std::string newPath = path;
if (Params::instance().timestampOnly_) { if (Params::instance().timestampOnly_) {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Updating timestamp to " << v << std::endl; std::cout << _("Updating timestamp to") << " " << v << std::endl;
} }
} }
else { else {
@ -836,7 +837,7 @@ namespace Action {
if (!Exiv2::fileExists(path_, true)) { if (!Exiv2::fileExists(path_, true)) {
std::cerr << path_ std::cerr << path_
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Timestamp ts; Timestamp ts;
@ -885,8 +886,8 @@ namespace Action {
} }
long delta = exifData.eraseThumbnail(); long delta = exifData.eraseThumbnail();
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Erasing " << delta std::cout << _("Erasing") << " " << delta
<< " Bytes of thumbnail data" << std::endl; << " " << _("Bytes of thumbnail data") << std::endl;
} }
return 0; return 0;
} }
@ -894,7 +895,7 @@ namespace Action {
int Erase::eraseExifData(Exiv2::Image* image) const int Erase::eraseExifData(Exiv2::Image* image) const
{ {
if (Params::instance().verbose_ && image->exifData().count() > 0) { if (Params::instance().verbose_ && image->exifData().count() > 0) {
std::cout << "Erasing Exif data from the file" << std::endl; std::cout << _("Erasing Exif data from the file") << std::endl;
} }
image->clearExifData(); image->clearExifData();
return 0; return 0;
@ -903,7 +904,7 @@ namespace Action {
int Erase::eraseIptcData(Exiv2::Image* image) const int Erase::eraseIptcData(Exiv2::Image* image) const
{ {
if (Params::instance().verbose_ && image->iptcData().count() > 0) { if (Params::instance().verbose_ && image->iptcData().count() > 0) {
std::cout << "Erasing Iptc data from the file" << std::endl; std::cout << _("Erasing Iptc data from the file") << std::endl;
} }
image->clearIptcData(); image->clearIptcData();
return 0; return 0;
@ -912,7 +913,7 @@ namespace Action {
int Erase::eraseComment(Exiv2::Image* image) const int Erase::eraseComment(Exiv2::Image* image) const
{ {
if (Params::instance().verbose_ && image->comment().size() > 0) { if (Params::instance().verbose_ && image->comment().size() > 0) {
std::cout << "Erasing Jpeg comment from the file" << std::endl; std::cout << _("Erasing Jpeg comment from the file") << std::endl;
} }
image->clearComment(); image->clearComment();
return 0; return 0;
@ -942,7 +943,7 @@ namespace Action {
+ Util::basename(path_, true) + ".exv"; + Util::basename(path_, true) + ".exv";
if (!Params::instance().force_ && Exiv2::fileExists(exvPath)) { if (!Params::instance().force_ && Exiv2::fileExists(exvPath)) {
std::cout << Params::instance().progname() std::cout << Params::instance().progname()
<< ": Overwrite `" << exvPath << "'? "; << ": " << _("Overwrite") << " `" << exvPath << "'? ";
std::string s; std::string s;
std::cin >> s; std::cin >> s;
if (s[0] != 'y' && s[0] != 'Y') return 0; if (s[0] != 'y' && s[0] != 'Y') return 0;
@ -962,7 +963,7 @@ namespace Action {
{ {
if (!Exiv2::fileExists(path_, true)) { if (!Exiv2::fileExists(path_, true)) {
std::cerr << path_ std::cerr << path_
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_); Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path_);
@ -971,7 +972,7 @@ namespace Action {
Exiv2::ExifData &exifData = image->exifData(); Exiv2::ExifData &exifData = image->exifData();
if (exifData.empty()) { if (exifData.empty()) {
std::cerr << path_ std::cerr << path_
<< ": No Exif data found in the file\n"; << ": " << _("No Exif data found in the file\n");
return -3; return -3;
} }
@ -982,26 +983,26 @@ namespace Action {
std::string thumbExt = exifData.thumbnailExtension(); std::string thumbExt = exifData.thumbnailExtension();
int rc = 0; int rc = 0;
if (thumbExt.empty()) { if (thumbExt.empty()) {
std::cerr << path_ << ": Image does not contain an Exif thumbnail\n"; std::cerr << path_ << ": " << _("Image does not contain an Exif thumbnail\n");
} }
else { else {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
Exiv2::DataBuf buf = exifData.copyThumbnail(); Exiv2::DataBuf buf = exifData.copyThumbnail();
std::cout << "Writing " std::cout << _("Writing") << " "
<< exifData.thumbnailFormat() << " thumbnail (" << exifData.thumbnailFormat() << " " << _("thumbnail") << " ("
<< buf.size_ << " Bytes) to file " << buf.size_ << " " << _("Bytes") << ") " << _("to file") << " "
<< thumb << thumbExt << std::endl; << thumb << thumbExt << std::endl;
} }
if (!Params::instance().force_ && Exiv2::fileExists(thumb + thumbExt)) { if (!Params::instance().force_ && Exiv2::fileExists(thumb + thumbExt)) {
std::cout << Params::instance().progname() std::cout << Params::instance().progname()
<< ": Overwrite `" << thumb + thumbExt << "'? "; << ": " << _("Overwrite") << " `" << thumb + thumbExt << "'? ";
std::string s; std::string s;
std::cin >> s; std::cin >> s;
if (s[0] != 'y' && s[0] != 'Y') return 0; if (s[0] != 'y' && s[0] != 'Y') return 0;
} }
rc = exifData.writeThumbnail(thumb); rc = exifData.writeThumbnail(thumb);
if (rc) { if (rc) {
std::cerr << thumb << ": Exif data doesn't contain a thumbnail\n"; std::cerr << thumb << ": " << _("Exif data doesn't contain a thumbnail\n");
} }
} }
return rc; return rc;
@ -1021,7 +1022,7 @@ namespace Action {
try { try {
if (!Exiv2::fileExists(path, true)) { if (!Exiv2::fileExists(path, true)) {
std::cerr << path std::cerr << path
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
int rc = 0; int rc = 0;
@ -1064,12 +1065,12 @@ namespace Action {
+ Util::basename(path, true) + "-thumb.jpg"; + Util::basename(path, true) + "-thumb.jpg";
if (!Exiv2::fileExists(thumbPath, true)) { if (!Exiv2::fileExists(thumbPath, true)) {
std::cerr << thumbPath std::cerr << thumbPath
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
if (!Exiv2::fileExists(path, true)) { if (!Exiv2::fileExists(path, true)) {
std::cerr << path std::cerr << path
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path); Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path);
@ -1097,7 +1098,7 @@ namespace Action {
try { try {
if (!Exiv2::fileExists(path, true)) { if (!Exiv2::fileExists(path, true)) {
std::cerr << path std::cerr << path
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Timestamp ts; Timestamp ts;
@ -1110,7 +1111,7 @@ namespace Action {
if (!Params::instance().jpegComment_.empty()) { if (!Params::instance().jpegComment_.empty()) {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Setting Jpeg comment '" std::cout << _("Setting Jpeg comment") << " '"
<< Params::instance().jpegComment_ << Params::instance().jpegComment_
<< "'" << "'"
<< std::endl; << std::endl;
@ -1158,7 +1159,7 @@ namespace Action {
void Modify::addMetadatum(const ModifyCmd& modifyCmd) void Modify::addMetadatum(const ModifyCmd& modifyCmd)
{ {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Add " << modifyCmd.key_ << " \"" std::cout << _("Add") << " " << modifyCmd.key_ << " \""
<< modifyCmd.value_ << "\" (" << modifyCmd.value_ << "\" ("
<< Exiv2::TypeInfo::typeName(modifyCmd.typeId_) << Exiv2::TypeInfo::typeName(modifyCmd.typeId_)
<< ")" << std::endl; << ")" << std::endl;
@ -1179,7 +1180,7 @@ namespace Action {
void Modify::setMetadatum(const ModifyCmd& modifyCmd) void Modify::setMetadatum(const ModifyCmd& modifyCmd)
{ {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Set " << modifyCmd.key_ << " \"" std::cout << _("Set") << " " << modifyCmd.key_ << " \""
<< modifyCmd.value_ << "\" (" << modifyCmd.value_ << "\" ("
<< Exiv2::TypeInfo::typeName(modifyCmd.typeId_) << Exiv2::TypeInfo::typeName(modifyCmd.typeId_)
<< ")" << std::endl; << ")" << std::endl;
@ -1229,7 +1230,7 @@ namespace Action {
void Modify::delMetadatum(const ModifyCmd& modifyCmd) void Modify::delMetadatum(const ModifyCmd& modifyCmd)
{ {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Del " << modifyCmd.key_ << std::endl; std::cout << _("Del") << " " << modifyCmd.key_ << std::endl;
} }
Exiv2::ExifData &exifData = image_->exifData(); Exiv2::ExifData &exifData = image_->exifData();
@ -1266,7 +1267,7 @@ namespace Action {
if (!Exiv2::fileExists(path, true)) { if (!Exiv2::fileExists(path, true)) {
std::cerr << path std::cerr << path
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Timestamp ts; Timestamp ts;
@ -1279,7 +1280,7 @@ namespace Action {
Exiv2::ExifData &exifData = image->exifData(); Exiv2::ExifData &exifData = image->exifData();
if (exifData.empty()) { if (exifData.empty()) {
std::cerr << path std::cerr << path
<< ": No Exif data found in the file\n"; << ": " << _("No Exif data found in the file\n");
return -3; return -3;
} }
int rc = adjustDateTime(exifData, "Exif.Image.DateTime", path); int rc = adjustDateTime(exifData, "Exif.Image.DateTime", path);
@ -1321,20 +1322,20 @@ namespace Action {
} }
std::string timeStr = md->toString(); std::string timeStr = md->toString();
if (timeStr == "" || timeStr[0] == ' ') { if (timeStr == "" || timeStr[0] == ' ') {
std::cerr << path << ": Timestamp of metadatum with key `" std::cerr << path << ": " << _("Timestamp of metadatum with key") << " `"
<< ek << "' not set\n"; << ek << "' " << _("not set\n");
return 1; return 1;
} }
time_t time = str2Time(timeStr); time_t time = str2Time(timeStr);
if (time == (time_t)-1) { if (time == (time_t)-1) {
std::cerr << path << ": Failed to parse or convert timestamp `" std::cerr << path << ": " << _("Failed to parse or convert timestamp") << " `"
<< timeStr << "'\n"; << timeStr << "'\n";
return 1; return 1;
} }
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Adjusting `" << ek << "' by" std::cout << _("Adjusting") << " `" << ek << "' " << _("by")
<< (adjustment_ < 0 ? " " : " +") << (adjustment_ < 0 ? " " : " +")
<< adjustment_ << " s to "; << adjustment_ << _(" s to ");
} }
time += adjustment_; time += adjustment_;
timeStr = time2Str(time); timeStr = time2Str(time);
@ -1350,7 +1351,7 @@ namespace Action {
try { try {
if (!Exiv2::fileExists(path, true)) { if (!Exiv2::fileExists(path, true)) {
std::cerr << path std::cerr << path
<< ": Failed to open the file\n"; << ": " <<_("Failed to open the file\n");
return -1; return -1;
} }
Timestamp ts; Timestamp ts;
@ -1363,7 +1364,7 @@ namespace Action {
Exiv2::ExifData &exifData = image->exifData(); Exiv2::ExifData &exifData = image->exifData();
if (exifData.empty()) { if (exifData.empty()) {
std::cerr << path std::cerr << path
<< ": No Exif data found in the file\n"; << ": " << _("No Exif data found in the file\n");
return -3; return -3;
} }
Exiv2::ExifKey key("Exif.Nikon3.ISOSpeed"); Exiv2::ExifKey key("Exif.Nikon3.ISOSpeed");
@ -1380,7 +1381,7 @@ namespace Action {
std::ostringstream os; std::ostringstream os;
os << *md; os << *md;
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Setting Exif ISO value to " << os.str() << "\n"; std::cout << _("Setting Exif ISO value to") << " " << os.str() << "\n";
} }
exifData["Exif.Photo.ISOSpeedRatings"] = os.str(); exifData["Exif.Photo.ISOSpeedRatings"] = os.str();
} }
@ -1504,7 +1505,7 @@ namespace {
{ {
if (!Exiv2::fileExists(source, true)) { if (!Exiv2::fileExists(source, true)) {
std::cerr << source std::cerr << source
<< ": Failed to open the file\n"; << ": " << _("Failed to open the file\n");
return -1; return -1;
} }
Exiv2::Image::AutoPtr sourceImage = Exiv2::ImageFactory::open(source); Exiv2::Image::AutoPtr sourceImage = Exiv2::ImageFactory::open(source);
@ -1525,24 +1526,24 @@ namespace {
if ( Params::instance().target_ & Params::ctExif if ( Params::instance().target_ & Params::ctExif
&& !sourceImage->exifData().empty()) { && !sourceImage->exifData().empty()) {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Writing Exif data from " << source std::cout << _("Writing Exif data from") << " " << source
<< " to " << target << std::endl; << " " << _("to") << " " << target << std::endl;
} }
targetImage->setExifData(sourceImage->exifData()); targetImage->setExifData(sourceImage->exifData());
} }
if ( Params::instance().target_ & Params::ctIptc if ( Params::instance().target_ & Params::ctIptc
&& !sourceImage->iptcData().empty()) { && !sourceImage->iptcData().empty()) {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Writing Iptc data from " << source std::cout << _("Writing Iptc data from") << " " << source
<< " to " << target << std::endl; << " " << _("to") << " " << target << std::endl;
} }
targetImage->setIptcData(sourceImage->iptcData()); targetImage->setIptcData(sourceImage->iptcData());
} }
if ( Params::instance().target_ & Params::ctComment if ( Params::instance().target_ & Params::ctComment
&& !sourceImage->comment().empty()) { && !sourceImage->comment().empty()) {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Writing Jpeg comment from " << source std::cout << _("Writing Jpeg comment from") << " " << source
<< " to " << target << std::endl; << " " << _("to") << " " << target << std::endl;
} }
targetImage->setComment(sourceImage->comment()); targetImage->setComment(sourceImage->comment());
} }
@ -1551,7 +1552,7 @@ namespace {
} }
catch (const Exiv2::AnyError& e) { catch (const Exiv2::AnyError& e) {
std::cerr << target << std::cerr << target <<
": Could not write metadata to file: " << e << "\n"; ": " << _("Could not write metadata to file") << ": " << e << "\n";
} }
return 0; return 0;
@ -1569,7 +1570,7 @@ namespace {
char basename[max]; char basename[max];
memset(basename, 0x0, max); memset(basename, 0x0, max);
if (strftime(basename, max, format.c_str(), tm) == 0) { if (strftime(basename, max, format.c_str(), tm) == 0) {
std::cerr << "Filename format yields empty filename for the file " std::cerr << _("Filename format yields empty filename for the file") << " "
<< path << "\n"; << path << "\n";
return 1; return 1;
} }
@ -1578,7 +1579,7 @@ namespace {
if ( Util::dirname(newPath) == Util::dirname(path) if ( Util::dirname(newPath) == Util::dirname(path)
&& Util::basename(newPath) == Util::basename(path)) { && Util::basename(newPath) == Util::basename(path)) {
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "This file already has the correct name" << std::endl; std::cout << _("This file already has the correct name") << std::endl;
} }
return -1; return -1;
} }
@ -1602,8 +1603,9 @@ namespace {
break; break;
case Params::askPolicy: case Params::askPolicy:
std::cout << Params::instance().progname() std::cout << Params::instance().progname()
<< ": File `" << newPath << ": " << _("File") << " `" << newPath
<< "' exists. [O]verwrite, [r]ename or [s]kip? "; << "' " << _("exists. [O]verwrite, [r]ename or [s]kip?")
<< " ";
std::cin >> s; std::cin >> s;
switch (s[0]) { switch (s[0]) {
case 'o': case 'o':
@ -1630,9 +1632,9 @@ namespace {
} }
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << "Renaming file to " << newPath; std::cout << _("Renaming file to") << " " << newPath;
if (Params::instance().timestamp_) { if (Params::instance().timestamp_) {
std::cout << ", updating timestamp"; std::cout << ", " << _("updating timestamp");
} }
std::cout << std::endl; std::cout << std::endl;
} }
@ -1641,8 +1643,8 @@ namespace {
remove(newPath.c_str()); remove(newPath.c_str());
if (std::rename(path.c_str(), newPath.c_str()) == -1) { if (std::rename(path.c_str(), newPath.c_str()) == -1) {
std::cerr << Params::instance().progname() std::cerr << Params::instance().progname()
<< ": Failed to rename " << ": " << _("Failed to rename") << " "
<< path << " to " << newPath << ": " << path << " " << _("to") << " " << newPath << ": "
<< Exiv2::strError() << "\n"; << Exiv2::strError() << "\n";
return 1; return 1;
} }

@ -44,6 +44,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "image.hpp" #include "image.hpp"
#include "error.hpp" #include "error.hpp"
#include "futils.hpp" #include "futils.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <iostream> #include <iostream>
@ -237,12 +238,12 @@ namespace Exiv2 {
void Cr2Header::print(std::ostream& os, const std::string& prefix) const void Cr2Header::print(std::ostream& os, const std::string& prefix) const
{ {
os << prefix os << prefix
<< "Header, offset = 0x" << std::setw(8) << std::setfill('0') << _("Header, offset") << " = 0x" << std::setw(8) << std::setfill('0')
<< std::hex << std::right << offset_; << std::hex << std::right << offset_;
switch (byteOrder_) { switch (byteOrder_) {
case littleEndian: os << ", little endian encoded"; break; case littleEndian: os << ", " << _("little endian encoded"); break;
case bigEndian: os << ", big endian encoded"; break; case bigEndian: os << ", " << _("big endian encoded"); break;
case invalidByteOrder: break; case invalidByteOrder: break;
} }
os << "\n"; os << "\n";

@ -47,6 +47,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "value.hpp" #include "value.hpp"
#include "tags.hpp" #include "tags.hpp"
#include "canonmn.hpp" #include "canonmn.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <iostream> #include <iostream>
@ -638,7 +639,7 @@ namespace Exiv2 {
void CiffHeader::print(std::ostream& os, const std::string& prefix) const void CiffHeader::print(std::ostream& os, const std::string& prefix) const
{ {
os << prefix os << prefix
<< "Header, offset = 0x" << std::setw(8) << std::setfill('0') << _("Header, offset") << " = 0x" << std::setw(8) << std::setfill('0')
<< std::hex << std::right << offset_ << "\n"; << std::hex << std::right << offset_ << "\n";
if (pRootDir_) pRootDir_->print(os, byteOrder_, prefix); if (pRootDir_) pRootDir_->print(os, byteOrder_, prefix);
} // CiffHeader::print } // CiffHeader::print
@ -655,13 +656,13 @@ namespace Exiv2 {
const std::string& prefix) const const std::string& prefix) const
{ {
os << prefix os << prefix
<< "tag = 0x" << std::setw(4) << std::setfill('0') << _("tag") << " = 0x" << std::setw(4) << std::setfill('0')
<< std::hex << std::right << tagId() << std::hex << std::right << tagId()
<< ", dir = 0x" << std::setw(4) << std::setfill('0') << ", " << _("dir") << " = 0x" << std::setw(4) << std::setfill('0')
<< std::hex << std::right << dir() << std::hex << std::right << dir()
<< ", type = " << TypeInfo::typeName(typeId()) << ", " << _("type") << " = " << TypeInfo::typeName(typeId())
<< ", size = " << std::dec << size_ << ", " << _("size") << " = " << std::dec << size_
<< ", offset = " << offset_ << "\n"; << ", " << _("offset") << " = " << offset_ << "\n";
Value::AutoPtr value; Value::AutoPtr value;
if (typeId() != directory) { if (typeId() != directory) {

@ -36,6 +36,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "types.hpp" #include "types.hpp"
#include "value.hpp" #include "value.hpp"
#include "metadatum.hpp" #include "metadatum.hpp"
#include "i18n.h" // NLS support.
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
@ -75,86 +76,86 @@ namespace Exiv2 {
} }
const RecordInfo IptcDataSets::recordInfo_[] = { const RecordInfo IptcDataSets::recordInfo_[] = {
RecordInfo(IptcDataSets::invalidRecord, "(invalid)", "(invalid)"), RecordInfo(IptcDataSets::invalidRecord, "(invalid)", N_("(invalid)")),
RecordInfo(IptcDataSets::envelope, "Envelope", "IIM envelope record"), RecordInfo(IptcDataSets::envelope, "Envelope", N_("IIM envelope record")),
RecordInfo(IptcDataSets::application2, "Application2", "IIM application record 2"), RecordInfo(IptcDataSets::application2, "Application2", N_("IIM application record 2")),
}; };
static const DataSet envelopeRecord[] = { static const DataSet envelopeRecord[] = {
DataSet(IptcDataSets::ModelVersion, "ModelVersion", "ModelVersion", DataSet(IptcDataSets::ModelVersion, "ModelVersion", N_("Model Version"),
"A binary number identifying the version of the Information " N_("A binary number identifying the version of the Information "
"Interchange Model, Part I, utilised by the provider. Version " "Interchange Model, Part I, utilised by the provider. Version "
"numbers are assigned by IPTC and NAA organizations.", "numbers are assigned by IPTC and NAA organizations."),
true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""), true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::Destination, "Destination", "Destination", DataSet(IptcDataSets::Destination, "Destination", N_("Destination"),
"This DataSet is to accommodate some providers who require " N_("This DataSet is to accommodate some providers who require "
"routing information above the appropriate OSI layers.", "routing information above the appropriate OSI layers."),
false, true, 0, 1024, Exiv2::string, IptcDataSets::envelope, ""), false, true, 0, 1024, Exiv2::string, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::FileFormat, "FileFormat", "FileFormat", DataSet(IptcDataSets::FileFormat, "FileFormat", N_("File Format"),
"A binary number representing the file format. The file format " N_("A binary number representing the file format. The file format "
"must be registered with IPTC or NAA with a unique number " "must be registered with IPTC or NAA with a unique number "
"assigned to it. The information is used to route " "assigned to it. The information is used to route "
"the data to the appropriate system and to allow the receiving " "the data to the appropriate system and to allow the receiving "
"system to perform the appropriate actions there to.", "system to perform the appropriate actions there to."),
true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""), true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::FileVersion, "FileVersion", "FileVersion", DataSet(IptcDataSets::FileVersion, "FileVersion", N_("File Version"),
"A binary number representing the particular version of the File " N_("A binary number representing the particular version of the File "
"Format specified by <FileFormat> tag.", "Format specified by <FileFormat> tag."),
true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""), true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::ServiceId, "ServiceId", "ServiceId", DataSet(IptcDataSets::ServiceId, "ServiceId", N_("Service Id"),
"Identifies the provider and product", N_("Identifies the provider and product"),
true, false, 0, 10, Exiv2::string, IptcDataSets::envelope, ""), true, false, 0, 10, Exiv2::string, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::EnvelopeNumber, "EnvelopeNumber", "EnvelopeNumber", DataSet(IptcDataSets::EnvelopeNumber, "EnvelopeNumber", N_("Envelope Number"),
"The characters form a number that will be unique for the date " N_("The characters form a number that will be unique for the date "
"specified in <DateSent> tag and for the Service Identifier " "specified in <DateSent> tag and for the Service Identifier "
"specified by <ServiceIdentifier> tag. " "specified by <ServiceIdentifier> tag. "
"If identical envelope numbers appear with the same date and " "If identical envelope numbers appear with the same date and "
"with the same Service Identifier, records 2-9 must be unchanged " "with the same Service Identifier, records 2-9 must be unchanged "
"from the original. This is not intended to be a sequential serial " "from the original. This is not intended to be a sequential serial "
"number reception check.", "number reception check."),
true, false, 8, 8, Exiv2::string, IptcDataSets::envelope, ""), true, false, 8, 8, Exiv2::string, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::ProductId, "ProductId", "ProductId", DataSet(IptcDataSets::ProductId, "ProductId", N_("Product Id"),
"Allows a provider to identify subsets of its overall service. Used " N_("Allows a provider to identify subsets of its overall service. Used "
"to provide receiving organisation data on which to select, route, " "to provide receiving organisation data on which to select, route, "
"or otherwise handle data.", "or otherwise handle data."),
false, true, 0, 32, Exiv2::string, IptcDataSets::envelope, ""), false, true, 0, 32, Exiv2::string, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::EnvelopePriority, "EnvelopePriority", "EnvelopePriority", DataSet(IptcDataSets::EnvelopePriority, "EnvelopePriority", N_("Envelope Priority"),
"Specifies the envelope handling priority and not the editorial " N_("Specifies the envelope handling priority and not the editorial "
"urgency (see <Urgency> tag). \"1\" indicates the most urgent, \"5\" " "urgency (see <Urgency> tag). \"1\" indicates the most urgent, \"5\" "
"the normal urgency, and \"8\" the least urgent copy. The numeral " "the normal urgency, and \"8\" the least urgent copy. The numeral "
"\"9\" indicates a User Defined Priority. The numeral \"0\" is reserved " "\"9\" indicates a User Defined Priority. The numeral \"0\" is reserved "
"for future use.", "for future use."),
false, false, 1, 1, Exiv2::string, IptcDataSets::envelope, ""), false, false, 1, 1, Exiv2::string, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::DateSent, "DateSent", "DateSent", DataSet(IptcDataSets::DateSent, "DateSent", N_("Date Sent"),
"Uses the format CCYYMMDD (century, year, month, day) as de-fined " N_("Uses the format CCYYMMDD (century, year, month, day) as de-fined "
"in ISO 8601 to indicate year, month and day the service sent the material.", "in ISO 8601 to indicate year, month and day the service sent the material."),
true, false, 8, 8, Exiv2::date, IptcDataSets::envelope, ""), true, false, 8, 8, Exiv2::date, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::TimeSent, "TimeSent", "TimeSent", DataSet(IptcDataSets::TimeSent, "TimeSent", N_("Time Sent"),
"Uses the format HHMMSS±HHMM where HHMMSS refers to " N_("Uses the format HHMMSS:HHMM where HHMMSS refers to "
"local hour, minute and seconds and HHMM refers to hours and " "local hour, minute and seconds and HHMM refers to hours and "
"minutes ahead (+) or behind (-) Universal Coordinated Time as " "minutes ahead (+) or behind (-) Universal Coordinated Time as "
"described in ISO 8601. This is the time the service sent the material.", "described in ISO 8601. This is the time the service sent the material."),
false, false, 11, 11, Exiv2::time, IptcDataSets::envelope, ""), false, false, 11, 11, Exiv2::time, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::CharacterSet, "CharacterSet", "CharacterSet", DataSet(IptcDataSets::CharacterSet, "CharacterSet", N_("Character Set"),
"This tag consisting of one or more control functions used for the announcement, " N_("This tag consisting of one or more control functions used for the announcement, "
"invocation or designation of coded character sets. The control functions follow " "invocation or designation of coded character sets. The control functions follow "
"the ISO 2022 standard and may consist of the escape control " "the ISO 2022 standard and may consist of the escape control "
"character and one or more graphic characters.", "character and one or more graphic characters."),
false, false, 0, 32, Exiv2::undefined, IptcDataSets::envelope, ""), false, false, 0, 32, Exiv2::undefined, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::UNO, "UNO", "UNO", DataSet(IptcDataSets::UNO, "UNO", N_("Unique Name Object"),
"Unique Name of Object, providing eternal, globally unique " N_("This tag provide a globally unique "
"identification for objects as specified in the IIM, independent of " "identification for objects as specified in the IIM, independent of "
"provider and for any media form. The provider must ensure the " "provider and for any media form. The provider must ensure the "
"UNO is unique. Objects with the same UNO are identical.", "UNO is unique. Objects with the same UNO are identical."),
false, false, 14, 80, Exiv2::string, IptcDataSets::envelope, ""), false, false, 14, 80, Exiv2::string, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::ARMId, "ARMId", "ARMId", DataSet(IptcDataSets::ARMId, "ARMId", N_("ARM Identifier"),
"The DataSet identifies the Abstract Relationship Method identifier (ARM) " N_("The DataSet identifies the Abstract Relationship Method identifier (ARM) "
"which is described in a document registered by the originator of " "which is described in a document registered by the originator of "
"the ARM with the IPTC and NAA organizations.", "the ARM with the IPTC and NAA organizations."),
false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""), false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""),
DataSet(IptcDataSets::ARMVersion, "ARMVersion", "ARMVersion", DataSet(IptcDataSets::ARMVersion, "ARMVersion", N_("ARM Version"),
"This tag consisting of a binary number representing the particular " N_("This tag consisting of a binary number representing the particular "
"version of the ARM specified by tag <ARMId>.", "version of the ARM specified by tag <ARMId>."),
false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""), false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::envelope, ""),
DataSet(0xffff, "(Invalid)", "(Invalid)", DataSet(0xffff, "(Invalid)", "(Invalid)",
"(Invalid)", false, false, 0, 0, Exiv2::unsignedShort, IptcDataSets::envelope, "") "(Invalid)", false, false, 0, 0, Exiv2::unsignedShort, IptcDataSets::envelope, "")
@ -166,253 +167,275 @@ namespace Exiv2 {
} }
static const DataSet application2Record[] = { static const DataSet application2Record[] = {
DataSet(IptcDataSets::RecordVersion, "RecordVersion", "RecordVersion", DataSet(IptcDataSets::RecordVersion, "RecordVersion", N_("Record Version"),
"A binary number identifying the version of the Information " N_("A binary number identifying the version of the Information "
"Interchange Model, Part II, utilised by the provider. " "Interchange Model, Part II, utilised by the provider. "
"Version numbers are assigned by IPTC and NAA organizations.", "Version numbers are assigned by IPTC and NAA organizations."),
true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::application2, ""), true, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ObjectType, "ObjectType", "ObjectType", DataSet(IptcDataSets::ObjectType, "ObjectType", N_("Object Type"),
"The Object Type is used to distinguish between different types " N_("The Object Type is used to distinguish between different types "
"of objects within the IIM. The first part is a number representing " "of objects within the IIM. The first part is a number representing "
"a language independent international reference to an Object Type " "a language independent international reference to an Object Type "
"followed by a colon separator. The second part, if used, is a text " "followed by a colon separator. The second part, if used, is a text "
"representation of the Object Type Number consisting of graphic " "representation of the Object Type Number consisting of graphic "
"characters plus spaces either in English or in the language of the " "characters plus spaces either in English or in the language of the "
"service as indicated in tag <LanguageIdentifier>", "service as indicated in tag <LanguageIdentifier>"),
false, false, 3, 67, Exiv2::string, IptcDataSets::application2, ""), false, false, 3, 67, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ObjectAttribute, "ObjectAttribute", "ObjectAttribute", DataSet(IptcDataSets::ObjectAttribute, "ObjectAttribute", N_("Object Attribute"),
"The Object Attribute defines the nature of the object " N_("The Object Attribute defines the nature of the object "
"independent of the Subject. The first part is a number representing " "independent of the Subject. The first part is a number representing "
"a language independent international reference to an Object Attribute " "a language independent international reference to an Object Attribute "
"followed by a colon separator. The second part, if used, is a text " "followed by a colon separator. The second part, if used, is a text "
"representation of the Object Attribute Number consisting of graphic " "representation of the Object Attribute Number consisting of graphic "
"characters plus spaces either in English, or in the language of the " "characters plus spaces either in English, or in the language of the "
"service as indicated in tag <LanguageIdentifier>", "service as indicated in tag <LanguageIdentifier>"),
false, true, 4, 68, Exiv2::string, IptcDataSets::application2, ""), false, true, 4, 68, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ObjectName, "ObjectName", "ObjectName", DataSet(IptcDataSets::ObjectName, "ObjectName", N_("Object Name"),
"Used as a shorthand reference for the object. Changes to exist-ing " N_("Used as a shorthand reference for the object. Changes to exist-ing "
"data, such as updated stories or new crops on photos, should be " "data, such as updated stories or new crops on photos, should be "
"identified in tag <EditStatus>.", "identified in tag <EditStatus>."),
false, false, 0, 64, Exiv2::string, IptcDataSets::application2, "Document title"), false, false, 0, 64, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::EditStatus, "EditStatus", "EditStatus", N_("Document Title")),
"Status of the object data, according to the practice of the provider.", DataSet(IptcDataSets::EditStatus, "EditStatus", N_("Edit Status"),
N_("Status of the object data, according to the practice of the provider."),
false, false, 0, 64, Exiv2::string, IptcDataSets::application2, ""), false, false, 0, 64, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::EditorialUpdate, "EditorialUpdate", "EditorialUpdate", DataSet(IptcDataSets::EditorialUpdate, "EditorialUpdate", N_("Editorial Update"),
"Indicates the type of update that this object provides to a " N_("Indicates the type of update that this object provides to a "
"previous object. The link to the previous object is made using " "previous object. The link to the previous object is made using "
"the tags <ARMIdentifier> and <ARMVersion>, according to the practices of the provider.", "the tags <ARMIdentifier> and <ARMVersion>, according to the practices of the provider."),
false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""), false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Urgency, "Urgency", "Urgency", DataSet(IptcDataSets::Urgency, "Urgency", N_("Urgency"),
"Specifies the editorial urgency of content and not necessarily the " N_("Specifies the editorial urgency of content and not necessarily the "
"envelope handling priority (see tag <EnvelopePriority>). The \"1\" " "envelope handling priority (see tag <EnvelopePriority>). The \"1\" "
"is most urgent, \"5\" normal and \"8\" denotes the least-urgent copy.", "is most urgent, \"5\" normal and \"8\" denotes the least-urgent copy."),
false, false, 1, 1, Exiv2::string, IptcDataSets::application2, "Urgency"), false, false, 1, 1, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::Subject, "Subject", "Subject", N_("Urgency")),
"The Subject Reference is a structured definition of the subject matter.", DataSet(IptcDataSets::Subject, "Subject", N_("Subject"),
N_("The Subject Reference is a structured definition of the subject matter."),
false, true, 13, 236, Exiv2::string, IptcDataSets::application2, ""), false, true, 13, 236, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Category, "Category", "Category", DataSet(IptcDataSets::Category, "Category", N_("Category"),
"Identifies the subject of the object data in the opinion of the provider. " N_("Identifies the subject of the object data in the opinion of the provider. "
"A list of categories will be maintained by a regional registry, " "A list of categories will be maintained by a regional registry, "
"where available, otherwise by the provider.", "where available, otherwise by the provider."),
false, false, 0, 3, Exiv2::string, IptcDataSets::application2, "Category"), false, false, 0, 3, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::SuppCategory, "SuppCategory", "SuppCategory", N_("Category")),
"Supplemental categories further refine the subject of an " DataSet(IptcDataSets::SuppCategory, "SuppCategory", N_("Supplemental Category"),
N_("Supplemental categories further refine the subject of an "
"object data. A supplemental category may include " "object data. A supplemental category may include "
"any of the recognised categories as used in tag <Category>. Otherwise, " "any of the recognised categories as used in tag <Category>. Otherwise, "
"selection of supplemental categories are left to the provider.", "selection of supplemental categories are left to the provider."),
false, true, 0, 32, Exiv2::string, IptcDataSets::application2, "Supplemental Categories"), false, true, 0, 32, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::FixtureId, "FixtureId", "FixtureId", N_("Supplemental Categories")),
"Identifies object data that recurs often and predictably. Enables " DataSet(IptcDataSets::FixtureId, "FixtureId", N_("Fixture Id"),
"users to immediately find or recall such an object.", N_("Identifies object data that recurs often and predictably. Enables "
"users to immediately find or recall such an object."),
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, ""), false, false, 0, 32, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Keywords, "Keywords", "Keywords", DataSet(IptcDataSets::Keywords, "Keywords", N_("Keywords"),
"Used to indicate specific information retrieval words. " N_("Used to indicate specific information retrieval words. "
"It is expected that a provider of various types of data that are related " "It is expected that a provider of various types of data that are related "
"in subject matter uses the same keyword, enabling the receiving system " "in subject matter uses the same keyword, enabling the receiving system "
"or subsystems to search across all types of data for related material.", "or subsystems to search across all types of data for related material."),
false, true, 0, 64, Exiv2::string, IptcDataSets::application2, "Keywords"), false, true, 0, 64, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::LocationCode, "LocationCode", "LocationCode", N_("Keywords")),
"Indicates the code of a country/geographical location referenced " DataSet(IptcDataSets::LocationCode, "LocationCode", N_("Location Code"),
N_("Indicates the code of a country/geographical location referenced "
"by the content of the object. Where ISO has established an appropriate " "by the content of the object. Where ISO has established an appropriate "
"country code under ISO 3166, that code will be used. When ISO 3166 does not " "country code under ISO 3166, that code will be used. When ISO 3166 does not "
"adequately provide for identification of a location or a country, " "adequately provide for identification of a location or a country, "
"e.g. ships at sea, space, IPTC will assign an appropriate three-character " "e.g. ships at sea, space, IPTC will assign an appropriate three-character "
"code under the provisions of ISO 3166 to avoid conflicts.", "code under the provisions of ISO 3166 to avoid conflicts."),
false, true, 3, 3, Exiv2::string, IptcDataSets::application2, ""), false, true, 3, 3, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::LocationName, "LocationName", "LocationName", DataSet(IptcDataSets::LocationName, "LocationName", N_("Location Name"),
"Provides a full, publishable name of a country/geographical " N_("Provides a full, publishable name of a country/geographical "
"location referenced by the content of the object, according to " "location referenced by the content of the object, according to "
"guidelines of the provider.", "guidelines of the provider."),
false, true, 0, 64, Exiv2::string, IptcDataSets::application2, ""), false, true, 0, 64, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ReleaseDate, "ReleaseDate", "ReleaseDate", DataSet(IptcDataSets::ReleaseDate, "ReleaseDate", N_("Release Date"),
"Designates in the form CCYYMMDD the earliest date the " N_("Designates in the form CCYYMMDD the earliest date the "
"provider intends the object to be used. Follows ISO 8601 standard.", "provider intends the object to be used. Follows ISO 8601 standard."),
false, false, 8, 8, Exiv2::date, IptcDataSets::application2, ""), false, false, 8, 8, Exiv2::date, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ReleaseTime, "ReleaseTime", "ReleaseTime", DataSet(IptcDataSets::ReleaseTime, "ReleaseTime", N_("Release Time"),
"Designates in the form HHMMSS±HHMM the earliest time the " N_("Designates in the form HHMMSS:HHMM the earliest time the "
"provider intends the object to be used. Follows ISO 8601 standard.", "provider intends the object to be used. Follows ISO 8601 standard."),
false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""), false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ExpirationDate, "ExpirationDate", "ExpirationDate", DataSet(IptcDataSets::ExpirationDate, "ExpirationDate", N_("Expiration Date"),
"Designates in the form CCYYMMDD the latest date the provider " N_("Designates in the form CCYYMMDD the latest date the provider "
"or owner intends the object data to be used. Follows ISO 8601 standard.", "or owner intends the object data to be used. Follows ISO 8601 standard."),
false, false, 8, 8, Exiv2::date, IptcDataSets::application2, ""), false, false, 8, 8, Exiv2::date, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ExpirationTime, "ExpirationTime", "ExpirationTime", DataSet(IptcDataSets::ExpirationTime, "ExpirationTime", N_("ExpirationTime"),
"Designates in the form HHMMSS±HHMM the latest time the " N_("Designates in the form HHMMSS:HHMM the latest time the "
"provider or owner intends the object data to be used. Follows ISO 8601 standard.", "provider or owner intends the object data to be used. Follows ISO 8601 standard."),
false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""), false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""),
DataSet(IptcDataSets::SpecialInstructions, "SpecialInstructions", "SpecialInstructions", DataSet(IptcDataSets::SpecialInstructions, "SpecialInstructions", N_("Special Instructions"),
"Other editorial instructions concerning the use of the object data, " N_("Other editorial instructions concerning the use of the object data, "
"such as embargoes and warnings.", "such as embargoes and warnings."),
false, false, 0, 256, Exiv2::string, IptcDataSets::application2, "Instructions"), false, false, 0, 256, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::ActionAdvised, "ActionAdvised", "ActionAdvised", N_("Instructions")),
"Indicates the type of action that this object provides to a " DataSet(IptcDataSets::ActionAdvised, "ActionAdvised", N_("Action Advised"),
N_("Indicates the type of action that this object provides to a "
"previous object. The link to the previous object is made using " "previous object. The link to the previous object is made using "
"tags <ARMIdentifier> and <ARMVersion>, according to the practices of the provider.", "tags <ARMIdentifier> and <ARMVersion>, according to the practices of the provider."),
false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""), false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ReferenceService, "ReferenceService", "ReferenceService", DataSet(IptcDataSets::ReferenceService, "ReferenceService", N_("Reference Service"),
"Identifies the Service Identifier of a prior envelope to which the " N_("Identifies the Service Identifier of a prior envelope to which the "
"current object refers.", "current object refers."),
false, true, 0, 10, Exiv2::string, IptcDataSets::application2, ""), false, true, 0, 10, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ReferenceDate, "ReferenceDate", "ReferenceDate", DataSet(IptcDataSets::ReferenceDate, "ReferenceDate", N_("Reference Date"),
"Identifies the date of a prior envelope to which the current object refers.", N_("Identifies the date of a prior envelope to which the current object refers."),
false, true, 8, 8, Exiv2::date, IptcDataSets::application2, ""), false, true, 8, 8, Exiv2::date, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ReferenceNumber, "ReferenceNumber", "ReferenceNumber", DataSet(IptcDataSets::ReferenceNumber, "ReferenceNumber", N_("Reference Number"),
"Identifies the Envelope Number of a prior envelope to which the current object refers.", N_("Identifies the Envelope Number of a prior envelope to which the current object refers."),
false, true, 8, 8, Exiv2::string, IptcDataSets::application2, ""), false, true, 8, 8, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::DateCreated, "DateCreated", "DateCreated", DataSet(IptcDataSets::DateCreated, "DateCreated", N_("Date Created"),
"Represented in the form CCYYMMDD to designate the date the " N_("Represented in the form CCYYMMDD to designate the date the "
"intellectual content of the object data was created rather than the " "intellectual content of the object data was created rather than the "
"date of the creation of the physical representation. Follows ISO 8601 standard.", "date of the creation of the physical representation. Follows ISO 8601 standard."),
false, false, 8, 8, Exiv2::date, IptcDataSets::application2, "Date created"), false, false, 8, 8, Exiv2::date, IptcDataSets::application2,
DataSet(IptcDataSets::TimeCreated, "TimeCreated", "TimeCreated", N_("Date Created")),
"Represented in the form HHMMSS±HHMM to designate the " DataSet(IptcDataSets::TimeCreated, "TimeCreated", N_("Time Created"),
N_("Represented in the form HHMMSS:HHMM to designate the "
"time the intellectual content of the object data current source " "time the intellectual content of the object data current source "
"material was created rather than the creation of the physical " "material was created rather than the creation of the physical "
"representation. Follows ISO 8601 standard.", "representation. Follows ISO 8601 standard."),
false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""), false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""),
DataSet(IptcDataSets::DigitizationDate, "DigitizationDate", "DigitizationDate", DataSet(IptcDataSets::DigitizationDate, "DigitizationDate", N_("Digitization Date"),
"Represented in the form CCYYMMDD to designate the date the " N_("Represented in the form CCYYMMDD to designate the date the "
"digital representation of the object data was created. Follows ISO 8601 standard.", "digital representation of the object data was created. Follows ISO 8601 standard."),
false, false, 8, 8, Exiv2::date, IptcDataSets::application2, ""), false, false, 8, 8, Exiv2::date, IptcDataSets::application2, ""),
DataSet(IptcDataSets::DigitizationTime, "DigitizationTime", "DigitizationTime", DataSet(IptcDataSets::DigitizationTime, "DigitizationTime", N_("Digitization Time"),
"Represented in the form HHMMSS±HHMM to designate the " N_("Represented in the form HHMMSS:HHMM to designate the "
"time the digital representation of the object data was created. " "time the digital representation of the object data was created. "
"Follows ISO 8601 standard.", "Follows ISO 8601 standard."),
false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""), false, false, 11, 11, Exiv2::time, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Program, "Program", "Program", DataSet(IptcDataSets::Program, "Program", N_("Program"),
"Identifies the type of program used to originate the object data.", N_("Identifies the type of program used to originate the object data."),
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, ""), false, false, 0, 32, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ProgramVersion, "ProgramVersion", "ProgramVersion", DataSet(IptcDataSets::ProgramVersion, "ProgramVersion", N_("Program Version"),
"Used to identify the version of the program mentioned in tag <Program>.", N_("Used to identify the version of the program mentioned in tag <Program>."),
false, false, 0, 10, Exiv2::string, IptcDataSets::application2, ""), false, false, 0, 10, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ObjectCycle, "ObjectCycle", "ObjectCycle", DataSet(IptcDataSets::ObjectCycle, "ObjectCycle", N_("Object Cycle"),
"Used to identify the editorial cycle of object data.", N_("Used to identify the editorial cycle of object data."),
false, false, 1, 1, Exiv2::string, IptcDataSets::application2, ""), false, false, 1, 1, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Byline, "Byline", "Byline", DataSet(IptcDataSets::Byline, "Byline", N_("By-line"),
"Contains name of the creator of the object data, e.g. writer, photographer or graphic artist.", N_("Contains name of the creator of the object data, e.g. writer, photographer "
false, true, 0, 32, Exiv2::string, IptcDataSets::application2, "Author"), "or graphic artist."),
DataSet(IptcDataSets::BylineTitle, "BylineTitle", "BylineTitle", false, true, 0, 32, Exiv2::string, IptcDataSets::application2,
"A byline title is the title of the creator or creators of an " N_("Author")),
"object data. Where used, a by-line title should follow the by-line it modifies.", DataSet(IptcDataSets::BylineTitle, "BylineTitle", N_("By-line Title"),
N_("A by-line title is the title of the creator or creators of an "
"object data. Where used, a by-line title should follow the by-line it modifies."),
false, true, 0, 32, Exiv2::string, IptcDataSets::application2, "Authors Position"), false, true, 0, 32, Exiv2::string, IptcDataSets::application2, "Authors Position"),
DataSet(IptcDataSets::City, "City", "City", DataSet(IptcDataSets::City, "City", N_("City"),
"Identifies city of object data origin according to guidelines established by the provider.", N_("Identifies city of object data origin according to guidelines established "
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, "City"), "by the provider."),
DataSet(IptcDataSets::SubLocation, "SubLocation", "SubLocation", false, false, 0, 32, Exiv2::string, IptcDataSets::application2,
"Identifies the location within a city from which the object data " N_("City")),
"originates, according to guidelines established by the provider.", DataSet(IptcDataSets::SubLocation, "SubLocation", N_("Sub Location"),
N_("Identifies the location within a city from which the object data "
"originates, according to guidelines established by the provider."),
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, ""), false, false, 0, 32, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ProvinceState, "ProvinceState", "ProvinceState", DataSet(IptcDataSets::ProvinceState, "ProvinceState", N_("Province State"),
"Identifies Province/State of origin according to guidelines established by the provider.", N_("Identifies Province/State of origin according to guidelines "
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, "State/Province"), "established by the provider."),
DataSet(IptcDataSets::CountryCode, "CountryCode", "CountryCode", false, false, 0, 32, Exiv2::string, IptcDataSets::application2,
"Indicates the code of the country/primary location where the " N_("State/Province")),
DataSet(IptcDataSets::CountryCode, "CountryCode", N_("Country Code"),
N_("Indicates the code of the country/primary location where the "
"intellectual property of the object data was created, e.g. a photo " "intellectual property of the object data was created, e.g. a photo "
"was taken, an event occurred. Where ISO has established an appropriate " "was taken, an event occurred. Where ISO has established an appropriate "
"country code under ISO 3166, that code will be used. When ISO 3166 does not " "country code under ISO 3166, that code will be used. When ISO 3166 does not "
"adequately provide for identification of a location or a new " "adequately provide for identification of a location or a new "
"country, e.g. ships at sea, space, IPTC will assign an " "country, e.g. ships at sea, space, IPTC will assign an "
"appropriate three-character code under the provisions of " "appropriate three-character code under the provisions of "
"ISO 3166 to avoid conflicts.", "ISO 3166 to avoid conflicts."),
false, false, 3, 3, Exiv2::string, IptcDataSets::application2, ""), false, false, 3, 3, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::CountryName, "CountryName", "CountryName", DataSet(IptcDataSets::CountryName, "CountryName", N_("Country Name"),
"Provides full, publishable, name of the country/primary location " N_("Provides full, publishable, name of the country/primary location "
"where the intellectual property of the object data was created, " "where the intellectual property of the object data was created, "
"according to guidelines of the provider.", "according to guidelines of the provider."),
false, false, 0, 64, Exiv2::string, IptcDataSets::application2, "Country"), false, false, 0, 64, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::TransmissionReference, "TransmissionReference", "TransmissionReference", N_("Country")),
"A code representing the location of original transmission according to practices of the provider.", DataSet(IptcDataSets::TransmissionReference, "TransmissionReference", N_("Transmission Reference"),
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, "Transmission Reference"), N_("A code representing the location of original transmission according "
DataSet(IptcDataSets::Headline, "Headline", "Headline", "to practices of the provider."),
"A publishable entry providing a synopsis of the contents of the object data.", false, false, 0, 32, Exiv2::string, IptcDataSets::application2,
false, false, 0, 256, Exiv2::string, IptcDataSets::application2, "Headline"), N_("Transmission Reference")),
DataSet(IptcDataSets::Credit, "Credit", "Credit", DataSet(IptcDataSets::Headline, "Headline", N_("Headline"),
"Identifies the provider of the object data, not necessarily the owner/creator.", N_("A publishable entry providing a synopsis of the contents of the object data."),
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, "Credit"), false, false, 0, 256, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::Source, "Source", "Source", N_("Headline")),
"Identifies the original owner of the intellectual content of the " DataSet(IptcDataSets::Credit, "Credit", N_("Credit"),
"object data. This could be an agency, a member of an agency or an individual.", N_("Identifies the provider of the object data, not necessarily the owner/creator."),
false, false, 0, 32, Exiv2::string, IptcDataSets::application2, "Source"), false, false, 0, 32, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::Copyright, "Copyright", "Copyright", N_("Credit")),
"Contains any necessary copyright notice.", DataSet(IptcDataSets::Source, "Source", N_("Source"),
false, false, 0, 128, Exiv2::string, IptcDataSets::application2, "Copyright notice"), N_("Identifies the original owner of the intellectual content of the "
DataSet(IptcDataSets::Contact, "Contact", "Contact", "object data. This could be an agency, a member of an agency or an individual."),
"Identifies the person or organisation which can provide further " false, false, 0, 32, Exiv2::string, IptcDataSets::application2,
"background information on the object data.", N_("Source")),
DataSet(IptcDataSets::Copyright, "Copyright", N_("Copyright"),
N_("Contains any necessary copyright notice."),
false, false, 0, 128, Exiv2::string, IptcDataSets::application2,
N_("Copyright Notice")),
DataSet(IptcDataSets::Contact, "Contact", N_("Contact"),
N_("Identifies the person or organisation which can provide further "
"background information on the object data."),
false, true, 0, 128, Exiv2::string, IptcDataSets::application2, ""), false, true, 0, 128, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Caption, "Caption", "Caption", DataSet(IptcDataSets::Caption, "Caption", N_("Caption"),
"A textual description of the object data.", N_("A textual description of the object data."),
false, false, 0, 2000, Exiv2::string, IptcDataSets::application2, "Description"), false, false, 0, 2000, Exiv2::string, IptcDataSets::application2,
DataSet(IptcDataSets::Writer, "Writer", "Writer", N_("Description")),
"Identification of the name of the person involved in the writing, " DataSet(IptcDataSets::Writer, "Writer", N_("Writer"),
"editing or correcting the object data or caption/abstract.", N_("Identification of the name of the person involved in the writing, "
"editing or correcting the object data or caption/abstract."),
false, true, 0, 32, Exiv2::string, IptcDataSets::application2, "Description writer"), false, true, 0, 32, Exiv2::string, IptcDataSets::application2, "Description writer"),
DataSet(IptcDataSets::RasterizedCaption, "RasterizedCaption", "RasterizedCaption", DataSet(IptcDataSets::RasterizedCaption, "RasterizedCaption", N_("Rasterized Caption"),
"Contains the rasterized object data description and is used " N_("Contains the rasterized object data description and is used "
"where characters that have not been coded are required for the caption.", "where characters that have not been coded are required for the caption."),
false, false, 7360, 7360, Exiv2::undefined, IptcDataSets::application2, ""), false, false, 7360, 7360, Exiv2::undefined, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ImageType, "ImageType", "ImageType", DataSet(IptcDataSets::ImageType, "ImageType", N_("Image Type"),
"Indicates the color components of an image.", N_("Indicates the color components of an image."),
false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""), false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::ImageOrientation, "ImageOrientation", "ImageOrientation", DataSet(IptcDataSets::ImageOrientation, "ImageOrientation", N_("Image Orientation"),
"Indicates the layout of an image.", N_("Indicates the layout of an image."),
false, false, 1, 1, Exiv2::string, IptcDataSets::application2, ""), false, false, 1, 1, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Language, "Language", "Language", DataSet(IptcDataSets::Language, "Language", N_("Language"),
"Describes the major national language of the object, according " N_("Describes the major national language of the object, according "
"to the 2-letter codes of ISO 639:1988. Does not define or imply " "to the 2-letter codes of ISO 639:1988. Does not define or imply "
"any coded character set, but is used for internal routing, e.g. to " "any coded character set, but is used for internal routing, e.g. to "
"various editorial desks.", "various editorial desks."),
false, false, 2, 3, Exiv2::string, IptcDataSets::application2, ""), false, false, 2, 3, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::AudioType, "AudioType", "AudioType", DataSet(IptcDataSets::AudioType, "AudioType", N_("Audio Type"),
"Indicates the type of an audio content.", N_("Indicates the type of an audio content."),
false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""), false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::AudioRate, "AudioRate", "AudioRate", DataSet(IptcDataSets::AudioRate, "AudioRate", N_("Audio Rate"),
"Indicates the sampling rate in Hertz of an audio content.", N_("Indicates the sampling rate in Hertz of an audio content."),
false, false, 6, 6, Exiv2::string, IptcDataSets::application2, ""), false, false, 6, 6, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::AudioResolution, "AudioResolution", "AudioResolution", DataSet(IptcDataSets::AudioResolution, "AudioResolution", N_("Audio Resolution"),
"Indicates the sampling resolution of an audio content.", N_("Indicates the sampling resolution of an audio content."),
false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""), false, false, 2, 2, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::AudioDuration, "AudioDuration", "AudioDuration", DataSet(IptcDataSets::AudioDuration, "AudioDuration", N_("Audio Duration"),
"Indicates the duration of an audio content.", N_("Indicates the duration of an audio content."),
false, false, 6, 6, Exiv2::string, IptcDataSets::application2, ""), false, false, 6, 6, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::AudioOutcue, "AudioOutcue", "AudioOutcue", DataSet(IptcDataSets::AudioOutcue, "AudioOutcue", N_("Audio Outcue"),
"Identifies the content of the end of an audio object data, " N_("Identifies the content of the end of an audio object data, "
"according to guidelines established by the provider.", "according to guidelines established by the provider."),
false, false, 0, 64, Exiv2::string, IptcDataSets::application2, ""), false, false, 0, 64, Exiv2::string, IptcDataSets::application2, ""),
DataSet(IptcDataSets::PreviewFormat, "PreviewFormat", "PreviewFormat", DataSet(IptcDataSets::PreviewFormat, "PreviewFormat", N_("Preview Format"),
"A binary number representing the file format of the object data " N_("A binary number representing the file format of the object data "
"preview. The file format must be registered with IPTC or NAA organizations " "preview. The file format must be registered with IPTC or NAA organizations "
"with a unique number assigned to it.", "with a unique number assigned to it."),
false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::application2, ""), false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::application2, ""),
DataSet(IptcDataSets::PreviewVersion, "PreviewVersion", "PreviewVersion", DataSet(IptcDataSets::PreviewVersion, "PreviewVersion", N_("Preview Version"),
"A binary number representing the particular version of the " N_("A binary number representing the particular version of the "
"object data preview file format specified in tag <PreviewFormat>.", "object data preview file format specified in tag <PreviewFormat>."),
false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::application2, ""), false, false, 2, 2, Exiv2::unsignedShort, IptcDataSets::application2, ""),
DataSet(IptcDataSets::Preview, "Preview", "Preview", DataSet(IptcDataSets::Preview, "Preview", N_("Preview Data"),
"Binary image preview data.", N_("Binary image preview data."),
false, false, 0, 256000, Exiv2::undefined, IptcDataSets::application2, ""), false, false, 0, 256000, Exiv2::undefined, IptcDataSets::application2, ""),
DataSet(0xffff, "(Invalid)", "(Invalid)", DataSet(0xffff, "(Invalid)", N_("(Invalid)"),
"(Invalid)", false, false, 0, 0, Exiv2::unsignedShort, IptcDataSets::application2, "") N_("(Invalid)"),
false, false, 0, 0, Exiv2::unsignedShort, IptcDataSets::application2, "")
}; };
const DataSet* IptcDataSets::application2RecordList() const DataSet* IptcDataSets::application2RecordList()
@ -420,7 +443,11 @@ namespace Exiv2 {
return application2Record; return application2Record;
} }
static const DataSet unknownDataSet(0xffff, "Unknown dataset", "Unknown dataset", "Unknown dataset", false, true, 0, 0xffffffff, Exiv2::string, IptcDataSets::invalidRecord, "Unknown dataset"); static const DataSet unknownDataSet(0xffff, "Unknown dataset", N_("Unknown dataset"),
N_("Unknown dataset"),
false, true, 0, 0xffffffff, Exiv2::string,
IptcDataSets::invalidRecord,
N_("Unknown dataset"));
// Dataset lookup lists.This is an array with pointers to one list per IIM4 Record. // Dataset lookup lists.This is an array with pointers to one list per IIM4 Record.
// The record id is used as the index into the array. // The record id is used as the index into the array.

@ -31,6 +31,7 @@ EXIV2_RCSID("@(#) $Id$")
// ***************************************************************************** // *****************************************************************************
// included header files // included header files
#include "error.hpp" #include "error.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -40,48 +41,48 @@ EXIV2_RCSID("@(#) $Id$")
namespace Exiv2 { namespace Exiv2 {
const ErrMsg Error::errMsg_[] = { const ErrMsg Error::errMsg_[] = {
ErrMsg( -1, "Error %0: arg1=%1, arg2=%2, arg3=%3."), ErrMsg( -1, N_("Error %0: arg1=%1, arg2=%2, arg3=%3.")),
ErrMsg( 0, "Success"), ErrMsg( 0, N_("Success")),
ErrMsg( 1, "%1"), // %1=error message ErrMsg( 1, "%1"), // %1=error message
ErrMsg( 2, "%1: %2 (%3)"), // %1=path, %2=strerror, %3=function that failed ErrMsg( 2, "%1: %2 (%3)"), // %1=path, %2=strerror, %3=function that failed
ErrMsg( 3, "This does not look like a %1 image"), // %1=Image type ErrMsg( 3, N_("This does not look like a %1 image")), // %1=Image type
ErrMsg( 4, "Invalid dataset name `%1'"), // %1=dataset name ErrMsg( 4, N_("Invalid dataset name `%1'")), // %1=dataset name
ErrMsg( 5, "Invalid record name `%1'"), // %1=record name ErrMsg( 5, N_("Invalid record name `%1'")), // %1=record name
ErrMsg( 6, "Invalid key `%1'"), // %1=key ErrMsg( 6, N_("Invalid key `%1'")), // %1=key
ErrMsg( 7, "Invalid tag name or ifdId `%1', ifdId %2"), // %1=tag name, %2=ifdId ErrMsg( 7, N_("Invalid tag name or ifdId `%1', ifdId %2")), // %1=tag name, %2=ifdId
ErrMsg( 8, "Value not set"), ErrMsg( 8, N_("Value not set")),
ErrMsg( 9, "%1: Failed to open the data source: %2"), // %1=path, %2=strerror ErrMsg( 9, N_("%1: Failed to open the data source: %2")), // %1=path, %2=strerror
ErrMsg( 10, "%1: Failed to open file (%2): %3"), // %1=path, %2=mode, %3=strerror ErrMsg( 10, N_("%1: Failed to open file (%2): %3")), // %1=path, %2=mode, %3=strerror
ErrMsg( 11, "%1: The file contains data of an unknown image type"), // %1=path ErrMsg( 11, N_("%1: The file contains data of an unknown image type")), // %1=path
ErrMsg( 12, "The memory contains data of an unknown image type"), ErrMsg( 12, N_("The memory contains data of an unknown image type")),
ErrMsg( 13, "Image type %1 is not supported"), // %1=image type ErrMsg( 13, N_("Image type %1 is not supported")), // %1=image type
ErrMsg( 14, "Failed to read image data"), ErrMsg( 14, N_("Failed to read image data")),
ErrMsg( 15, "This does not look like a JPEG image"), ErrMsg( 15, N_("This does not look like a JPEG image")),
ErrMsg( 16, "MakerTagInfo registry full"), ErrMsg( 16, N_("MakerTagInfo registry full")),
ErrMsg( 17, "%1: Failed to rename file to %2: %3"), // %1=old path, %2=new path, %3=strerror ErrMsg( 17, N_("%1: Failed to rename file to %2: %3")), // %1=old path, %2=new path, %3=strerror
ErrMsg( 18, "%1: Transfer failed: %2"), // %1=path, %2=strerror ErrMsg( 18, N_("%1: Transfer failed: %2")), // %1=path, %2=strerror
ErrMsg( 19, "Memory transfer failed: %1"), // %1=strerror ErrMsg( 19, N_("Memory transfer failed: %1")), // %1=strerror
ErrMsg( 20, "Failed to read input data"), ErrMsg( 20, N_("Failed to read input data")),
ErrMsg( 21, "Failed to write image"), ErrMsg( 21, N_("Failed to write image")),
ErrMsg( 22, "Input data does not contain a valid image"), ErrMsg( 22, N_("Input data does not contain a valid image")),
ErrMsg( 23, "Failed to create Makernote for ifdId %1"), // %1=ifdId ErrMsg( 23, N_("Failed to create Makernote for ifdId %1")), // %1=ifdId
ErrMsg( 24, "Entry::setValue: Value too large (tag=%1, size=%2, requested=%3)"), // %1=tag, %2=dataSize, %3=required size ErrMsg( 24, N_("Entry::setValue: Value too large (tag=%1, size=%2, requested=%3)")), // %1=tag, %2=dataSize, %3=required size
ErrMsg( 25, "Entry::setDataArea: Value too large (tag=%1, size=%2, requested=%3)"), // %1=tag, %2=dataAreaSize, %3=required size ErrMsg( 25, N_("Entry::setDataArea: Value too large (tag=%1, size=%2, requested=%3)")), // %1=tag, %2=dataAreaSize, %3=required size
ErrMsg( 26, "Offset out of range"), ErrMsg( 26, N_("Offset out of range")),
ErrMsg( 27, "Unsupported data area offset type"), ErrMsg( 27, N_("Unsupported data area offset type")),
ErrMsg( 28, "Invalid charset: `%1'"), // %1=charset name ErrMsg( 28, N_("Invalid charset: `%1'")), // %1=charset name
ErrMsg( 29, "Unsupported date format"), ErrMsg( 29, N_("Unsupported date format")),
ErrMsg( 30, "Unsupported time format"), ErrMsg( 30, N_("Unsupported time format")),
ErrMsg( 31, "%1: CRW images don't support IPTC metadata"), // %1=function ErrMsg( 31, N_("%1: CRW images don't support IPTC metadata")), // %1=function
ErrMsg( 32, "%1: CRW images don't support JPEG comments"), // %1=function ErrMsg( 32, N_("%1: CRW images don't support JPEG comments")), // %1=function
ErrMsg( 33, "This does not look like a CRW image"), ErrMsg( 33, N_("This does not look like a CRW image")),
ErrMsg( 34, "%1: Not supported"), // %1=function ErrMsg( 34, N_("%1: Not supported")), // %1=function
ErrMsg( 35, "ImageFactory registry full"), ErrMsg( 35, N_("ImageFactory registry full")),
ErrMsg( 36, "Failed to decode %1 metadata"), // %1=type of metadata (Exif, IPTC) ErrMsg( 36, N_("Failed to decode %1 metadata")), // %1=type of metadata (Exif, IPTC)
ErrMsg( 37, "Size of %1 JPEG segment is larger than 65535 bytes"), // %1=type of metadata (Exif, IPTC, JPEG comment) ErrMsg( 37, N_("Size of %1 JPEG segment is larger than 65535 bytes")), // %1=type of metadata (Exif, IPTC, JPEG comment)
// Last error message (message is not used) // Last error message (message is not used)
ErrMsg( -2, "(Unknown Error)") ErrMsg( -2, N_("(Unknown Error)"))
}; };
int Error::errorIdx(int code) int Error::errorIdx(int code)
@ -96,7 +97,7 @@ namespace Exiv2 {
std::string Error::what() const std::string Error::what() const
{ {
int idx = errorIdx(code_); int idx = errorIdx(code_);
std::string msg = std::string(errMsg_[idx].message_); std::string msg = std::string(_(errMsg_[idx].message_));
std::string::size_type pos; std::string::size_type pos;
pos = msg.find("%0"); pos = msg.find("%0");
if (pos != std::string::npos) { if (pos != std::string::npos) {

@ -41,6 +41,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "exiv2.hpp" #include "exiv2.hpp"
#include "actions.hpp" #include "actions.hpp"
#include "utils.hpp" #include "utils.hpp"
#include "i18n.h" // NLS support.
#include <string> #include <string>
#include <iostream> #include <iostream>
@ -109,6 +110,11 @@ namespace {
// Main // Main
int main(int argc, char* const argv[]) int main(int argc, char* const argv[])
{ {
// NLS support.
setlocale(LC_ALL, "");
bindtextdomain(EXV_PACKAGE, EXV_LOCALEDIR);
textdomain(EXV_PACKAGE);
// Handle command line arguments // Handle command line arguments
Params& params = Params::instance(); Params& params = Params::instance();
if (params.getopt(argc, argv)) { if (params.getopt(argc, argv)) {
@ -137,7 +143,7 @@ int main(int argc, char* const argv[])
Params::Files::const_iterator e = params.files_.end(); Params::Files::const_iterator e = params.files_.end();
for (Params::Files::const_iterator i = params.files_.begin(); i != e; ++i) { for (Params::Files::const_iterator i = params.files_.begin(); i != e; ++i) {
if (params.verbose_) { if (params.verbose_) {
std::cout << "File " << std::setw(w) << n++ << "/" << s << ": " std::cout << _("File") << " " << std::setw(w) << n++ << "/" << s << ": "
<< *i << std::endl; << *i << std::endl;
} }
task->run(*i); task->run(*i);
@ -170,107 +176,108 @@ void Params::cleanup()
void Params::version(std::ostream& os) const void Params::version(std::ostream& os) const
{ {
os << EXV_PACKAGE_STRING << "\n" os << EXV_PACKAGE_STRING << "\n"
<< "Copyright (C) 2004, 2005, 2006 Andreas Huggel.\n" << _("Copyright (C) 2004, 2005, 2006 Andreas Huggel.\n")
<< "\n" << "\n"
<< "This program is free software; you can redistribute it and/or\n" << _("This program is free software; you can redistribute it and/or\n"
<< "modify it under the terms of the GNU General Public License\n" "modify it under the terms of the GNU General Public License\n"
<< "as published by the Free Software Foundation; either version 2\n" "as published by the Free Software Foundation; either version 2\n"
<< "of the License, or (at your option) any later version.\n" "of the License, or (at your option) any later version.\n")
<< "\n" << "\n"
<< "This program is distributed in the hope that it will be useful,\n" << _("This program is distributed in the hope that it will be useful,\n"
<< "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
<< "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
<< "GNU General Public License for more details.\n" "GNU General Public License for more details.\n")
<< "\n" << "\n"
<< "You should have received a copy of the GNU General Public\n" << _("You should have received a copy of the GNU General Public\n"
<< "License along with this program; if not, write to the Free\n" "License along with this program; if not, write to the Free\n"
<< "Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n" "Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n"
<< "Boston, MA 02110-1301 USA\n"; "Boston, MA 02110-1301 USA\n");
} }
void Params::usage(std::ostream& os) const void Params::usage(std::ostream& os) const
{ {
os << "Usage: " << progname() os << _("Usage:") << " " << progname()
<< " [ options ] [ action ] file ...\n\n" << " " << _("[ options ] [ action ] file ...\n\n")
<< "Manipulate the Exif metadata of images.\n"; << _("Manipulate the Exif metadata of images.\n");
} }
void Params::help(std::ostream& os) const void Params::help(std::ostream& os) const
{ {
usage(os); usage(os);
os << "\nActions:\n" os << _("\nActions:\n")
<< " ad | adjust Adjust Exif timestamps by the given time. This\n" << _(" ad | adjust Adjust Exif timestamps by the given time. This\n"
<< " action requires the option -a time.\n" " action requires the option -a time.\n")
<< " pr | print Print image metadata.\n" << _(" pr | print Print image metadata.\n")
<< " rm | delete Delete image metadata from the files.\n" << _(" rm | delete Delete image metadata from the files.\n")
<< " in | insert Insert metadata from corresponding *.exv files.\n" << _(" in | insert Insert metadata from corresponding *.exv files.\n"
<< " Use option -S to change the suffix of the input files.\n" " Use option -S to change the suffix of the input files.\n")
<< " ex | extract Extract metadata to *.exv and thumbnail image files.\n" << _(" ex | extract Extract metadata to *.exv and thumbnail image files.\n")
<< " mv | rename Rename files and/or set file timestamps according to the\n" << _(" mv | rename Rename files and/or set file timestamps according to the\n"
<< " Exif create timestamp. The filename format can be set with\n" " Exif create timestamp. The filename format can be set with\n"
<< " -r format, timestamp options are controlled with -t and -T.\n" " -r format, timestamp options are controlled with -t and -T.\n")
<< " mo | modify Apply commands to modify (add, set, delete) the Exif and\n" << _(" mo | modify Apply commands to modify (add, set, delete) the Exif and\n"
<< " Iptc metadata of image files or set the Jpeg comment.\n" " Iptc metadata of image files or set the Jpeg comment.\n"
<< " Requires option -c, -m or -M.\n" " Requires option -c, -m or -M.\n")
<< " fi | fixiso Copy ISO setting from the Nikon Makernote to the regular\n" << _(" fi | fixiso Copy ISO setting from the Nikon Makernote to the regular\n"
<< " Exif tag.\n" " Exif tag.\n")
<< "\nOptions:\n" << _("\nOptions:\n")
<< " -h Display this help and exit.\n" << _(" -h Display this help and exit.\n")
<< " -V Show the program version and exit.\n" << _(" -V Show the program version and exit.\n")
<< " -v Be verbose during the program run.\n" << _(" -v Be verbose during the program run.\n")
<< " -b Show large binary values.\n" << _(" -b Show large binary values.\n")
<< " -u Don't show unknown tags.\n" << _(" -u Don't show unknown tags.\n")
<< " -k Preserve file timestamps (keep).\n" << _(" -k Preserve file timestamps (keep).\n")
<< " -t Also set the file timestamp in 'rename' action (overrides -k).\n" << _(" -t Also set the file timestamp in 'rename' action (overrides -k).\n")
<< " -T Only set the file timestamp in 'rename' action, do not rename\n" << _(" -T Only set the file timestamp in 'rename' action, do not rename\n"
<< " the file (overrides -k).\n" " the file (overrides -k).\n")
<< " -f Do not prompt before overwriting existing files (force).\n" << _(" -f Do not prompt before overwriting existing files (force).\n")
<< " -F Do not prompt before renaming files (Force).\n" << _(" -F Do not prompt before renaming files (Force).\n")
<< " -a time Time adjustment in the format [-]HH[:MM[:SS]]. This option\n" << _(" -a time Time adjustment in the format [-]HH[:MM[:SS]]. This option\n"
<< " is only used with the 'adjust' action.\n" " is only used with the 'adjust' action.\n")
<< " -p mode Print mode for the 'print' action. Possible modes are:\n" << _(" -p mode Print mode for the 'print' action. Possible modes are:\n")
<< " s : print a summary of the Exif metadata (the default)\n" << _(" s : print a summary of the Exif metadata (the default)\n")
<< " t : interpreted (translated) Exif data (shortcut for -Pkyct)\n" << _(" t : interpreted (translated) Exif data (shortcut for -Pkyct)\n")
<< " v : plain Exif data values (shortcut for -Pxgnycv)\n" << _(" v : plain Exif data values (shortcut for -Pxgnycv)\n")
<< " h : hexdump of the Exif data (shortcut for -Pxgnycsh)\n" << _(" h : hexdump of the Exif data (shortcut for -Pxgnycsh)\n")
<< " i : Iptc data values\n" << _(" i : Iptc data values\n")
<< " c : Jpeg comment\n" << _(" c : Jpeg comment\n")
<< " -P cols Print columns for the Exif taglist ('print' action). Valid are:\n" << _(" -P cols Print columns for the Exif taglist ('print' action). Valid are:\n")
<< " x : print a column with the tag value\n" << _(" x : print a column with the tag value\n")
<< " g : group name\n" << _(" g : group name\n")
<< " k : key\n" << _(" k : key\n")
<< " l : tag label\n" << _(" l : tag label\n")
<< " n : tag name\n" << _(" n : tag name\n")
<< " y : type\n" << _(" y : type\n")
<< " c : number of components (count)\n" << _(" c : number of components (count)\n")
<< " s : size in bytes\n" << _(" s : size in bytes\n")
<< " v : plain data value\n" << _(" v : plain data value\n")
<< " t : interpreted (translated) data\n" << _(" t : interpreted (translated) data\n")
<< " h : hexdump of the data\n" << _(" h : hexdump of the data\n")
<< " -d tgt Delete target(s) for the 'delete' action. Possible targets are:\n" << _(" -d tgt Delete target(s) for the 'delete' action. Possible targets are:\n")
<< " a : all supported metadata (the default)\n" << _(" a : all supported metadata (the default)\n")
<< " e : Exif section\n" << _(" e : Exif section\n")
<< " t : Exif thumbnail only\n" << _(" t : Exif thumbnail only\n")
<< " i : Iptc data\n" << _(" i : Iptc data\n")
<< " c : Jpeg comment\n" << _(" c : Jpeg comment\n")
<< " -i tgt Insert target(s) for the 'insert' action. Possible targets are\n" << _(" -i tgt Insert target(s) for the 'insert' action. Possible targets are\n"
<< " the same as those for the -d option. Only Jpeg thumbnails can\n" " the same as those for the -d option. Only Jpeg thumbnails can\n"
<< " be inserted, they need to be named <file>-thumb.jpg\n" " be inserted, they need to be named <file>-thumb.jpg\n")
<< " -e tgt Extract target(s) for the 'extract' action. Possible targets\n" << _(" -e tgt Extract target(s) for the 'extract' action. Possible targets\n"
<< " are the same as those for the -d option.\n" " are the same as those for the -d option.\n")
<< " -r fmt Filename format for the 'rename' action. The format string\n" << _(" -r fmt Filename format for the 'rename' action. The format string\n"
<< " follows strftime(3). The following keywords are supported:\n" " follows strftime(3). The following keywords are supported:\n")
<< " :basename: - original filename without extension\n" << _(" :basename: - original filename without extension\n")
<< " :dirname: - name of the directory holding the original file\n" << _(" :dirname: - name of the directory holding the original file\n")
<< " :parentname: - name of parent directory\n" << _(" :parentname: - name of parent directory\n")
<< " Default filename format is " << format_ << ".\n" << _(" Default filename format is ")
<< " -c txt Jpeg comment string to set in the image.\n" << format_ << ".\n"
<< " -m file Command file for the modify action. The format for commands is\n" << _(" -c txt Jpeg comment string to set in the image.\n")
<< " set|add|del <key> [[<type>] <value>].\n" << _(" -m file Command file for the modify action. The format for commands is\n"
<< " -M cmd Command line for the modify action. The format for the\n" " set|add|del <key> [[<type>] <value>].\n")
<< " commands is the same as that of the lines of a command file.\n" << _(" -M cmd Command line for the modify action. The format for the\n"
<< " -l dir Location (directory) for files to be inserted from or extracted to.\n" " commands is the same as that of the lines of a command file.\n")
<< " -S .suf Use suffix .suf for source files for insert command.\n\n"; << _(" -l dir Location (directory) for files to be inserted from or extracted to.\n")
<< _(" -S .suf Use suffix .suf for source files for insert command.\n\n");
} // Params::help } // Params::help
int Params::option(int opt, const std::string& optarg, int optopt) int Params::option(int opt, const std::string& optarg, int optopt)
@ -300,18 +307,18 @@ int Params::option(int opt, const std::string& optarg, int optopt)
case 'l': directory_ = optarg; break; case 'l': directory_ = optarg; break;
case 'S': suffix_ = optarg; break; case 'S': suffix_ = optarg; break;
case ':': case ':':
std::cerr << progname() << ": Option -" << static_cast<char>(optopt) std::cerr << progname() << ": " << _("Option") << " -" << static_cast<char>(optopt)
<< " requires an argument\n"; << " " << _("requires an argument\n");
rc = 1; rc = 1;
break; break;
case '?': case '?':
std::cerr << progname() << ": Unrecognized option -" std::cerr << progname() << ": " << _("Unrecognized option") << " -"
<< static_cast<char>(optopt) << "\n"; << static_cast<char>(optopt) << "\n";
rc = 1; rc = 1;
break; break;
default: default:
std::cerr << progname() std::cerr << progname()
<< ": getopt returned unexpected character code " << ": " << _("getopt returned unexpected character code") << " "
<< std::hex << opt << "\n"; << std::hex << opt << "\n";
rc = 1; rc = 1;
break; break;
@ -334,13 +341,13 @@ int Params::evalRename(int opt, const std::string& optarg)
case Action::rename: case Action::rename:
if (opt == 'r' && !format_.empty()) { if (opt == 'r' && !format_.empty()) {
std::cerr << progname() std::cerr << progname()
<< ": Ignoring surplus option -r \"" << optarg << "\"\n"; << ": " << _("Ignoring surplus option") << " -r \"" << optarg << "\"\n";
} }
break; break;
default: default:
std::cerr << progname() std::cerr << progname()
<< ": Option -" << (char)opt << ": " << _("Option") << " -" << (char)opt
<< " is not compatible with a previous option\n"; << " " << _("is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -355,18 +362,18 @@ int Params::evalAdjust(const std::string& optarg)
action_ = Action::adjust; action_ = Action::adjust;
adjust_ = parseTime(optarg, adjustment_); adjust_ = parseTime(optarg, adjustment_);
if (!adjust_) { if (!adjust_) {
std::cerr << progname() << ": Error parsing -a option argument `" std::cerr << progname() << ": " << _("Error parsing -a option argument") << " `"
<< optarg << "'\n"; << optarg << "'\n";
rc = 1; rc = 1;
} }
break; break;
case Action::adjust: case Action::adjust:
std::cerr << progname() std::cerr << progname()
<< ": Ignoring surplus option -a " << optarg << "\n"; << ": " << _("Ignoring surplus option -a") << " " << optarg << "\n";
break; break;
default: default:
std::cerr << progname() std::cerr << progname()
<< ": Option -a is not compatible with a previous option\n"; << ": " << _("Option -a is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -386,19 +393,19 @@ int Params::evalPrint(const std::string& optarg)
case 'i': printMode_ = pmIptc; break; case 'i': printMode_ = pmIptc; break;
case 'c': printMode_ = pmComment; break; case 'c': printMode_ = pmComment; break;
default: default:
std::cerr << progname() << ": Unrecognized print mode `" std::cerr << progname() << ": " << _("Unrecognized print mode") << " `"
<< optarg << "'\n"; << optarg << "'\n";
rc = 1; rc = 1;
break; break;
} }
break; break;
case Action::print: case Action::print:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Ignoring surplus option -p" << optarg << "\n"; << _("Ignoring surplus option -p") << optarg << "\n";
break; break;
default: default:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Option -p is not compatible with a previous option\n"; << _("Option -p is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -426,7 +433,7 @@ int Params::evalPrintCols(const std::string& optarg)
case 't': printItems_ |= prTrans; break; case 't': printItems_ |= prTrans; break;
case 'h': printItems_ |= prHex; break; case 'h': printItems_ |= prHex; break;
default: default:
std::cerr << progname() << ": Unrecognized print item `" std::cerr << progname() << ": " << _("Unrecognized print item") << " `"
<< optarg[i] << "'\n"; << optarg[i] << "'\n";
rc = 1; rc = 1;
break; break;
@ -434,12 +441,12 @@ int Params::evalPrintCols(const std::string& optarg)
} }
break; break;
case Action::print: case Action::print:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Ignoring surplus option -P" << optarg << "\n"; << _("Ignoring surplus option -P") << optarg << "\n";
break; break;
default: default:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Option -P is not compatible with a previous option\n"; << _("Option -P is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -465,8 +472,8 @@ int Params::evalDelete(const std::string& optarg)
} }
break; break;
default: default:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Option -d is not compatible with a previous option\n"; << _("Option -d is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -492,8 +499,8 @@ int Params::evalExtract(const std::string& optarg)
} }
break; break;
default: default:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Option -e is not compatible with a previous option\n"; << _("Option -e is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -519,8 +526,8 @@ int Params::evalInsert(const std::string& optarg)
} }
break; break;
default: default:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Option -i is not compatible with a previous option\n"; << _("Option -i is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -540,9 +547,9 @@ int Params::evalModify(int opt, const std::string& optarg)
if (opt == 'M') cmdLines_.push_back(optarg); // parse the commands later if (opt == 'M') cmdLines_.push_back(optarg); // parse the commands later
break; break;
default: default:
std::cerr << progname() std::cerr << progname() << ": "
<< ": Option -" << (char)opt << _("Option") << " -" << (char)opt << " "
<< " is not compatible with a previous option\n"; << _("is not compatible with a previous option\n");
rc = 1; rc = 1;
break; break;
} }
@ -558,8 +565,8 @@ int Params::nonoption(const std::string& argv)
first_ = false; first_ = false;
if (argv == "ad" || argv == "adjust") { if (argv == "ad" || argv == "adjust") {
if (action_ != Action::none && action_ != Action::adjust) { if (action_ != Action::none && action_ != Action::adjust) {
std::cerr << progname() << ": Action adjust is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action adjust is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -567,8 +574,8 @@ int Params::nonoption(const std::string& argv)
} }
if (argv == "pr" || argv == "print") { if (argv == "pr" || argv == "print") {
if (action_ != Action::none && action_ != Action::print) { if (action_ != Action::none && action_ != Action::print) {
std::cerr << progname() << ": Action print is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action print is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -576,8 +583,8 @@ int Params::nonoption(const std::string& argv)
} }
if (argv == "rm" || argv == "delete") { if (argv == "rm" || argv == "delete") {
if (action_ != Action::none && action_ != Action::erase) { if (action_ != Action::none && action_ != Action::erase) {
std::cerr << progname() << ": Action delete is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action delete is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -585,8 +592,8 @@ int Params::nonoption(const std::string& argv)
} }
if (argv == "ex" || argv == "extract") { if (argv == "ex" || argv == "extract") {
if (action_ != Action::none && action_ != Action::extract) { if (action_ != Action::none && action_ != Action::extract) {
std::cerr << progname() << ": Action extract is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action extract is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -594,8 +601,8 @@ int Params::nonoption(const std::string& argv)
} }
if (argv == "in" || argv == "insert") { if (argv == "in" || argv == "insert") {
if (action_ != Action::none && action_ != Action::insert) { if (action_ != Action::none && action_ != Action::insert) {
std::cerr << progname() << ": Action insert is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action insert is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -603,8 +610,8 @@ int Params::nonoption(const std::string& argv)
} }
if (argv == "mv" || argv == "rename") { if (argv == "mv" || argv == "rename") {
if (action_ != Action::none && action_ != Action::rename) { if (action_ != Action::none && action_ != Action::rename) {
std::cerr << progname() << ": Action rename is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action rename is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -612,8 +619,8 @@ int Params::nonoption(const std::string& argv)
} }
if (argv == "mo" || argv == "modify") { if (argv == "mo" || argv == "modify") {
if (action_ != Action::none && action_ != Action::modify) { if (action_ != Action::none && action_ != Action::modify) {
std::cerr << progname() << ": Action modify is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action modify is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -621,8 +628,8 @@ int Params::nonoption(const std::string& argv)
} }
if (argv == "fi" || argv == "fixiso") { if (argv == "fi" || argv == "fixiso") {
if (action_ != Action::none && action_ != Action::fixiso) { if (action_ != Action::none && action_ != Action::fixiso) {
std::cerr << progname() << ": Action fixiso is not " std::cerr << progname() << ": "
<< "compatible with the given options\n"; << _("Action fixiso is not compatible with the given options\n");
rc = 1; rc = 1;
} }
action = true; action = true;
@ -646,57 +653,57 @@ int Params::getopt(int argc, char* const argv[])
if (help_ || version_) return 0; if (help_ || version_) return 0;
if (action_ == Action::none) { if (action_ == Action::none) {
// This shouldn't happen since print is taken as default action // This shouldn't happen since print is taken as default action
std::cerr << progname() << ": An action must be specified\n"; std::cerr << progname() << ": " << _("An action must be specified\n");
rc = 1; rc = 1;
} }
if (action_ == Action::adjust && !adjust_) { if (action_ == Action::adjust && !adjust_) {
std::cerr << progname() std::cerr << progname() << ": "
<< ": Adjust action requires option -a time\n"; << _("Adjust action requires option -a time\n");
rc = 1; rc = 1;
} }
if ( action_ == Action::modify if ( action_ == Action::modify
&& cmdFiles_.empty() && cmdLines_.empty() && jpegComment_.empty()) { && cmdFiles_.empty() && cmdLines_.empty() && jpegComment_.empty()) {
std::cerr << progname() std::cerr << progname() << ": "
<< ": Modify action requires at least one -c, -m or -M option\n"; << _("Modify action requires at least one -c, -m or -M option\n");
rc = 1; rc = 1;
} }
if (0 == files_.size()) { if (0 == files_.size()) {
std::cerr << progname() << ": At least one file is required\n"; std::cerr << progname() << ": " << _("At least one file is required\n");
rc = 1; rc = 1;
} }
if (rc == 0 && action_ == Action::modify) { if (rc == 0 && action_ == Action::modify) {
// Parse command files // Parse command files
if (!parseCmdFiles(modifyCmds_, cmdFiles_)) { if (!parseCmdFiles(modifyCmds_, cmdFiles_)) {
std::cerr << progname() << ": Error parsing -m option arguments\n"; std::cerr << progname() << ": " << _("Error parsing -m option arguments\n");
rc = 1; rc = 1;
} }
} }
if (rc ==0 && action_ == Action::modify) { if (rc ==0 && action_ == Action::modify) {
// Parse command lines // Parse command lines
if (!parseCmdLines(modifyCmds_, cmdLines_)) { if (!parseCmdLines(modifyCmds_, cmdLines_)) {
std::cerr << progname() << ": Error parsing -M option arguments\n"; std::cerr << progname() << ": " << _("Error parsing -M option arguments\n");
rc = 1; rc = 1;
} }
} }
if ( !directory_.empty() if ( !directory_.empty()
&& !(action_ == Action::insert || action_ == Action::extract)) { && !(action_ == Action::insert || action_ == Action::extract)) {
std::cerr << progname() std::cerr << progname() << ": "
<< ": -l option can only be used with extract or insert actions\n"; << _("-l option can only be used with extract or insert actions\n");
rc = 1; rc = 1;
} }
if (!suffix_.empty() && !(action_ == Action::insert)) { if (!suffix_.empty() && !(action_ == Action::insert)) {
std::cerr << progname() std::cerr << progname() << ": "
<< ": -S option can only be used with insert action\n"; << _("-S option can only be used with insert action\n");
rc = 1; rc = 1;
} }
if (timestamp_ && !(action_ == Action::rename)) { if (timestamp_ && !(action_ == Action::rename)) {
std::cerr << progname() std::cerr << progname() << ": "
<< ": -t option can only be used with rename action\n"; << _("-t option can only be used with rename action\n");
rc = 1; rc = 1;
} }
if (timestampOnly_ && !(action_ == Action::rename)) { if (timestampOnly_ && !(action_ == Action::rename)) {
std::cerr << progname() std::cerr << progname() << ": "
<< ": -T option can only be used with rename action\n"; << _("-T option can only be used with rename action\n");
rc = 1; rc = 1;
} }
return rc; return rc;
@ -761,8 +768,8 @@ namespace {
| Params::ctIptc | Params::ctIptc
| Params::ctComment; break; | Params::ctComment; break;
default: default:
std::cerr << Params::instance().progname() << ": Unrecognized " std::cerr << Params::instance().progname() << ": " << _("Unrecognized ")
<< action << " target `" << optarg[i] << "'\n"; << action << " " << _("target") << " `" << optarg[i] << "'\n";
rc = -1; rc = -1;
break; break;
} }
@ -779,8 +786,8 @@ namespace {
try { try {
std::ifstream file(filename->c_str()); std::ifstream file(filename->c_str());
if (!file) { if (!file) {
std::cerr << *filename std::cerr << *filename << ": "
<< ": Failed to open command file for reading\n"; << _("Failed to open command file for reading\n");
return false; return false;
} }
int num = 0; int num = 0;
@ -793,7 +800,7 @@ namespace {
} }
} }
catch (const Exiv2::AnyError& error) { catch (const Exiv2::AnyError& error) {
std::cerr << *filename << ", line " << error << "\n"; std::cerr << *filename << ", " << _("line") << " " << error << "\n";
return false; return false;
} }
} }
@ -816,7 +823,7 @@ namespace {
return true; return true;
} }
catch (const Exiv2::AnyError& error) { catch (const Exiv2::AnyError& error) {
std::cerr << "-M option " << error << "\n"; std::cerr << _("-M option") << " " << error << "\n";
return false; return false;
} }
} // parseCmdLines } // parseCmdLines
@ -837,14 +844,14 @@ namespace {
|| cmdEnd == std::string::npos || cmdEnd == std::string::npos
|| keyStart == std::string::npos) { || keyStart == std::string::npos) {
throw Exiv2::Error(1, Exiv2::toString(num) throw Exiv2::Error(1, Exiv2::toString(num)
+ ": Invalid command line"); + ": " + _("Invalid command line"));
} }
std::string cmd(line.substr(cmdStart, cmdEnd-cmdStart)); std::string cmd(line.substr(cmdStart, cmdEnd-cmdStart));
CmdId cmdId = commandId(cmd); CmdId cmdId = commandId(cmd);
if (cmdId == invalidCmdId) { if (cmdId == invalidCmdId) {
throw Exiv2::Error(1, Exiv2::toString(num) throw Exiv2::Error(1, Exiv2::toString(num)
+ ": Invalid command `" + cmd + "'"); + ": " + _("Invalid command") + " `" + cmd + "'");
} }
Exiv2::TypeId defaultType = Exiv2::invalidTypeId; Exiv2::TypeId defaultType = Exiv2::invalidTypeId;
@ -868,7 +875,7 @@ namespace {
} }
if (metadataId == invalidMetadataId) { if (metadataId == invalidMetadataId) {
throw Exiv2::Error(1, Exiv2::toString(num) throw Exiv2::Error(1, Exiv2::toString(num)
+ ": Invalid key `" + key + "'"); + ": " + _("Invalid key") + " `" + key + "'");
} }
std::string value; std::string value;
@ -887,7 +894,7 @@ namespace {
|| typeStart == std::string::npos || typeStart == std::string::npos
|| valStart == std::string::npos) { || valStart == std::string::npos) {
throw Exiv2::Error(1, Exiv2::toString(num) throw Exiv2::Error(1, Exiv2::toString(num)
+ ": Invalid command line "); + ": " + _("Invalid command line") + " " );
} }
if (typeEnd != std::string::npos) { if (typeEnd != std::string::npos) {
@ -897,7 +904,7 @@ namespace {
valStart = line.find_first_not_of(delim, typeEnd+1); valStart = line.find_first_not_of(delim, typeEnd+1);
if (valStart == std::string::npos) { if (valStart == std::string::npos) {
throw Exiv2::Error(1, Exiv2::toString(num) throw Exiv2::Error(1, Exiv2::toString(num)
+ ": Invalid command line "); + ": " + _("Invalid command line") + " " );
} }
type = tmpType; type = tmpType;
explicitType = true; explicitType = true;

@ -22,12 +22,10 @@
File: fujimn.cpp File: fujimn.cpp
Version: $Rev$ Version: $Rev$
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net> Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
Gilles Caulier (gc) <caulier.gilles@kdemail.net>
History: 18-Feb-04, ahu: created History: 18-Feb-04, ahu: created
07-Mar-04, ahu: isolated as a separate component 07-Mar-04, ahu: isolated as a separate component
Credits: Fujifilm MakerNote implemented according to the specification Credits: See header file.
in "Appendix 4: Makernote of Fujifilm" of the document
"Exif file format" by TsuruZoh Tachibanaya
<http://park2.wakwak.com/%7Etsuruzoh/Computer/Digicams/exif-e.html>
*/ */
// ***************************************************************************** // *****************************************************************************
#include "rcsid.hpp" #include "rcsid.hpp"
@ -39,6 +37,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "fujimn.hpp" #include "fujimn.hpp"
#include "makernote.hpp" #include "makernote.hpp"
#include "value.hpp" #include "value.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -63,104 +62,231 @@ namespace Exiv2 {
//! OffOn, multiple tags //! OffOn, multiple tags
extern const TagDetails fujiOffOn[] = { extern const TagDetails fujiOffOn[] = {
{ 0, "Off" }, { 0, N_("Off") },
{ 1, "On" } { 1, N_("On") }
}; };
//! Sharpness, tag 0x1001 //! Sharpness, tag 0x1001
extern const TagDetails fujiSharpness[] = { extern const TagDetails fujiSharpness[] = {
{ 1, "Soft" }, { 1, N_("Soft mode 1") },
{ 2, "Soft" }, { 2, N_("Soft mode 2") },
{ 3, "Normal" }, { 3, N_("Normal") },
{ 4, "Hard" }, { 4, N_("Hard mode 1") },
{ 5, "Hard" } { 5, N_("Hard mode 2") }
}; };
//! WhiteBalance, tag 0x1002 //! WhiteBalance, tag 0x1002
extern const TagDetails fujiWhiteBalance[] = { extern const TagDetails fujiWhiteBalance[] = {
{ 0, "Auto" }, { 0, N_("Auto") },
{ 256, "Daylight" }, { 256, N_("Daylight") },
{ 512, "Cloudy" }, { 512, N_("Cloudy") },
{ 768, "Fluorescent (daylight)" }, { 768, N_("Fluorescent (daylight)") },
{ 769, "Fluorescent (warm white)" }, { 769, N_("Fluorescent (warm white)") },
{ 770, "Fluorescent (cool white)" }, { 770, N_("Fluorescent (cool white)") },
{ 1024, "Incandescent" }, { 1024, N_("Incandescent") },
{ 3480, "Custom" } { 3480, N_("Custom") }
}; };
//! Color, tag 0x1003 //! Color, tag 0x1003
extern const TagDetails fujiColor[] = { extern const TagDetails fujiColor[] = {
{ 0, "Standard" }, { 0, N_("Normal") },
{ 256, "High" }, { 256, N_("High") },
{ 512, "Original" } { 512, N_("Low") },
{ 768, N_("None (black & white)") }
}; };
//! Tone, tag 0x1004 //! Tone, tag 0x1004
extern const TagDetails fujiTone[] = { extern const TagDetails fujiTone[] = {
{ 0, "Standard" }, { 0, N_("Normal") },
{ 256, "Hard" }, { 256, N_("High") },
{ 512, "Original" } { 512, N_("Low") }
}; };
//! FlashMode, tag 0x1010 //! FlashMode, tag 0x1010
extern const TagDetails fujiFlashMode[] = { extern const TagDetails fujiFlashMode[] = {
{ 0, "Auto" }, { 0, N_("Auto") },
{ 1, "On" }, { 1, N_("On") },
{ 2, "Off" }, { 2, N_("Off") },
{ 3, "Red-eye" } { 3, N_("Red-eye reduction") }
}; };
//! FocusMode, tag 0x1021 //! FocusMode, tag 0x1021
extern const TagDetails fujiFocusMode[] = { extern const TagDetails fujiFocusMode[] = {
{ 0, "Auto" }, { 0, N_("Auto") },
{ 1, "Manual" } { 1, N_("Manual") }
}; };
//! PictureMode, tag 0x1031 //! PictureMode, tag 0x1031
extern const TagDetails fujiPictureMode[] = { extern const TagDetails fujiPictureMode[] = {
{ 0, "Auto" }, { 0, N_("Auto") },
{ 1, "Portrait" }, { 1, N_("Portrait") },
{ 2, "Landscape" }, { 2, N_("Landscape") },
{ 4, "Sports" }, { 4, N_("Sports") },
{ 5, "Night" }, { 5, N_("Night scene") },
{ 6, "Program" }, { 6, N_("Program AE") },
{ 256, "Aperture priority" }, { 7, N_("Natural light") },
{ 512, "Shutter priority" }, { 8, N_("Anti-blur") },
{ 768, "Manual" } { 10, N_("Sunset") },
{ 11, N_("Museum") },
{ 12, N_("Party") },
{ 13, N_("Flower") },
{ 14, N_("Text") },
{ 15, N_("Natural light & flash") },
{ 16, N_("Beach") },
{ 17, N_("Snow") },
{ 18, N_("Fireworks") },
{ 19, N_("Underwater") },
{ 256, N_("Aperture-priority AE") },
{ 512, N_("Shutter speed priority AE") },
{ 768, N_("Manual") }
};
//! Continuous, tag 0x1100
extern const TagDetails fujiContinuous[] = {
{ 0, N_("Off") },
{ 1, N_("On") },
{ 2, N_("No flash & flash") }
}; };
//! FinePixColor, tag 0x1210 //! FinePixColor, tag 0x1210
extern const TagDetails fujiFinePixColor[] = { extern const TagDetails fujiFinePixColor[] = {
{ 0, "Normal" }, { 0, N_("Standard") },
{ 16, "Chrome" }, { 16, N_("Chrome") },
{ 48, "B&W" } { 48, N_("Black & white") }
};
//! DynamicRange, tag 0x1400
extern const TagDetails fujiDynamicRange[] = {
{ 1, N_("Standard") },
{ 3, N_("Wide") }
};
//! FilmMode, tag 0x1401
extern const TagDetails fujiFilmMode[] = {
{ 0, N_("F0/Standard") },
{ 256, N_("F1/Studio portrait") },
{ 512, N_("F2/Fujichrome") },
{ 768, N_("F3/Studio portrait Ex") },
{ 1024, N_("F4/Velvia") }
};
//! DynamicRange, tag 0x1402
extern const TagDetails fujiDynamicRangeSetting[] = {
{ 0, N_("Auto (100-400%)") },
{ 1, N_("Raw") },
{ 256, N_("Standard (100%)") },
{ 512, N_("Wide mode 1 (230%)") },
{ 513, N_("Wide mode 2 (400%)") },
{ 32768, N_("Film simulation mode") }
}; };
// Fujifilm MakerNote Tag Info // Fujifilm MakerNote Tag Info
const TagInfo FujiMakerNote::tagInfo_[] = { const TagInfo FujiMakerNote::tagInfo_[] = {
TagInfo(0x0000, "Version", "Version", "Fujifilm Makernote version", fujiIfdId, makerTags, undefined, printValue), TagInfo(0x0000, "Version", N_("Version"),
TagInfo(0x1000, "Quality", "Quality", "Image quality setting", fujiIfdId, makerTags, asciiString, printValue), N_("Fujifilm Makernote version"),
TagInfo(0x1001, "Sharpness", "Sharpness", "Sharpness setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiSharpness)), fujiIfdId, makerTags, undefined, printValue),
TagInfo(0x1002, "WhiteBalance", "WhiteBalance", "White balance setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiWhiteBalance)), TagInfo(0x0010, "SerialNumber", N_("Serial Number"),
TagInfo(0x1003, "Color", "Color", "Chroma saturation setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiColor)), N_("This number is unique, and contains the date of manufacture, "
TagInfo(0x1004, "Tone", "Tone", "Contrast setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiTone)), "but is not the same as the number printed on the camera body."),
TagInfo(0x1010, "FlashMode", "FlashMode", "Flash firing mode setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiFlashMode)), fujiIfdId, makerTags, asciiString, printValue),
TagInfo(0x1011, "FlashStrength", "FlashStrength", "Flash firing strength compensation setting", fujiIfdId, makerTags, signedRational, printValue), TagInfo(0x1000, "Quality", N_("Quality"),
TagInfo(0x1020, "Macro", "Macro", "Macro mode setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)), N_("Image quality setting"),
TagInfo(0x1021, "FocusMode", "FocusMode", "Focusing mode setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiFocusMode)), fujiIfdId, makerTags, asciiString, printValue),
TagInfo(0x1022, "0x1022", "0x1022", "Unknown", fujiIfdId, makerTags, unsignedShort, printValue), TagInfo(0x1001, N_("Sharpness"), N_("Sharpness"),
TagInfo(0x1030, "SlowSync", "SlowSync", "Slow synchro mode setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)), N_("Sharpness setting"),
TagInfo(0x1031, "PictureMode", "PictureMode", "Picture mode setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiPictureMode)), fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiSharpness)),
TagInfo(0x1032, "0x1032", "0x1032", "Unknown", fujiIfdId, makerTags, unsignedShort, printValue), TagInfo(0x1002, "WhiteBalance", N_("White Balance"),
TagInfo(0x1100, "Continuous", "Continuous", "Continuous shooting or auto bracketing setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)), N_("White balance setting"),
TagInfo(0x1101, "0x1101", "0x1101", "Unknown", fujiIfdId, makerTags, unsignedShort, printValue), fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiWhiteBalance)),
TagInfo(0x1200, "0x1200", "0x1200", "Unknown", fujiIfdId, makerTags, unsignedShort, printValue), TagInfo(0x1003, "Color", N_("Color"),
TagInfo(0x1210, "FinePixColor", "FinePixColor", "Fuji FinePix Color setting", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiFinePixColor)), N_("Chroma saturation setting"),
TagInfo(0x1300, "BlurWarning", "BlurWarning", "Blur warning status", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)), fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiColor)),
TagInfo(0x1301, "FocusWarning", "FocusWarning", "Auto Focus warning status", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)), TagInfo(0x1004, "Tone", N_("Tone"),
TagInfo(0x1302, "AeWarning", "AeWarning", "Auto Exposure warning status", fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)), N_("Contrast setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiTone)),
TagInfo(0x1010, "FlashMode", N_("Flash Mode"),
N_("Flash firing mode setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiFlashMode)),
TagInfo(0x1011, "FlashStrength", N_("Flash Strength"),
N_("Flash firing strength compensation setting"),
fujiIfdId, makerTags, signedRational, printValue),
TagInfo(0x1020, "Macro", N_("Macro"),
N_("Macro mode setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)),
TagInfo(0x1021, "FocusMode", N_("Focus Mode"),
N_("Focusing mode setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiFocusMode)),
TagInfo(0x1022, "0x1022", "0x1022",
N_("Unknown"),
fujiIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1030, "SlowSync", N_("Slow Sync"),
N_("Slow synchro mode setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)),
TagInfo(0x1031, "PictureMode", N_("Picture Mode"),
N_("Picture mode setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiPictureMode)),
TagInfo(0x1032, "0x1032", "0x1032",
N_("Unknown"),
fujiIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1100, "Continuous", N_("Continuous"),
N_("Continuous shooting or auto bracketing setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiContinuous)),
TagInfo(0x1101, "SequenceNumber", N_("Sequence Number"),
N_("Sequence number"),
fujiIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1200, "0x1200", "0x1200",
N_("Unknown"),
fujiIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1210, "FinePixColor", N_("FinePix Color"),
N_("Fuji FinePix color setting"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiFinePixColor)),
TagInfo(0x1300, "BlurWarning", N_("Blur Warning"),
N_("Blur warning status"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)),
TagInfo(0x1301, "FocusWarning", N_("Focus Warning"),
N_("Auto Focus warning status"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)),
TagInfo(0x1302, "ExposureWarning", N_("Exposure Warning"),
N_("Auto exposure warning status"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiOffOn)),
TagInfo(0x1400, "DynamicRange", N_("Dynamic Range"),
N_("Dynamic range"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiDynamicRange)),
TagInfo(0x1401, "FilmMode", N_("Film Mode"),
N_("Film mode"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiFilmMode)),
TagInfo(0x1402, "DynamicRangeSetting", N_("Dynamic Range Setting"),
N_("Dynamic range settings"),
fujiIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(fujiDynamicRangeSetting)),
TagInfo(0x1403, "DevelopmentDynamicRange", N_("Development Dynamic Range"),
N_("Development dynamic range"),
fujiIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1404, "MinFocalLength", N_("Minimum Focal Length"),
N_("Minimum focal length"),
fujiIfdId, makerTags, unsignedRational, printValue),
TagInfo(0x1405, "MaxFocalLength", N_("Maximum Focal Length"),
N_("Maximum focal length"),
fujiIfdId, makerTags, unsignedRational, printValue),
TagInfo(0x1406, "MaxApertureAtMinFocal", N_("Maximum Aperture at Mininimum Focal"),
N_("Maximum aperture at mininimum focal"),
fujiIfdId, makerTags, unsignedRational, printValue),
TagInfo(0x1407, "MaxApertureAtMaxFocal", N_("Maximum Aperture at Maxinimum Focal"),
N_("Maximum aperture at maxinimum focal"),
fujiIfdId, makerTags, unsignedRational, printValue),
TagInfo(0x8000, "FileSource", N_("File Source"),
N_("File source"),
fujiIfdId, makerTags, asciiString, printValue),
TagInfo(0x8002, "OrderNumber", N_("Order Number"),
N_("Order number"),
fujiIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x8003, "FrameNumber", N_("Frame Number"),
N_("Frame number"),
fujiIfdId, makerTags, unsignedShort, printValue),
// End of list marker // End of list marker
TagInfo(0xffff, "(UnknownFujiMakerNoteTag)", "(UnknownFujiMakerNoteTag)", "Unknown FujiMakerNote tag", fujiIfdId, makerTags, invalidTypeId, printValue) TagInfo(0xffff, "(UnknownFujiMakerNoteTag)", "(UnknownFujiMakerNoteTag)",
N_("Unknown FujiMakerNote tag"),
fujiIfdId, makerTags, invalidTypeId, printValue)
}; };
const TagInfo* FujiMakerNote::tagList() const TagInfo* FujiMakerNote::tagList()

@ -23,10 +23,13 @@
@brief Fujifilm MakerNote implemented according to the specification @brief Fujifilm MakerNote implemented according to the specification
in Appendix 4: Makernote of Fujifilm of the document in Appendix 4: Makernote of Fujifilm of the document
<a href="http://park2.wakwak.com/%7Etsuruzoh/Computer/Digicams/exif-e.html"> <a href="http://park2.wakwak.com/%7Etsuruzoh/Computer/Digicams/exif-e.html">
Exif file format</a> by TsuruZoh Tachibanaya Exif file format</a> by TsuruZoh Tachibanaya<br>
<a href="http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Fuji.html">Fuji Makernote list</a> by Phil Harvey<br>
@version $Rev$ @version $Rev$
@author Andreas Huggel (ahu) @author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@author Gilles Caulier (gc)
<a href="mailto:caulier dot gilles at kdemail dot net">caulier dot gilles at kdemail dot net</a>
@date 11-Feb-04, ahu: created @date 11-Feb-04, ahu: created
*/ */
#ifndef FUJIMN_HPP_ #ifndef FUJIMN_HPP_

@ -0,0 +1,79 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if EXV_ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
#else
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
chokes if dcgettext is defined as a macro. So include it now, to make
later inclusions of <locale.h> a NOP. We don't include <libintl.h>
as well because people using "gettext.h" will not include <libintl.h>,
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
is OK. */
#if defined(__sun)
# include <locale.h>
#endif
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
<libintl.h>, which chokes if dcgettext is defined as a macro. So include
it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
# include <cstdlib>
# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
# include <libintl.h>
# endif
#endif
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
# define gettext(Msgid) ((const char *) (Msgid))
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define textdomain(Domainname) ((const char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
#endif
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
The argument, String, should be a literal string. Concatenated strings
and other string expressions won't work.
The macro's expansion is not parenthesized, so that it is suitable as
initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
#endif /* _LIBGETTEXT_H */

@ -0,0 +1,55 @@
/* **************************************************************** -*- C -*- */
/*
* Copyright (C) 2006 Andreas Huggel <ahuggel@gmx.net>
*
* This program is part of the Exiv2 distribution.
*
* 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
* of the License, 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., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
/*
File: i18n.h
Brief: i18n definitions. Do not use. This is an Exiv2 internal header.
Version: $Rev$
Author(s): Gilles Caulier (gc) <caulier.gilles@kdemail.net>
History: 01-Nov-06, gc: created
*/
#ifndef I18N_H_
#define I18N_H_
#ifdef _MSC_VER
# include "exv_msvc.h"
#else
# include "exv_conf.h"
#endif
/* Includes <libintl.h> and provides most of the defines */
#include "gettext.h"
#ifdef EXV_ENABLE_NLS
// Definition is in types.cpp
const char* _exvGettext(const char* str);
# define _(String) _exvGettext(String)
# define N_(String) gettext_noop(String)
#else /* NLS is disabled */
# define _(String) (String)
# define N_(String) String
#endif /* EXV_ENABLE_NLS */
#endif /* I18N_H_ */

@ -34,7 +34,8 @@ EXIV2_RCSID("@(#) $Id$")
#include "ifd.hpp" #include "ifd.hpp"
#include "types.hpp" #include "types.hpp"
#include "error.hpp" #include "error.hpp"
#include "tags.hpp" // for ExifTags::ifdName #include "tags.hpp" // for ExifTags::ifdName
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <iostream> #include <iostream>
@ -698,13 +699,13 @@ namespace Exiv2 {
{ {
if (entries_.size() == 0) return; if (entries_.size() == 0) return;
// Print a header // Print a header
os << prefix << "IFD Offset: 0x" os << prefix << _("IFD Offset") << ": 0x"
<< std::setw(8) << std::setfill('0') << std::hex << std::right << std::setw(8) << std::setfill('0') << std::hex << std::right
<< offset_ << offset_
<< ", IFD Entries: " << ", " << _("IFD Entries") << ": "
<< std::setfill(' ') << std::dec << std::right << std::setfill(' ') << std::dec << std::right
<< static_cast<unsigned int>(entries_.size()) << "\n" << static_cast<unsigned int>(entries_.size()) << "\n"
<< prefix << "Entry Tag Format (Bytes each) Number Offset\n" << prefix << _("Entry Tag Format (Bytes each) Number Offset\n")
<< prefix << "----- ------ --------------------- ------ -----------\n"; << prefix << "----- ------ --------------------- ------ -----------\n";
// Print IFD entries // Print IFD entries
const const_iterator b = entries_.begin(); const const_iterator b = entries_.begin();
@ -736,14 +737,14 @@ namespace Exiv2 {
<< "\n"; << "\n";
} }
if (hasNext_) { if (hasNext_) {
os << prefix << "Next IFD: 0x" os << prefix << _("Next IFD") << ": 0x"
<< std::setw(8) << std::setfill('0') << std::hex << std::setw(8) << std::setfill('0') << std::hex
<< std::right << next() << "\n"; << std::right << next() << "\n";
} }
// Print data of IFD entries // Print data of IFD entries
for (i = b; i != e; ++i) { for (i = b; i != e; ++i) {
if (i->size() > 4) { if (i->size() > 4) {
os << "Data of entry " << static_cast<int>(i - b) << ":\n"; os << _("Data of entry") << " " << static_cast<int>(i - b) << ":\n";
hexdump(os, i->data(), i->size(), offset_ + i->offset()); hexdump(os, i->data(), i->size(), offset_ + i->offset());
} }
} }

File diff suppressed because it is too large Load Diff

@ -159,9 +159,9 @@ namespace Exiv2 {
//! Print Brightness setting from standard Minolta Camera Settings makernote //! Print Brightness setting from standard Minolta Camera Settings makernote
static std::ostream& printMinoltaBrightnessStd(std::ostream& os, const Value& value); static std::ostream& printMinoltaBrightnessStd(std::ostream& os, const Value& value);
//! Print Exposure Manual Bias setting from 5D Minolta Camera Settings makernote //! Print Exposure Manual Bias setting from 5D Minolta Camera Settings makernote
static std::ostream& printMinoltaExposureManualBias5D(std::ostream& os, const Value& value); static std::ostream& printMinoltaExposureManualBias5D(std::ostream& os, const Value& value);
//! Print Exposure Compensation setting from 5D Minolta Camera Settings makernote //! Print Exposure Compensation setting from 5D Minolta Camera Settings makernote
static std::ostream& printMinoltaExposureCompensation5D(std::ostream& os, const Value& value); static std::ostream& printMinoltaExposureCompensation5D(std::ostream& os, const Value& value);
//@} //@}

File diff suppressed because it is too large Load Diff

@ -32,6 +32,8 @@
@version $Rev$ @version $Rev$
@author Andreas Huggel (ahu) @author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@author Gilles Caulier (gc)
<a href="mailto:caulier dot gilles at kdemail dot net">caulier dot gilles at kdemail dot net</a>
@date 17-May-04, ahu: created<BR> @date 17-May-04, ahu: created<BR>
25-May-04, ahu: combined all Nikon formats in one component 25-May-04, ahu: combined all Nikon formats in one component
*/ */
@ -255,8 +257,16 @@ namespace Exiv2 {
//@{ //@{
//! Print ISO setting //! Print ISO setting
static std::ostream& print0x0002(std::ostream& os, const Value& value); static std::ostream& print0x0002(std::ostream& os, const Value& value);
//! Print autofocus mode
static std::ostream& print0x0007(std::ostream& os, const Value& value);
//! Print lens type
static std::ostream& print0x0083(std::ostream& os, const Value& value);
//! Print lens information //! Print lens information
static std::ostream& print0x0084(std::ostream& os, const Value& value); static std::ostream& print0x0084(std::ostream& os, const Value& value);
//! Print manual focus distance
static std::ostream& print0x0085(std::ostream& os, const Value& value);
//! Print digital zoom setting
static std::ostream& print0x0086(std::ostream& os, const Value& value);
//! Print AF point //! Print AF point
static std::ostream& print0x0088(std::ostream& os, const Value& value); static std::ostream& print0x0088(std::ostream& os, const Value& value);
//! Print number of lens stops //! Print number of lens stops

@ -23,6 +23,7 @@
Version: $Rev$ Version: $Rev$
Author(s): Will Stokes (wuz) <wstokes@gmail.com> Author(s): Will Stokes (wuz) <wstokes@gmail.com>
Andreas Huggel (ahu) <ahuggel@gmx.net> Andreas Huggel (ahu) <ahuggel@gmx.net>
Gilles Caulier (gc) <caulier.gilles@kdemail.net>
History: 10-Mar-05, wuz: created History: 10-Mar-05, wuz: created
Credits: See header file. Credits: See header file.
*/ */
@ -37,6 +38,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "olympusmn.hpp" #include "olympusmn.hpp"
#include "makernote.hpp" #include "makernote.hpp"
#include "value.hpp" #include "value.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -48,120 +50,352 @@ EXIV2_RCSID("@(#) $Id$")
// class member definitions // class member definitions
namespace Exiv2 { namespace Exiv2 {
//! @cond IGNORE
OlympusMakerNote::RegisterMn::RegisterMn()
{
MakerNoteFactory::registerMakerNote(
"OLYMPUS*", "*", createOlympusMakerNote);
MakerNoteFactory::registerMakerNote(
olympusIfdId, MakerNote::AutoPtr(new OlympusMakerNote));
ExifTags::registerMakerTagInfo(olympusIfdId, tagInfo_); //! OffOn, multiple tags
} extern const TagDetails olympusOffOn[] = {
//! @endcond { 0, N_("Off") },
{ 1, N_("On") }
};
//! Quality, tag 0x0201 //! Quality, tag 0x0201
extern const TagDetails olympusQuality[] = { extern const TagDetails olympusQuality[] = {
{ 1, "Standard Quality (SQ)" }, { 1, N_("Standard Quality (SQ)") },
{ 2, "High Quality (HQ)" }, { 2, N_("High Quality (HQ)") },
{ 3, "Super High Quality (SHQ)" }, { 3, N_("Super High Quality (SHQ)") },
{ 6, "Raw" } { 6, N_("Raw") }
}; };
//! Macro, tag 0x0202 //! Macro, tag 0x0202
extern const TagDetails olympusMacro[] = { extern const TagDetails olympusMacro[] = {
{ 0, "Off" }, { 0, N_("Off") },
{ 1, "On" }, { 1, N_("On") },
{ 2, "Super Macro" } { 2, N_("Super macro") }
}; };
//! OneTouchWB, tag 0x0302 //! OneTouchWB, tag 0x0302
extern const TagDetails olympusOneTouchWb[] = { extern const TagDetails olympusOneTouchWb[] = {
{ 0, "Off" }, { 0, N_("Off") },
{ 1, "On" }, { 1, N_("On") },
{ 2, "On (Preset)" } { 2, N_("On (preset)") }
}; };
//! FlashDevice, tag 0x1005 //! FlashDevice, tag 0x1005
extern const TagDetails olympusFlashDevice[] = { extern const TagDetails olympusFlashDevice[] = {
{ 0, "None" }, { 0, N_("None") },
{ 1, "Internal" }, { 1, N_("Internal") },
{ 4, "External" }, { 4, N_("External") },
{ 4, "Internal + External" } { 5, N_("Internal + External") }
};
//! FocusMode, tag 0x100b
extern const TagDetails olympusFocusMode[] = {
{ 0, N_("Auto") },
{ 1, N_("Manual") }
};
//! Sharpness, tag 0x100f
extern const TagDetails olympusSharpness[] = {
{ 0, N_("Normal") },
{ 1, N_("Hard") },
{ 2, N_("Soft") }
};
//! Contrast, tag 0x1029
extern const TagDetails olympusContrast[] = {
{ 0, N_("High") },
{ 1, N_("Normal") },
{ 2, N_("Low") }
};
//! CCDScanMode, tag 0x1039
extern const TagDetails olympusCCDScanMode[] = {
{ 0, N_("Interlaced") },
{ 1, N_("Progressive") }
}; };
// Olympus Tag Info // Olympus Tag Info
const TagInfo OlympusMakerNote::tagInfo_[] = { const TagInfo OlympusMakerNote::tagInfo_[] = {
TagInfo(0x0200, "SpecialMode", "SpecialMode", "Picture taking mode", olympusIfdId, makerTags, unsignedLong, print0x0200),
TagInfo(0x0201, "Quality", "Quality", "Image quality setting", olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusQuality)), /* TODO:
TagInfo(0x0202, "Macro", "Macro", "Macro mode", olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusMacro)), add Minolta makenotes tags here (0x0000-0x0103). See Exiftool database.*/
TagInfo(0x0203, "BWMode", "BWMode", "Black and White Mode", olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0204, "DigitalZoom", "DigitalZoom", "Digital zoom ratio", olympusIfdId, makerTags, unsignedRational, print0x0204), TagInfo(0x0200, "SpecialMode", N_("Special Mode"),
TagInfo(0x0205, "FocalPlaneDiagonal", "FocalPlaneDiagonal", "Focal plane diagonal", olympusIfdId, makerTags, unsignedRational, printValue), N_("Picture taking mode"),
TagInfo(0x0206, "0x0206", "0x0206", "Unknown", olympusIfdId, makerTags, signedShort, printValue), olympusIfdId, makerTags, unsignedLong, print0x0200),
TagInfo(0x0207, "FirmwareVersion", "FirmwareVersion", "Software firmware version", olympusIfdId, makerTags, asciiString, printValue), TagInfo(0x0201, "Quality", N_("Quality"),
TagInfo(0x0208, "PictureInfo", "PictureInfo", "ASCII format data such as [PictureInfo]", olympusIfdId, makerTags, asciiString, printValue), N_("Image quality setting"),
TagInfo(0x0209, "CameraID", "CameraID", "CameraID data", olympusIfdId, makerTags, undefined, printValue), olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusQuality)),
TagInfo(0x0300, "PreCaptureFrames", "PreCaptureFrames", "Pre-capture frames", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0202, "Macro", N_("Macro"),
TagInfo(0x0301, "0x0301", "0x0301", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Macro mode"),
TagInfo(0x0302, "OneTouchWB", "OneTouchWB", "OneTouchWB", olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusOneTouchWb)), olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusMacro)),
TagInfo(0x0303, "0x0303", "0x0303", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0203, "BWMode", N_("Black & White Mode"),
TagInfo(0x0304, "0x0304", "0x0304", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Black and white mode"),
TagInfo(0x0f00, "DataDump", "DataDump", "Various camera settings", olympusIfdId, makerTags, undefined, printValue), olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusOffOn)),
TagInfo(0x1000, "0x1000", "0x1000", "Unknown", olympusIfdId, makerTags, signedRational, printValue), TagInfo(0x0204, "DigitalZoom", N_("Digital Zoom"),
TagInfo(0x1001, "0x1001", "0x1001", "Unknown", olympusIfdId, makerTags, signedRational, printValue), N_("Digital zoom ratio"),
TagInfo(0x1002, "0x1002", "0x1002", "Unknown", olympusIfdId, makerTags, signedRational, printValue), olympusIfdId, makerTags, unsignedRational, print0x0204),
TagInfo(0x1003, "0x1003", "0x1003", "Unknown", olympusIfdId, makerTags, signedRational, printValue), TagInfo(0x0205, "FocalPlaneDiagonal", N_("Focal Plane Diagonal"),
TagInfo(0x1004, "FlashMode", "FlashMode", "Flash mode", olympusIfdId, makerTags, unsignedShort, printValue), N_("Focal plane diagonal"),
TagInfo(0x1005, "FlashDevice", "FlashDevice", "Flash device", olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusFlashDevice)), olympusIfdId, makerTags, unsignedRational, printValue),
TagInfo(0x1006, "Bracket", "Bracket", "Bracket", olympusIfdId, makerTags, signedRational, printValue), TagInfo(0x0206, "LensDistortionParams", N_("Lens Distortion Parameters"),
TagInfo(0x1007, "0x1007", "0x1007", "Unknown", olympusIfdId, makerTags, signedShort, printValue), N_("Lens distortion parameters"),
TagInfo(0x1008, "0x1008", "0x1008", "Unknown", olympusIfdId, makerTags, signedShort, printValue), olympusIfdId, makerTags, signedShort, printValue),
TagInfo(0x1009, "0x1009", "0x1009", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0207, "FirmwareVersion", N_("Firmware Version"),
TagInfo(0x100a, "0x100a", "0x100a", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Software firmware version"),
TagInfo(0x100b, "FocusMode", "FocusMode", "Focus mode", olympusIfdId, makerTags, unsignedShort, printValue), olympusIfdId, makerTags, asciiString, printValue),
TagInfo(0x100c, "FocusDistance", "FocusDistance", "Focus distance", olympusIfdId, makerTags, unsignedRational, printValue), TagInfo(0x0208, "PictureInfo", N_("Picture Info"),
TagInfo(0x100d, "Zoom", "Zoom", "Zoom", olympusIfdId, makerTags, unsignedShort, printValue), N_("ASCII format data such as [PictureInfo]"),
TagInfo(0x100e, "MacroFocus", "MacroFocus", "Macro focus", olympusIfdId, makerTags, unsignedShort, printValue), olympusIfdId, makerTags, asciiString, printValue),
TagInfo(0x100f, "SharpnessFactor", "SharpnessFactor", "Sharpness factor", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0209, "CameraID", N_("Camera ID"),
TagInfo(0x1010, "0x1010", "0x1010", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Camera ID data"),
TagInfo(0x1011, "ColorMatrix", "ColorMatrix", "Color matrix", olympusIfdId, makerTags, unsignedShort, printValue), olympusIfdId, makerTags, undefined, printValue),
TagInfo(0x1012, "BlackLevel", "BlackLevel", "Black level", olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1013, "0x1013", "0x1013", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), /* TODO: Epson Camera tags. See ExifTool database.
TagInfo(0x1014, "0x1014", "0x1014", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1015, "WhiteBalance", "WhiteBalance", "White balance", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x020b, "ImageWidth", N_("Image Width"),
TagInfo(0x1016, "0x1016", "0x1016", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Image width"),
TagInfo(0x1017, "RedBalance", "RedBalance", "Red balance", olympusIfdId, makerTags, unsignedShort, printValue), olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1018, "BlueBalance", "BlueBalance", "Blue balance", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x020c, "ImageHeight", N_("Image Height"),
TagInfo(0x1019, "0x1019", "0x1019", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Image height"),
TagInfo(0x101a, "SerialNumber", "SerialNumber", "Serial number", olympusIfdId, makerTags, asciiString, printValue), olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x101b, "0x101b", "0x101b", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), TagInfo(0x020d, "Software", N_("Software"),
TagInfo(0x101c, "0x101c", "0x101c", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), N_("Software"),
TagInfo(0x101d, "0x101d", "0x101d", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), olympusIfdId, makerTags, asciiString, printValue),
TagInfo(0x101e, "0x101e", "0x101e", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), TagInfo(0x0280, "PreviewImage", N_("Preview Image"),
TagInfo(0x101f, "0x101f", "0x101f", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), N_("Preview image"),
TagInfo(0x1020, "0x1020", "0x1020", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), olympusIfdId, makerTags, unsignedByte, printValue),
TagInfo(0x1021, "0x1021", "0x1021", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), */
TagInfo(0x1022, "0x1022", "0x1022", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1023, "FlashBias", "FlashBias", "Flash bias", olympusIfdId, makerTags, signedRational, printValue), TagInfo(0x0300, "PreCaptureFrames", N_("Pre Capture Frames"),
TagInfo(0x1024, "0x1024", "0x1024", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Pre-capture frames"),
TagInfo(0x1025, "0x1025", "0x1025", "Unknown", olympusIfdId, makerTags, signedRational, printValue), olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1026, "0x1026", "0x1026", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0301, "0x0301", "0x0301",
TagInfo(0x1027, "0x1027", "0x1027", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Unknown"),
TagInfo(0x1028, "0x1028", "0x1028", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1029, "Contrast", "Contrast", "Contrast setting", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0302, "OneTouchWB", N_("One Touch WB"),
TagInfo(0x102a, "SharpnessFactor", "SharpnessFactor", "Sharpness factor", olympusIfdId, makerTags, unsignedShort, printValue), N_("One touch white balance"),
TagInfo(0x102b, "ColorControl", "ColorControl", "Color control", olympusIfdId, makerTags, unsignedShort, printValue), olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusOneTouchWb)),
TagInfo(0x102c, "ValidBits", "ValidBits", "Valid bits", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0303, "0x0303", "0x0303",
TagInfo(0x102d, "CoringFilter", "CoringFilter", "Coring filter", olympusIfdId, makerTags, unsignedShort, printValue), N_("Unknown"),
TagInfo(0x102e, "ImageWidth", "ImageWidth", "Image width", olympusIfdId, makerTags, unsignedLong, printValue), olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x102f, "ImageHeight", "ImageHeight", "Image height", olympusIfdId, makerTags, unsignedLong, printValue), TagInfo(0x0304, "0x0304", "0x0304",
TagInfo(0x1030, "0x1030", "0x1030", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), N_("Unknown"),
TagInfo(0x1031, "0x1031", "0x1031", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1032, "0x1032", "0x1032", "Unknown", olympusIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0404, "SerialNumber", N_("Serial Number"),
TagInfo(0x1033, "0x1033", "0x1033", "Unknown", olympusIfdId, makerTags, unsignedLong, printValue), N_("Serial number"),
olympusIfdId, makerTags, asciiString, printValue),
TagInfo(0x0e00, "PrintIM", N_("Print IM"),
N_("PrintIM information"),
olympusIfdId, makerTags, undefined, printValue),
TagInfo(0x0f00, "DataDump1", N_("Data Dump 1"),
N_("Various camera settings 1"),
olympusIfdId, makerTags, undefined, printValue),
TagInfo(0x0f01, "DataDump2", N_("Data Dump 2"),
N_("Various camera settings 2"),
olympusIfdId, makerTags, undefined, printValue),
TagInfo(0x1000, "ShutterSpeed", N_("Shutter Speed"),
N_("Shutter speed value"),
olympusIfdId, makerTags, signedRational, printValue),
TagInfo(0x1001, "ISOSpeed", N_("ISO Speed"),
N_("ISO speed value"),
olympusIfdId, makerTags, signedRational, printValue),
TagInfo(0x1002, "ApertureValue", N_("Aperture Value"),
N_("Aperture value"),
olympusIfdId, makerTags, signedRational, printValue),
TagInfo(0x1003, "Brightness", N_("Brightness"),
N_("Brightness value"),
olympusIfdId, makerTags, signedRational, printValue),
TagInfo(0x1004, "FlashMode", N_("Flash Mode"),
N_("Flash mode"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusOffOn)),
TagInfo(0x1005, "FlashDevice", N_("Flash Device"),
N_("Flash device"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusFlashDevice)),
TagInfo(0x1006, "Bracket", N_("Bracket"),
N_("Exposure compensation value"),
olympusIfdId, makerTags, signedRational, printValue),
TagInfo(0x1007, "SensorTemperature", N_("Sensor Temperature"),
N_("Sensor temperature"),
olympusIfdId, makerTags, signedShort, printValue),
TagInfo(0x1008, "LensTemperature", N_("Lens Temperature"),
N_("Lens temperature"),
olympusIfdId, makerTags, signedShort, printValue),
TagInfo(0x1009, "0x1009", "0x1009",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x100a, "0x100a", "0x100a",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x100b, "FocusMode", N_("Focus Mode"),
N_("Focus mode"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusFocusMode)),
TagInfo(0x100c, "FocusDistance", N_("Focus Distance"),
N_("Manual focus distance"),
olympusIfdId, makerTags, unsignedRational, printValue),
TagInfo(0x100d, "Zoom", N_("Zoom"),
N_("Zoom step count"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x100e, "MacroFocus", N_("Macro Focus"),
N_("Macro focus step count"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x100f, "SharpnessFactor", N_("Sharpness Factor"),
N_("Sharpness factor"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusSharpness)),
TagInfo(0x1010, "FlashChargeLevel", N_("Flash Charge Level"),
N_("Flash charge level"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1011, "ColorMatrix", N_("Color Matrix"),
N_("Color matrix"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1012, "BlackLevel", N_("BlackLevel"),
N_("Black level"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1013, "0x1013", "0x1013",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1014, "0x1014", "0x1014",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1015, "WhiteBalance", N_("White Balance"),
N_("White balance mode"),
olympusIfdId, makerTags, unsignedShort, print0x1015),
TagInfo(0x1016, "0x1016", "0x1016",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1017, "RedBalance", N_("Red Balance"),
N_("Red balance"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1018, "BlueBalance", N_("Blue Balance"),
N_("Blue balance"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1019, "0x1019", "0x1019",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x101a, "SerialNumber2", N_("Serial Number 2"),
N_("Serial number 2"),
olympusIfdId, makerTags, asciiString, printValue),
TagInfo(0x101b, "0x101b", "0x101b",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x101c, "0x101c", "0x101c",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x101d, "0x101d", "0x101d",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x101e, "0x101e", "0x101e",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x101f, "0x101f", "0x101f",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1020, "0x1020", "0x1020",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1021, "0x1021", "0x1021",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1022, "0x1022", "0x1022",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1023, "FlashBias", N_("Flash Bias"),
N_("Flash exposure compensation"),
olympusIfdId, makerTags, signedRational, printValue),
TagInfo(0x1024, "0x1024", "0x1024",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1025, "0x1025", "0x1025",
N_("Unknown"),
olympusIfdId, makerTags, signedRational, printValue),
TagInfo(0x1026, "ExternalFlashBounce", N_("External Flash Bounce"),
N_("External flash bounce"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusOffOn)),
TagInfo(0x1027, "ExternalFlashZoom", N_("External Flash Zoom"),
N_("External flash zoom"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1028, "ExternalFlashMode", N_("External Flash Mode"),
N_("External flash mode"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1029, "Contrast", N_("Contrast"),
N_("Contrast setting"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusContrast)),
TagInfo(0x102a, "SharpnessFactor", N_("Sharpness Factor"),
N_("Sharpness factor"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x102b, "ColorControl", N_("Color Control"),
N_("Color control"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x102c, "ValidBits", N_("ValidBits"),
N_("Valid bits"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x102d, "CoringFilter", N_("CoringFilter"),
N_("Coring filter"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x102e, "ImageWidth", N_("Image Width"),
N_("Image width"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x102f, "ImageHeight", N_("Image Height"),
N_("Image height"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1030, "0x1030", "0x1030",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1031, "0x1031", "0x1031",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1032, "0x1032", "0x1032",
N_("Unknown"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x1033, "0x1033", "0x1033",
N_("Unknown"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1034, "CompressionRatio", N_("Compression Ratio"),
N_("Compression ratio"),
olympusIfdId, makerTags, unsignedRational, printValue),
TagInfo(0x1035, "Thumbnail", N_("Thumbnail"),
N_("Preview image embedded"),
olympusIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(olympusOffOn)),
TagInfo(0x1036, "ThumbnailOffset", N_("Thumbnail Offset"),
N_("Offset of the preview image"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1037, "ThumbnailLength", N_("Thumbnail Length"),
N_("Size of the preview image"),
olympusIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x1039, "CCDScanMode", N_("CCD Scan Mode"),
N_("CCD scan mode"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusCCDScanMode)),
TagInfo(0x103a, "NoiseReduction", N_("Noise Reduction"),
N_("Noise reduction"),
olympusIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(olympusOffOn)),
TagInfo(0x103b, "InfinityLensStep", N_("Infinity Lens Step"),
N_("Infinity lens step"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x103c, "NearLensStep", N_("Near Lens Step"),
N_("Near lens step"),
olympusIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x2010, "Equipment", N_("Equipment Info"),
N_("Camera equipment information"),
minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x2020, "CameraSettings", N_("Camera Settings"),
N_("Camera Settings information"),
minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x2030, "RawDevelopment", N_("Raw Development"),
N_("Raw development information"),
minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x2040, "ImageProcessing", N_("Image Processing"),
N_("Image processing information"),
minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x2050, "FocusInfo", N_("Focus Info"),
N_("Focus information"),
minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x3000, "RawInfo", N_("Raw Info"),
N_("Raw information"),
minoltaIfdId, makerTags, undefined, printValue),
// End of list marker // End of list marker
TagInfo(0xffff, "(UnknownOlympusMakerNoteTag)", "(UnknownOlympusMakerNoteTag)", "Unknown OlympusMakerNote tag", olympusIfdId, makerTags, invalidTypeId, printValue) TagInfo(0xffff, "(UnknownOlympusMakerNoteTag)", "(UnknownOlympusMakerNoteTag)",
N_("Unknown OlympusMakerNote tag"),
olympusIfdId, makerTags, invalidTypeId, printValue)
}; };
const TagInfo* OlympusMakerNote::tagList() const TagInfo* OlympusMakerNote::tagList()
@ -169,6 +403,16 @@ namespace Exiv2 {
return tagInfo_; return tagInfo_;
} }
//! @cond IGNORE
OlympusMakerNote::RegisterMn::RegisterMn()
{
MakerNoteFactory::registerMakerNote("OLYMPUS*", "*", createOlympusMakerNote);
MakerNoteFactory::registerMakerNote(olympusIfdId, MakerNote::AutoPtr(new OlympusMakerNote));
ExifTags::registerMakerTagInfo(olympusIfdId, tagInfo_);
}
//! @endcond
OlympusMakerNote::OlympusMakerNote(bool alloc) OlympusMakerNote::OlympusMakerNote(bool alloc)
: IfdMakerNote(olympusIfdId, alloc) : IfdMakerNote(olympusIfdId, alloc)
{ {
@ -183,9 +427,7 @@ namespace Exiv2 {
{ {
} }
int OlympusMakerNote::readHeader(const byte* buf, int OlympusMakerNote::readHeader(const byte* buf, long len, ByteOrder /*byteOrder*/)
long len,
ByteOrder /*byteOrder*/)
{ {
if (len < 8) return 1; if (len < 8) return 1;
@ -232,43 +474,41 @@ namespace Exiv2 {
return new OlympusMakerNote(*this); return new OlympusMakerNote(*this);
} }
std::ostream& OlympusMakerNote::print0x0200(std::ostream& os, std::ostream& OlympusMakerNote::print0x0200(std::ostream& os, const Value& value)
const Value& value)
{ {
if (value.count() != 3 || value.typeId() != unsignedLong) { if (value.count() != 3 || value.typeId() != unsignedLong) {
return os << value; return os << value;
} }
long l0 = value.toLong(0); long l0 = value.toLong(0);
switch (l0) { switch (l0) {
case 0: os << "Normal"; break; case 0: os << _("Normal"); break;
case 2: os << "Fast"; break; case 2: os << _("Fast"); break;
case 3: os << "Panorama"; break; case 3: os << _("Panorama"); break;
default: os << "(" << l0 << ")"; break; default: os << "(" << l0 << ")"; break;
} }
if (l0 != 0) { if (l0 != 0) {
os << ", "; os << ", ";
long l1 = value.toLong(1); long l1 = value.toLong(1);
os << "Sequence number " << l1; os << _("Sequence number") << " " << l1;
} }
if (l0 != 0 && l0 != 2) { if (l0 != 0 && l0 != 2) {
os << ", "; os << ", ";
long l2 = value.toLong(2); long l2 = value.toLong(2);
switch (l2) { switch (l2) {
case 1: os << "Left to Right"; break; case 1: os << _("Left to right"); break;
case 2: os << "Right to Left"; break; case 2: os << _("Right to left"); break;
case 3: os << "Bottom to Top"; break; case 3: os << _("Bottom to top"); break;
case 4: os << "Top to Bottom"; break; case 4: os << _("Top to bottom"); break;
default: os << "(" << l2 << ")"; break; default: os << "(" << l2 << ")"; break;
} }
} }
return os; return os;
} // OlympusMakerNote::print0x0200 } // OlympusMakerNote::print0x0200
std::ostream& OlympusMakerNote::print0x0204(std::ostream& os, std::ostream& OlympusMakerNote::print0x0204(std::ostream& os, const Value& value)
const Value& value)
{ {
float f = value.toFloat(); float f = value.toFloat();
if (f == 0.0 || f == 1.0) return os << "None"; if (f == 0.0 || f == 1.0) return os << _("None");
std::ostringstream oss; std::ostringstream oss;
oss.copyfmt(os); oss.copyfmt(os);
os << std::fixed << std::setprecision(1) << f << "x"; os << std::fixed << std::setprecision(1) << f << "x";
@ -276,14 +516,53 @@ namespace Exiv2 {
return os; return os;
} // OlympusMakerNote::print0x0204 } // OlympusMakerNote::print0x0204
std::ostream& OlympusMakerNote::print0x1015(std::ostream& os, const Value& value)
{
if (value.count() != 2 || value.typeId() != unsignedShort) {
return os << value;
}
short l0 = (short)value.toLong(0);
if (l0 != 1) {
os << _("Auto");
}
else {
short l1 = (short)value.toLong(1);
if (l1 != 1) {
switch (l0) {
case 0: os << _("Auto"); break;
default: os << _("Auto") << " (" << l0 << ")"; break;
}
}
else if (l1 != 2) {
switch (l0) {
case 2: os << _("3000 Kelvin"); break;
case 3: os << _("3700 Kelvin"); break;
case 4: os << _("4000 Kelvin"); break;
case 5: os << _("4500 Kelvin"); break;
case 6: os << _("5500 Kelvin"); break;
case 7: os << _("6500 Kelvin"); break;
case 8: os << _("7500 Kelvin"); break;
default: os << value; break;
}
}
else if (l1 != 3) {
switch (l0) {
case 0: os << _("One-touch"); break;
default: os << value; break;
}
}
else {
return os << value;
}
}
return os;
} // OlympusMakerNote::print0x1015
// ***************************************************************************** // *****************************************************************************
// free functions // free functions
MakerNote::AutoPtr createOlympusMakerNote(bool alloc, MakerNote::AutoPtr createOlympusMakerNote(bool alloc, const byte* /*buf*/, long /*len*/,
const byte* /*buf*/, ByteOrder /*byteOrder*/, long /*offset*/)
long /*len*/,
ByteOrder /*byteOrder*/,
long /*offset*/)
{ {
return MakerNote::AutoPtr(new OlympusMakerNote(alloc)); return MakerNote::AutoPtr(new OlympusMakerNote(alloc));
} }

@ -30,6 +30,8 @@
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@author Will Stokes (wuz) @author Will Stokes (wuz)
<a href="mailto:wstokes@gmail.com">wstokes@gmail.com</a> <a href="mailto:wstokes@gmail.com">wstokes@gmail.com</a>
@author Gilles Caulier (gc)
<a href="mailto:caulier dot gilles at kdemail dot net">caulier dot gilles at kdemail dot net</a>
@date 10-Mar-05, wuz: created @date 10-Mar-05, wuz: created
*/ */
#ifndef OLYMPUSMN_HPP_ #ifndef OLYMPUSMN_HPP_
@ -129,6 +131,8 @@ namespace Exiv2 {
static std::ostream& print0x0200(std::ostream& os, const Value& value); static std::ostream& print0x0200(std::ostream& os, const Value& value);
//! Print Digital Zoom Factor //! Print Digital Zoom Factor
static std::ostream& print0x0204(std::ostream& os, const Value& value); static std::ostream& print0x0204(std::ostream& os, const Value& value);
//! Print White Balance Mode
static std::ostream& print0x1015(std::ostream& os, const Value& value);
//@} //@}
//! @cond IGNORE //! @cond IGNORE

@ -22,6 +22,7 @@
File: panasonicmn.cpp File: panasonicmn.cpp
Version: $Rev$ Version: $Rev$
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net> Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
Gilles Caulier (gc) <caulier.gilles@kdemail.net>
History: 11-Jun-04, ahu: created History: 11-Jun-04, ahu: created
Credits: See header file Credits: See header file
*/ */
@ -35,6 +36,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "panasonicmn.hpp" #include "panasonicmn.hpp"
#include "makernote.hpp" #include "makernote.hpp"
#include "value.hpp" #include "value.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -59,126 +61,223 @@ namespace Exiv2 {
//! Quality, tag 0x0001 //! Quality, tag 0x0001
extern const TagDetails panasonicQuality[] = { extern const TagDetails panasonicQuality[] = {
{ 2, "High" }, { 2, N_("High") },
{ 3, "Standard" }, { 3, N_("Normal") },
{ 6, "Very High" }, { 6, N_("Very High") },
{ 7, "Raw" } { 7, N_("Raw") }
}; };
//! WhiteBalance, tag 0x0003 //! WhiteBalance, tag 0x0003
extern const TagDetails panasonicWhiteBalance[] = { extern const TagDetails panasonicWhiteBalance[] = {
{ 1, "Auto" }, { 1, N_("Auto") },
{ 2, "Daylight" }, { 2, N_("Daylight") },
{ 3, "Cloudy" }, { 3, N_("Cloudy") },
{ 4, "Halogen" }, { 4, N_("Halogen") },
{ 5, "Manual" }, { 5, N_("Manual") },
{ 8, "Flash" }, { 8, N_("Flash") },
{ 10, "Black and White" } { 10, N_("Black and white") }
}; };
//! FocusMode, tag 0x0007 //! FocusMode, tag 0x0007
extern const TagDetails panasonicFocusMode[] = { extern const TagDetails panasonicFocusMode[] = {
{ 1, "Auto" }, { 1, N_("Auto") },
{ 2, "Manual" } { 2, N_("Manual") },
{ 4, N_("Auto, focus button") },
{ 5, N_("Auto, continuous") }
}; };
//! ImageStabilizer, tag 0x001a //! ImageStabilizer, tag 0x001a
extern const TagDetails panasonicImageStabilizer[] = { extern const TagDetails panasonicImageStabilizer[] = {
{ 2, "On, Mode 1" }, { 2, N_("On, Mode 1") },
{ 3, "Off" }, { 3, N_("Off") },
{ 4, "On, Mode 2" } { 4, N_("On, Mode 2") }
}; };
//! Macro, tag 0x001c //! Macro, tag 0x001c
extern const TagDetails panasonicMacro[] = { extern const TagDetails panasonicMacro[] = {
{ 1, "On" }, { 1, N_("On") },
{ 2, "Off" } { 2, N_("Off") },
{ 257, N_("Tele-macro") }
}; };
//! ShootingMode, tag 0x001f //! ShootingMode, tag 0x001f
extern const TagDetails panasonicShootingMode[] = { extern const TagDetails panasonicShootingMode[] = {
{ 1, "Normal" }, { 1, N_("Normal") },
{ 2, "Portrait" }, { 2, N_("Portrait") },
{ 3, "Scenery" }, { 3, N_("Scenery") },
{ 4, "Sports" }, { 4, N_("Sports") },
{ 5, "Night Portrait" }, { 5, N_("Night portrait") },
{ 6, "Program" }, { 6, N_("Program") },
{ 7, "Aperture Priority" }, { 7, N_("Aperture priority") },
{ 8, "Shutter Priority" }, { 8, N_("Shutter-speed priority") },
{ 9, "Macro" }, { 9, N_("Macro") },
{ 11, "Manual" }, { 11, N_("Manual") },
{ 13, "Panning" }, { 13, N_("Panning") },
{ 18, "Fireworks" }, { 18, N_("Fireworks") },
{ 19, "Party" }, { 19, N_("Party") },
{ 20, "Snow" }, { 20, N_("Snow") },
{ 21, "Night Scenery" } { 21, N_("Night scenery") },
{ 22, N_("Food") }
}; };
//! Audio, tag 0x0020 //! Audio, tag 0x0020
extern const TagDetails panasonicAudio[] = { extern const TagDetails panasonicAudio[] = {
{ 1, "Yes" }, { 1, N_("Yes") },
{ 2, "No" } { 2, N_("No") }
}; };
//! ColorEffect, tag 0x0028 //! ColorEffect, tag 0x0028
extern const TagDetails panasonicColorEffect[] = { extern const TagDetails panasonicColorEffect[] = {
{ 1, "Off" }, { 1, N_("Off") },
{ 2, "Warm" }, { 2, N_("Warm") },
{ 3, "Cool" }, { 3, N_("Cool") },
{ 4, "Black and White" }, { 4, N_("Black and white") },
{ 5, "Sepia" } { 5, N_("Sepia") }
};
//! BustMode, tag 0x002a
extern const TagDetails panasonicBurstMode[] = {
{ 0, N_("Off") },
{ 1, N_("Low/High quality") },
{ 2, N_("Infinite") }
}; };
//! Contrast, tag 0x002c //! Contrast, tag 0x002c
extern const TagDetails panasonicContrast[] = { extern const TagDetails panasonicContrast[] = {
{ 0, "Standard" }, { 0, N_("Normal") },
{ 1, "Low" }, { 1, N_("Low") },
{ 2, "High" }, { 2, N_("High") },
{ 0x100, "Low" }, { 256, N_("Low") },
{ 0x110, "Standard" }, { 272, N_("Standard") },
{ 0x120, "High" } { 288, N_("High") }
}; };
//! NoiseReduction, tag 0x002d //! NoiseReduction, tag 0x002d
extern const TagDetails panasonicNoiseReduction[] = { extern const TagDetails panasonicNoiseReduction[] = {
{ 0, "Standard" }, { 0, N_("Standard") },
{ 1, "Low" }, { 1, N_("Low") },
{ 2, "High" } { 2, N_("High") }
};
//! SelfTimer, tag 0x002e
extern const TagDetails panasonicSelfTimer[] = {
{ 1, N_("Off") },
{ 2, N_("10s") },
{ 3, N_("2s") }
};
//! Rotation, tag 0x0030
extern const TagDetails panasonicRotation[] = {
{ 1, N_("Horizontal (normal)") },
{ 6, N_("Rotate 90 CW") },
{ 8, N_("Rotate 270 CW") }
};
//! ColorMode, tag 0x0032
extern const TagDetails panasonicColorMode[] = {
{ 0, N_("Normal") },
{ 1, N_("Natural") }
}; };
// Panasonic MakerNote Tag Info // Panasonic MakerNote Tag Info
const TagInfo PanasonicMakerNote::tagInfo_[] = { const TagInfo PanasonicMakerNote::tagInfo_[] = {
TagInfo(0x0001, "Quality", "Quality", "Image Quality", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicQuality)), TagInfo(0x0001, "Quality", N_("Quality"),
TagInfo(0x0002, "FirmwareVersion", "FirmwareVersion", "Firmware version", panasonicIfdId, makerTags, undefined, printValue), N_("Image Quality"),
TagInfo(0x0003, "WhiteBalance", "WhiteBalance", "White balance setting", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicWhiteBalance)), panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicQuality)),
TagInfo(0x0004, "0x0004", "0x0004", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0002, "FirmwareVersion", N_("Firmware Version"),
TagInfo(0x0007, "FocusMode", "FocusMode", "Focus mode", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicFocusMode)), N_("Firmware version"),
TagInfo(0x000f, "SpotMode", "SpotMode", "Spot mode", panasonicIfdId, makerTags, unsignedByte, print0x000f), panasonicIfdId, makerTags, undefined, printValue),
TagInfo(0x001a, "ImageStabilizer", "ImageStabilizer", "Image stabilizer", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicImageStabilizer)), TagInfo(0x0003, "WhiteBalance", N_("White Balance"),
TagInfo(0x001c, "Macro", "Macro", "Macro mode", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicMacro)), N_("White balance setting"),
TagInfo(0x001f, "ShootingMode", "ShootingMode", "Shooting mode", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicShootingMode)), panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicWhiteBalance)),
TagInfo(0x0020, "Audio", "Audio", "Audio", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicAudio)), TagInfo(0x0004, "0x0004", "0x0004",
TagInfo(0x0021, "DataDump", "DataDump", "Data dump", panasonicIfdId, makerTags, undefined, printValue), N_("Unknown"),
TagInfo(0x0022, "0x0022", "0x0022", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), panasonicIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0023, "WhiteBalanceBias", "WhiteBalanceBias", "White balance adjustment", panasonicIfdId, makerTags, unsignedShort, print0x0023), TagInfo(0x0007, "FocusMode", N_("Focus Mode"),
TagInfo(0x0024, "FlashBias", "FlashBias", "Flash bias", panasonicIfdId, makerTags, unsignedShort, printValue), N_("Focus mode"),
TagInfo(0x0025, "SerialNumber", "SerialNumber", "Serial number", panasonicIfdId, makerTags, undefined, printValue), panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicFocusMode)),
TagInfo(0x0026, "0x0026", "0x0026", "Unknown", panasonicIfdId, makerTags, undefined, printValue), TagInfo(0x000f, "SpotMode", N_("Spot Mode"), N_("Spot mode"),
TagInfo(0x0027, "0x0027", "0x0027", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), panasonicIfdId, makerTags, unsignedByte, print0x000f),
TagInfo(0x0028, "ColorEffect", "ColorEffect", "Color effect", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicColorEffect)), TagInfo(0x001a, "ImageStabilizer", N_("ImageStabilizer"),
TagInfo(0x0029, "0x0029", "0x0029", "Unknown", panasonicIfdId, makerTags, unsignedLong, printValue), N_("Image stabilizer"),
TagInfo(0x002a, "0x002a", "0x002a", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicImageStabilizer)),
TagInfo(0x002b, "0x002b", "0x002b", "Unknown", panasonicIfdId, makerTags, unsignedLong, printValue), TagInfo(0x001c, "Macro", N_("Macro"),
TagInfo(0x002c, "Contrast", "Contrast", "Contrast setting", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicContrast)), N_("Macro mode"),
TagInfo(0x002d, "NoiseReduction", "NoiseReduction", "Noise reduction", panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicNoiseReduction)), panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicMacro)),
TagInfo(0x002e, "0x002e", "0x002e", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), TagInfo(0x001f, "ShootingMode", N_("Shooting Mode"),
TagInfo(0x002f, "0x002f", "0x002f", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), N_("Shooting mode"),
TagInfo(0x0030, "0x0030", "0x0030", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicShootingMode)),
TagInfo(0x0031, "0x0031", "0x0031", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0020, "Audio", N_("Audio"),
TagInfo(0x0032, "0x0032", "0x0032", "Unknown", panasonicIfdId, makerTags, unsignedShort, printValue), N_("Audio"),
TagInfo(0x4449, "0x4449", "0x4449", "Unknown", panasonicIfdId, makerTags, undefined, printValue), panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicAudio)),
TagInfo(0x0021, "DataDump", N_("Data Dump"),
N_("Data dump"),
panasonicIfdId, makerTags, undefined, printValue),
TagInfo(0x0022, "0x0022", "0x0022",
N_("Unknown"),
panasonicIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0023, "WhiteBalanceBias", N_("White Balance Bias"),
N_("White balance adjustment"),
panasonicIfdId, makerTags, unsignedShort, print0x0023),
TagInfo(0x0024, "FlashBias", N_("FlashBias"),
N_("Flash bias"),
panasonicIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0025, "SerialNumber", N_("Serial Number"),
N_("This number is unique, and contains the date of manufacture, "
"but is not the same as the number printed on the camera body."),
panasonicIfdId, makerTags, undefined, printValue),
TagInfo(0x0026, "0x0026", "0x0026",
N_("Unknown"),
panasonicIfdId, makerTags, undefined, printValue),
TagInfo(0x0027, "0x0027", "0x0027",
N_("Unknown"),
panasonicIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0028, "ColorEffect", N_("Color Effect"),
N_("Color effect"),
panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicColorEffect)),
TagInfo(0x0029, "0x0029", "0x0029",
N_("Unknown"),
panasonicIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x002a, "BurstMode", N_("Burst Mode"),
N_("Burst mode"),
panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicBurstMode)),
TagInfo(0x002b, "SequenceNumber", N_("Sequence Number"),
N_("Sequence number"),
panasonicIfdId, makerTags, unsignedLong, printValue),
TagInfo(0x002c, "Contrast", N_("Contrast"),
N_("Contrast setting"),
panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicContrast)),
TagInfo(0x002d, "NoiseReduction", N_("NoiseReduction"),
N_("Noise reduction"),
panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicNoiseReduction)),
TagInfo(0x002e, "SelfTimer", N_("Self Timer"),
N_("Self timer"),
panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicSelfTimer)),
TagInfo(0x002f, "0x002f", "0x002f",
N_("Unknown"),
panasonicIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0030, "Rotation", N_("Rotation"),
N_("Rotation"),
panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicRotation)),
TagInfo(0x0031, "0x0031", "0x0031",
N_("Unknown"),
panasonicIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0032, "ColorMode", N_("Color Mode"),
N_("Color mode"),
panasonicIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(panasonicColorMode)),
TagInfo(0x0036, "TravelDay", N_("Travel Day"),
N_("Travel day"),
panasonicIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0e00, "PrintIM", N_("Print IM"),
N_("PrintIM information"),
minoltaIfdId, makerTags, undefined, printValue),
TagInfo(0x4449, "0x4449", "0x4449",
N_("Unknown"),
panasonicIfdId, makerTags, undefined, printValue),
// End of list marker // End of list marker
TagInfo(0xffff, "(UnknownPanasonicMakerNoteTag)", "(UnknownPanasonicMakerNoteTag)", "Unknown PanasonicMakerNote tag", panasonicIfdId, makerTags, invalidTypeId, printValue) TagInfo(0xffff, "(UnknownPanasonicMakerNoteTag)", "(UnknownPanasonicMakerNoteTag)",
N_("Unknown PanasonicMakerNote tag"),
panasonicIfdId, makerTags, invalidTypeId, printValue)
}; };
const TagInfo* PanasonicMakerNote::tagList() const TagInfo* PanasonicMakerNote::tagList()
@ -255,8 +354,8 @@ namespace Exiv2 {
return os << value; return os << value;
} }
long l0 = value.toLong(0); long l0 = value.toLong(0);
if (l0 == 1) os << "On"; if (l0 == 1) os << _("On");
else if (l0 == 16) os << "Off"; else if (l0 == 16) os << _("Off");
else os << value; else os << value;
return os; return os;
} // PanasonicMakerNote::print0x000f } // PanasonicMakerNote::print0x000f
@ -267,7 +366,7 @@ namespace Exiv2 {
std::ostringstream oss; std::ostringstream oss;
oss.copyfmt(os); oss.copyfmt(os);
os << std::fixed << std::setprecision(1) os << std::fixed << std::setprecision(1)
<< value.toLong() / 3 << " EV"; << value.toLong() / 3 << _(" EV");
os.copyfmt(oss); os.copyfmt(oss);
return os; return os;

@ -27,6 +27,8 @@
@version $Rev$ @version $Rev$
@author Andreas Huggel (ahu) @author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@author Gilles Caulier (gc)
<a href="mailto:caulier dot gilles at kdemail dot net">caulier dot gilles at kdemail dot net</a>
@date 11-Jun-05, ahu: created @date 11-Jun-05, ahu: created
*/ */
#ifndef PANASONICMN_HPP_ #ifndef PANASONICMN_HPP_

@ -296,7 +296,9 @@ namespace Exiv2 {
if (length == 0) if (length == 0)
{ {
#ifdef DEBUG
std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: invalid profile length\n"; std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: invalid profile length\n";
#endif
return DataBuf(); return DataBuf();
} }
@ -304,7 +306,9 @@ namespace Exiv2 {
if (info.size_ != length) if (info.size_ != length)
{ {
#ifdef DEBUG
std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: cannot allocate memory\n"; std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: cannot allocate memory\n";
#endif
return DataBuf(); return DataBuf();
} }
@ -319,7 +323,9 @@ namespace Exiv2 {
{ {
if (*sp == '\0') if (*sp == '\0')
{ {
#ifdef DEBUG
std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: ran out of data\n"; std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: ran out of data\n";
#endif
return DataBuf(); return DataBuf();
} }

@ -37,6 +37,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "sigmamn.hpp" #include "sigmamn.hpp"
#include "makernote.hpp" #include "makernote.hpp"
#include "value.hpp" #include "value.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -62,31 +63,78 @@ namespace Exiv2 {
// Sigma (Foveon) MakerNote Tag Info // Sigma (Foveon) MakerNote Tag Info
const TagInfo SigmaMakerNote::tagInfo_[] = { const TagInfo SigmaMakerNote::tagInfo_[] = {
TagInfo(0x0002, "SerialNumber", "SerialNumber", "Camera serial number", sigmaIfdId, makerTags, asciiString, printValue), TagInfo(0x0002, "SerialNumber", N_("Serial Number"),
TagInfo(0x0003, "DriveMode", "DriveMode", "Drive Mode", sigmaIfdId, makerTags, asciiString, printValue), N_("Camera serial number"),
TagInfo(0x0004, "ResolutionMode", "ResolutionMode", "Resolution Mode", sigmaIfdId, makerTags, asciiString, printValue), sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x0005, "AutofocusMode", "AutofocusMode", "Autofocus mode", sigmaIfdId, makerTags, asciiString, printValue), TagInfo(0x0003, "DriveMode", N_("Drive Mode"),
TagInfo(0x0006, "FocusSetting", "FocusSetting", "Focus setting", sigmaIfdId, makerTags, asciiString, printValue), N_("Drive mode"),
TagInfo(0x0007, "WhiteBalance", "WhiteBalance", "White balance", sigmaIfdId, makerTags, asciiString, printValue), sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x0008, "ExposureMode", "ExposureMode", "Exposure mode", sigmaIfdId, makerTags, asciiString, print0x0008), TagInfo(0x0004, "ResolutionMode", N_("Resolution Mode"),
TagInfo(0x0009, "MeteringMode", "MeteringMode", "Metering mode", sigmaIfdId, makerTags, asciiString, print0x0009), N_("Resolution mode"), sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x000a, "LensRange", "LensRange", "Lens focal length range", sigmaIfdId, makerTags, asciiString, printValue), TagInfo(0x0005, "AutofocusMode", N_("Autofocus Mode"),
TagInfo(0x000b, "ColorSpace", "ColorSpace", "Color space", sigmaIfdId, makerTags, asciiString, printValue), N_("Autofocus mode"),
TagInfo(0x000c, "Exposure", "Exposure", "Exposure", sigmaIfdId, makerTags, asciiString, printStripLabel), sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x000d, "Contrast", "Contrast", "Contrast", sigmaIfdId, makerTags, asciiString, printStripLabel), TagInfo(0x0006, "FocusSetting", N_("Focus Setting"),
TagInfo(0x000e, "Shadow", "Shadow", "Shadow", sigmaIfdId, makerTags, asciiString, printStripLabel), N_("Focus setting"),
TagInfo(0x000f, "Highlight", "Highlight", "Highlight", sigmaIfdId, makerTags, asciiString, printStripLabel), sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x0010, "Saturation", "Saturation", "Saturation", sigmaIfdId, makerTags, asciiString, printStripLabel), TagInfo(0x0007, "WhiteBalance", N_("White Balance"),
TagInfo(0x0011, "Sharpness", "Sharpness", "Sharpness", sigmaIfdId, makerTags, asciiString, printStripLabel), N_("White balance"),
TagInfo(0x0012, "FillLight", "FillLight", "X3 Fill light", sigmaIfdId, makerTags, asciiString, printStripLabel), sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x0014, "ColorAdjustment", "ColorAdjustment", "Color adjustment", sigmaIfdId, makerTags, asciiString, printStripLabel), TagInfo(0x0008, "ExposureMode", N_("Exposure Mode"),
TagInfo(0x0015, "AdjustmentMode", "AdjustmentMode", "Adjustment mode", sigmaIfdId, makerTags, asciiString, printValue), N_("Exposure mode"),
TagInfo(0x0016, "Quality", "Quality", "Quality", sigmaIfdId, makerTags, asciiString, printStripLabel), sigmaIfdId, makerTags, asciiString, print0x0008),
TagInfo(0x0017, "Firmware", "Firmware", "Firmware", sigmaIfdId, makerTags, asciiString, printValue), TagInfo(0x0009, "MeteringMode", N_("Metering Mode"),
TagInfo(0x0018, "Software", "Software", "Software", sigmaIfdId, makerTags, asciiString, printValue), N_("Metering mode"),
TagInfo(0x0019, "AutoBracket", "AutoBracket", "Auto bracket", sigmaIfdId, makerTags, asciiString, printValue), sigmaIfdId, makerTags, asciiString, print0x0009),
TagInfo(0x000a, "LensRange", N_("Lens Range"),
N_("Lens focal length range"),
sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x000b, "ColorSpace", N_("Color Space"),
N_("Color space"),
sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x000c, "Exposure", N_("Exposure"),
N_("Exposure"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x000d, "Contrast", N_("Contrast"),
N_("Contrast"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x000e, "Shadow", N_("Shadow"),
N_("Shadow"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x000f, "Highlight", N_("Highlight"),
N_("Highlight"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x0010, "Saturation", N_("Saturation"),
N_("Saturation"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x0011, "Sharpness", N_("Sharpness"),
N_("Sharpness"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x0012, "FillLight", N_("Fill Light"),
N_("X3 Fill light"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x0014, "ColorAdjustment", N_("Color Adjustment"),
N_("Color adjustment"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x0015, "AdjustmentMode", N_("Adjustment Mode"),
N_("Adjustment mode"),
sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x0016, "Quality", N_("Quality"),
N_("Quality"),
sigmaIfdId, makerTags, asciiString, printStripLabel),
TagInfo(0x0017, "Firmware", N_("Firmware"),
N_("Firmware"),
sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x0018, "Software", N_("Software"),
N_("Software"),
sigmaIfdId, makerTags, asciiString, printValue),
TagInfo(0x0019, "AutoBracket", N_("Auto Bracket"),
N_("Auto bracket"),
sigmaIfdId, makerTags, asciiString, printValue),
// End of list marker // End of list marker
TagInfo(0xffff, "(UnknownSigmaMakerNoteTag)", "(UnknownSigmaMakerNoteTag)", "Unknown SigmaMakerNote tag", sigmaIfdId, makerTags, invalidTypeId, printValue) TagInfo(0xffff, "(UnknownSigmaMakerNoteTag)", "(UnknownSigmaMakerNoteTag)",
N_("Unknown SigmaMakerNote tag"),
sigmaIfdId, makerTags, invalidTypeId, printValue)
}; };
const TagInfo* SigmaMakerNote::tagList() const TagInfo* SigmaMakerNote::tagList()
@ -177,10 +225,10 @@ namespace Exiv2 {
const Value& value) const Value& value)
{ {
switch (value.toString()[0]) { switch (value.toString()[0]) {
case 'P': os << "Program"; break; case 'P': os << _("Program"); break;
case 'A': os << "Aperture priority"; break; case 'A': os << _("Aperture priority"); break;
case 'S': os << "Shutter priority"; break; case 'S': os << _("Shutter priority"); break;
case 'M': os << "Manual"; break; case 'M': os << _("Manual"); break;
default: os << "(" << value << ")"; break; default: os << "(" << value << ")"; break;
} }
return os; return os;
@ -190,9 +238,9 @@ namespace Exiv2 {
const Value& value) const Value& value)
{ {
switch (value.toString()[0]) { switch (value.toString()[0]) {
case 'A': os << "Average"; break; case 'A': os << _("Average"); break;
case 'C': os << "Center"; break; case 'C': os << _("Center"); break;
case '8': os << "8-Segment"; break; case '8': os << _("8-Segment"); break;
default: os << "(" << value << ")"; break; default: os << "(" << value << ")"; break;
} }
return os; return os;

@ -34,6 +34,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "sonymn.hpp" #include "sonymn.hpp"
#include "makernote.hpp" #include "makernote.hpp"
#include "value.hpp" #include "value.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -58,17 +59,37 @@ namespace Exiv2 {
// Sony MakerNote Tag Info // Sony MakerNote Tag Info
const TagInfo SonyMakerNote::tagInfo_[] = { const TagInfo SonyMakerNote::tagInfo_[] = {
TagInfo(0x2000, "0x2000", "0x2000", "Unknown", sonyIfdId, makerTags, undefined, printValue), TagInfo(0x2000, "0x2000", "0x2000",
TagInfo(0x9001, "0x9001", "0x9001", "Unknown", sonyIfdId, makerTags, undefined, printValue), N_("Unknown"),
TagInfo(0x9002, "0x9002", "0x9002", "Unknown", sonyIfdId, makerTags, undefined, printValue), sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9003, "0x9003", "0x9003", "Unknown", sonyIfdId, makerTags, undefined, printValue), TagInfo(0x9001, "0x9001", "0x9001",
TagInfo(0x9004, "0x9004", "0x9004", "Unknown", sonyIfdId, makerTags, undefined, printValue), N_("Unknown"),
TagInfo(0x9005, "0x9005", "0x9005", "Unknown", sonyIfdId, makerTags, undefined, printValue), sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9006, "0x9006", "0x9006", "Unknown", sonyIfdId, makerTags, undefined, printValue), TagInfo(0x9002, "0x9002", "0x9002",
TagInfo(0x9007, "0x9007", "0x9007", "Unknown", sonyIfdId, makerTags, undefined, printValue), N_("Unknown"),
TagInfo(0x9008, "0x9008", "0x9008", "Unknown", sonyIfdId, makerTags, undefined, printValue), sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9003, "0x9003", "0x9003",
N_("Unknown"),
sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9004, "0x9004", "0x9004",
N_("Unknown"),
sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9005, "0x9005", "0x9005",
N_("Unknown"),
sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9006, "0x9006", "0x9006",
N_("Unknown"),
sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9007, "0x9007", "0x9007",
N_("Unknown"),
sonyIfdId, makerTags, undefined, printValue),
TagInfo(0x9008, "0x9008", "0x9008",
N_("Unknown"),
sonyIfdId, makerTags, undefined, printValue),
// End of list marker // End of list marker
TagInfo(0xffff, "(UnknownSonyMakerNoteTag)", "Unknown SonyMakerNote tag", "Unknown SonyMakerNote tag", sonyIfdId, makerTags, invalidTypeId, printValue) TagInfo(0xffff, "(UnknownSonyMakerNoteTag)", "(UnknownSonyMakerNoteTag)",
N_("Unknown SonyMakerNote tag"),
sonyIfdId, makerTags, invalidTypeId, printValue)
}; };
const TagInfo* SonyMakerNote::tagList() const TagInfo* SonyMakerNote::tagList()

File diff suppressed because it is too large Load Diff

@ -142,7 +142,7 @@ namespace Exiv2 {
{ {
const TagDetails* td = find(array, value.toLong()); const TagDetails* td = find(array, value.toLong());
if (td) { if (td) {
os << td->label_; os << exvGettext(td->label_);
} }
else { else {
os << "(" << value << ")"; os << "(" << value << ")";
@ -168,10 +168,10 @@ namespace Exiv2 {
if (val & td->mask_) { if (val & td->mask_) {
if (sep) { if (sep) {
os << ", " << td->label_; os << ", " << exvGettext(td->label_);
} }
else { else {
os << td->label_; os << exvGettext(td->label_);
sep = true; sep = true;
} }
} }

@ -42,6 +42,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "image.hpp" #include "image.hpp"
#include "error.hpp" #include "error.hpp"
#include "futils.hpp" #include "futils.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -202,12 +203,12 @@ namespace Exiv2 {
void TiffHeade2::print(std::ostream& os, const std::string& prefix) const void TiffHeade2::print(std::ostream& os, const std::string& prefix) const
{ {
os << prefix os << prefix
<< "Header, offset = 0x" << std::setw(8) << std::setfill('0') << _("Header, offset") << " = 0x" << std::setw(8) << std::setfill('0')
<< std::hex << std::right << offset_; << std::hex << std::right << offset_;
switch (byteOrder_) { switch (byteOrder_) {
case littleEndian: os << ", little endian encoded"; break; case littleEndian: os << ", " << _("little endian encoded"); break;
case bigEndian: os << ", big endian encoded"; break; case bigEndian: os << ", " << _("big endian encoded"); break;
case invalidByteOrder: break; case invalidByteOrder: break;
} }
os << "\n"; os << "\n";

@ -45,6 +45,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "value.hpp" #include "value.hpp"
#include "image.hpp" #include "image.hpp"
#include "jpgimage.hpp" #include "jpgimage.hpp"
#include "i18n.h" // NLS support.
// + standard includes // + standard includes
#include <string> #include <string>
@ -316,9 +317,9 @@ namespace Exiv2 {
{ {
printTiffEntry(object, prefix()); printTiffEntry(object, prefix());
if (object->pValue()) { if (object->pValue()) {
os_ << prefix() << "Data area " os_ << prefix() << _("Data area") << " "
<< object->pValue()->sizeDataArea() << object->pValue()->sizeDataArea()
<< " bytes.\n"; << " " << _("bytes.\n");
} }
} // TiffPrinter::visitEntry } // TiffPrinter::visitEntry
@ -331,11 +332,11 @@ namespace Exiv2 {
{ {
assert(object != 0); assert(object != 0);
os_ << prefix() << object->groupName() << " directory with " os_ << prefix() << object->groupName() << " " << _("directory with") << " "
// cast to make MSVC happy // cast to make MSVC happy
<< std::dec << static_cast<unsigned int>(object->components_.size()); << std::dec << static_cast<unsigned int>(object->components_.size());
if (object->components_.size() == 1) os_ << " entry:\n"; if (object->components_.size() == 1) os_ << " " << _("entry:\n");
else os_ << " entries:\n"; else os_ << " " << _("entries:\n");
incIndent(); incIndent();
} // TiffPrinter::visitDirectory } // TiffPrinter::visitDirectory
@ -344,8 +345,8 @@ namespace Exiv2 {
{ {
decIndent(); decIndent();
if (object->hasNext()) { if (object->hasNext()) {
if (object->pNext_) os_ << prefix() << "Next directory:\n"; if (object->pNext_) os_ << prefix() << _("Next directory:\n");
else os_ << prefix() << "No next directory\n"; else os_ << prefix() << _("No next directory\n");
} }
} // TiffPrinter::visitDirectoryNext } // TiffPrinter::visitDirectoryNext
@ -356,14 +357,14 @@ namespace Exiv2 {
void TiffPrinter::visitSubIfd(TiffSubIfd* object) void TiffPrinter::visitSubIfd(TiffSubIfd* object)
{ {
os_ << prefix() << "Sub-IFD "; os_ << prefix() << _("Sub-IFD") << " ";
printTiffEntry(object); printTiffEntry(object);
} // TiffPrinter::visitSubIfd } // TiffPrinter::visitSubIfd
void TiffPrinter::visitMnEntry(TiffMnEntry* object) void TiffPrinter::visitMnEntry(TiffMnEntry* object)
{ {
if (!object->mn_) printTiffEntry(object, prefix()); if (!object->mn_) printTiffEntry(object, prefix());
else os_ << prefix() << "Makernote "; else os_ << prefix() << _("Makernote") << " ";
} // TiffPrinter::visitMnEntry } // TiffPrinter::visitMnEntry
void TiffPrinter::visitIfdMakernote(TiffIfdMakernote* /*object*/) void TiffPrinter::visitIfdMakernote(TiffIfdMakernote* /*object*/)
@ -377,13 +378,13 @@ namespace Exiv2 {
assert(object != 0); assert(object != 0);
os_ << px << object->groupName() os_ << px << object->groupName()
<< " tag 0x" << std::setw(4) << std::setfill('0') << " " << _("tag") << " 0x" << std::setw(4) << std::setfill('0')
<< std::hex << std::right << object->tag() << std::hex << std::right << object->tag()
<< ", type " << TypeInfo::typeName(object->typeId()) << ", " << _("type") << " " << TypeInfo::typeName(object->typeId())
<< ", " << std::dec << object->count() << " component"; << ", " << std::dec << object->count() << " "<< _("component");
if (object->count() > 1) os_ << "s"; if (object->count() > 1) os_ << "s";
os_ << " in " << object->size() << " bytes"; os_ << " in " << object->size() << " " << _("bytes");
if (object->size() > 4) os_ << ", offset " << object->offset(); if (object->size() > 4) os_ << ", " << _("offset") << " " << object->offset();
os_ << "\n"; os_ << "\n";
const Value* vp = object->pValue(); const Value* vp = object->pValue();
if (vp && vp->count() < 100) os_ << prefix() << *vp; if (vp && vp->count() < 100) os_ << prefix() << *vp;
@ -399,8 +400,8 @@ namespace Exiv2 {
printTiffEntry(object, prefix()); printTiffEntry(object, prefix());
} }
else { else {
os_ << prefix() << "Array Entry " << object->groupName() os_ << prefix() << _("Array Entry") << " " << object->groupName()
<< " tag 0x" << std::setw(4) << std::setfill('0') << " " << _("tag") << " 0x" << std::setw(4) << std::setfill('0')
<< std::hex << std::right << object->tag() << "\n"; << std::hex << std::right << object->tag() << "\n";
} }
} // TiffPrinter::visitArrayEntry } // TiffPrinter::visitArrayEntry

@ -32,6 +32,7 @@ EXIV2_RCSID("@(#) $Id$")
// ***************************************************************************** // *****************************************************************************
// included header files // included header files
#include "types.hpp" #include "types.hpp"
#include "i18n.h" // for _exvGettext
// + standard includes // + standard includes
#include <string> #include <string>
@ -334,4 +335,30 @@ namespace Exiv2 {
return rc; return rc;
} // exifTime } // exifTime
const char* exvGettext(const char* str)
{
#ifdef EXV_ENABLE_NLS
return _exvGettext(str);
#else
return str;
#endif
}
} // namespace Exiv2 } // namespace Exiv2
#ifdef EXV_ENABLE_NLS
// Declaration is in i18n.h
const char* _exvGettext(const char* str)
{
static bool exvGettextInitialized = false;
if (!exvGettextInitialized) {
bindtextdomain(EXV_PACKAGE, EXV_LOCALEDIR);
# ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset (EXV_PACKAGE, "UTF-8");
# endif
exvGettextInitialized = true;
}
return dgettext(EXV_PACKAGE, str);
}
#endif // EXV_ENABLE_NLS

@ -311,6 +311,12 @@ namespace Exiv2 {
*/ */
int exifTime(const char* buf, struct tm* tm); int exifTime(const char* buf, struct tm* tm);
/*!
@brief Translate a string using the gettext framework. This wrapper hides
all the implementation details from the interface.
*/
const char* exvGettext(const char* str);
// ***************************************************************************** // *****************************************************************************
// template and inline definitions // template and inline definitions

Loading…
Cancel
Save