Switch to using the gettext build machinery

This adds two automatically maintained English variants that handle
quote substitution in onrder to provide smart quotes.
merge-requests/1/head
Olaf Meeuwissen 2016-06-26 08:49:14 +09:00
rodzic 0286bf46fc
commit c676acbe47
11 zmienionych plików z 195 dodań i 800 usunięć

Wyświetl plik

@ -60,13 +60,16 @@ AM_PROG_AR
LT_INIT([disable-static win32-dll]) LT_INIT([disable-static win32-dll])
LT_PREREQ([2.4.2]) LT_PREREQ([2.4.2])
dnl *****************************************************************
dnl Set up I18N/L10N support
dnl *****************************************************************
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18.1])
dnl *********************************************************************** dnl ***********************************************************************
dnl Checks for programs. dnl Checks for programs.
dnl *********************************************************************** dnl ***********************************************************************
AC_PATH_PROG(SANE_CONFIG_PATH, sane-config, no) AC_PATH_PROG(SANE_CONFIG_PATH, sane-config, no)
AC_PATH_PROG(MSGFMT, msgfmt$EXEEXT, no)
AC_PATH_PROG(XGETTEXT, xgettext$EXEEXT, no)
AC_PATH_PROG(MSGMERGE, msgmerge$EXEEXT, no)
AC_PATH_PROG(LATEX, latex$EXEEXT, no) AC_PATH_PROG(LATEX, latex$EXEEXT, no)
AC_PATH_PROG(DVIPS, dvips$EXEEXT, no) AC_PATH_PROG(DVIPS, dvips$EXEEXT, no)
AC_PATH_PROG(MAKEINDEX, makeindex$EXEEXT, no) AC_PATH_PROG(MAKEINDEX, makeindex$EXEEXT, no)
@ -782,7 +785,7 @@ AC_SUBST(DISTCLEAN_FILES)
AC_CONFIG_FILES([Makefile lib/Makefile sanei/Makefile frontend/Makefile \ AC_CONFIG_FILES([Makefile lib/Makefile sanei/Makefile frontend/Makefile \
japi/Makefile backend/Makefile include/Makefile doc/Makefile \ japi/Makefile backend/Makefile include/Makefile doc/Makefile \
po/Makefile testsuite/Makefile testsuite/sanei/Makefile testsuite/tools/Makefile \ po/Makefile.in testsuite/Makefile testsuite/sanei/Makefile testsuite/tools/Makefile \
tools/Makefile doc/doxygen-sanei.conf doc/doxygen-genesys.conf]) tools/Makefile doc/doxygen-sanei.conf doc/doxygen-genesys.conf])
AC_CONFIG_FILES([tools/sane-config], [chmod a+x tools/sane-config]) AC_CONFIG_FILES([tools/sane-config], [chmod a+x tools/sane-config])
AC_CONFIG_FILES([tools/sane-backends.pc]) AC_CONFIG_FILES([tools/sane-backends.pc])

8
po/.gitignore vendored
Wyświetl plik

@ -1,3 +1,11 @@
*.gmo
*.mo *.mo
.tmp .tmp
Makefile.in
Makevars.template
POTFILES
en@*quot.insert-header
en@*quot.po
remove-potcdate.sed
sane-backends.pot sane-backends.pot
stamp-po

Wyświetl plik

@ -4,6 +4,8 @@ bg
cs cs
da da
de de
en@boldquot
en@quot
en_GB en_GB
eo eo
es es

Wyświetl plik

@ -1,83 +0,0 @@
## Makefile.am -- an automake template for Makefile.in file
## Copyright (C) 2009 Chris Bagwell and Sane Developers.
##
## This file is part of the "Sane" build infra-structure. See
## included LICENSE file for license information.
# See po/README for documentation.
GETTEXT_PACKAGE = $(PACKAGE)
TMP_FILE_DIR = .tmp
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo ""; fi)
SRC_FILES=$(shell if test -r $(srcdir)/POTFILES; then grep -v "^\#" $(srcdir)/POTFILES; else echo ""; fi)
PO_FILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
MO_FILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.mo "; done)
EXTRA_DIST = README LINGUAS POTFILES
EXTRA_DIST += $(PO_FILES)
if ENABLE_TRANSLATIONS
EXTRA_DIST += $(GETTEXT_PACKAGE).pot
INSTALL_TRANSLATIONS = install-translations
UNINSTALL_TRANSLATIONS = uninstall-translations
ALL = all-mos
else
INSTALL_TRANSLATIONS =
UNINSTALL_TRANSLATIONS =
ALL =
endif
all: $(ALL)
all-mos: $(MO_FILES)
.po.mo:
@echo "generating $@ from $^"
@$(MSGFMT) -o $@ $^
install-translations:
@for lang in $(PO_LINGUAS) ; do \
dir=$(localedir)/$${lang}/LC_MESSAGES ; \
echo "installing sane-backends $${lang}.mo to $${dir}/$(GETTEXT_PACKAGE).mo..." ; \
$(mkinstalldirs) $(DESTDIR)$${dir} && \
$(INSTALL_DATA) $${lang}.mo $(DESTDIR)$${dir}/$(GETTEXT_PACKAGE).mo ; \
done
install-data-local: $(INSTALL_TRANSLATIONS)
uninstall-translations:
@for lang in $(PO_LINGUAS) ; do \
dir=$(localedir)/$${lang}/LC_MESSAGES ; \
echo removing $${dir}/$(GETTEXT_PACKAGE).mo ; \
rm -f $(DESTDIR)$${dir}/$(GETTEXT_PACKAGE).mo ; \
done
uninstall-local: $(UNINSTALL_TRANSLATIONS)
clean-local:
rm -f *.mo
rm -f *.old
rm -f *.pot
$(GETTEXT_PACKAGE).pot: $(SRC_FILES)
@echo "creating $@ from $^"
@$(XGETTEXT) -d$(GETTEXT_PACKAGE) -kSANE_I18N --flag=SANE_I18N:1:no-c-format -f $(srcdir)/POTFILES -D$(srcdir)
@mv $(GETTEXT_PACKAGE).po $(GETTEXT_PACKAGE).pot
update: $(GETTEXT_PACKAGE).pot
@for lang in $(PO_LINGUAS) ; do \
pofile=$(srcdir)/$${lang}.po ; \
if test ! -f $${pofile} ; then \
echo "creating $${pofile}" ; \
cp template.po $${pofile} ; \
fi ; \
echo "updating $${pofile}" ; \
cp $${pofile} $${pofile}.old ; \
$(MSGMERGE) -w75 $${pofile}.old $< -o $${pofile} ; \
rm -f $${pofile}.old template.po ; \
done

Wyświetl plik

@ -1,552 +0,0 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# See po/README for documentation.
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_TRANSLATIONS_TRUE@am__append_1 = $(GETTEXT_PACKAGE).pot
subdir = po
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/mkinstalldirs README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/byteorder.m4 \
$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/sane/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISTCLEAN_FILES = @DISTCLEAN_FILES@
DLLTOOL = @DLLTOOL@
DL_LIBS = @DL_LIBS@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DVIPS = @DVIPS@
DYNAMIC_FLAG = @DYNAMIC_FLAG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GPHOTO2_CPPFLAGS = @GPHOTO2_CPPFLAGS@
GPHOTO2_LDFLAGS = @GPHOTO2_LDFLAGS@
GPHOTO2_LIBS = @GPHOTO2_LIBS@
GREP = @GREP@
HAVE_GPHOTO2 = @HAVE_GPHOTO2@
IEEE1284_LIBS = @IEEE1284_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LOCKPATH = @INSTALL_LOCKPATH@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JPEG_LIBS = @JPEG_LIBS@
LATEX = @LATEX@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBUSB_1_0_CFLAGS = @LIBUSB_1_0_CFLAGS@
LIBUSB_1_0_LIBS = @LIBUSB_1_0_LIBS@
LIBV4L_CFLAGS = @LIBV4L_CFLAGS@
LIBV4L_LIBS = @LIBV4L_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LOCKPATH_GROUP = @LOCKPATH_GROUP@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MATH_LIB = @MATH_LIB@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PNG_LIBS = @PNG_LIBS@
PRELOADABLE_BACKENDS = @PRELOADABLE_BACKENDS@
PRELOADABLE_BACKENDS_ENABLED = @PRELOADABLE_BACKENDS_ENABLED@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
RESMGR_LIBS = @RESMGR_LIBS@
SANEI_SANEI_JPEG_LO = @SANEI_SANEI_JPEG_LO@
SANE_CONFIG_PATH = @SANE_CONFIG_PATH@
SCSI_LIBS = @SCSI_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CONFIG_PATH = @SNMP_CONFIG_PATH@
SNMP_LIBS = @SNMP_LIBS@
SOCKET_LIBS = @SOCKET_LIBS@
STRICT_LDFLAGS = @STRICT_LDFLAGS@
STRIP = @STRIP@
SYSLOG_LIBS = @SYSLOG_LIBS@
SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
SYSTEMD_LIBS = @SYSTEMD_LIBS@
TIFF_LIBS = @TIFF_LIBS@
USB_LIBS = @USB_LIBS@
VERSION = @VERSION@
V_MAJOR = @V_MAJOR@
V_MINOR = @V_MINOR@
V_REV = @V_REV@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
configdir = @configdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
effective_target = @effective_target@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
locksanedir = @locksanedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
GETTEXT_PACKAGE = $(PACKAGE)
TMP_FILE_DIR = .tmp
PO_LINGUAS = $(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo ""; fi)
SRC_FILES = $(shell if test -r $(srcdir)/POTFILES; then grep -v "^\#" $(srcdir)/POTFILES; else echo ""; fi)
PO_FILES = $(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
MO_FILES = $(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.mo "; done)
EXTRA_DIST = README LINGUAS POTFILES $(PO_FILES) $(am__append_1)
@ENABLE_TRANSLATIONS_FALSE@INSTALL_TRANSLATIONS =
@ENABLE_TRANSLATIONS_TRUE@INSTALL_TRANSLATIONS = install-translations
@ENABLE_TRANSLATIONS_FALSE@UNINSTALL_TRANSLATIONS =
@ENABLE_TRANSLATIONS_TRUE@UNINSTALL_TRANSLATIONS = uninstall-translations
@ENABLE_TRANSLATIONS_FALSE@ALL =
@ENABLE_TRANSLATIONS_TRUE@ALL = all-mos
all: all-am
.SUFFIXES:
.SUFFIXES: .mo .po
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu po/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
clean-local cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-local
all: $(ALL)
all-mos: $(MO_FILES)
.po.mo:
@echo "generating $@ from $^"
@$(MSGFMT) -o $@ $^
install-translations:
@for lang in $(PO_LINGUAS) ; do \
dir=$(localedir)/$${lang}/LC_MESSAGES ; \
echo "installing sane-backends $${lang}.mo to $${dir}/$(GETTEXT_PACKAGE).mo..." ; \
$(mkinstalldirs) $(DESTDIR)$${dir} && \
$(INSTALL_DATA) $${lang}.mo $(DESTDIR)$${dir}/$(GETTEXT_PACKAGE).mo ; \
done
install-data-local: $(INSTALL_TRANSLATIONS)
uninstall-translations:
@for lang in $(PO_LINGUAS) ; do \
dir=$(localedir)/$${lang}/LC_MESSAGES ; \
echo removing $${dir}/$(GETTEXT_PACKAGE).mo ; \
rm -f $(DESTDIR)$${dir}/$(GETTEXT_PACKAGE).mo ; \
done
uninstall-local: $(UNINSTALL_TRANSLATIONS)
clean-local:
rm -f *.mo
rm -f *.old
rm -f *.pot
$(GETTEXT_PACKAGE).pot: $(SRC_FILES)
@echo "creating $@ from $^"
@$(XGETTEXT) -d$(GETTEXT_PACKAGE) -kSANE_I18N --flag=SANE_I18N:1:no-c-format -f $(srcdir)/POTFILES -D$(srcdir)
@mv $(GETTEXT_PACKAGE).po $(GETTEXT_PACKAGE).pot
update: $(GETTEXT_PACKAGE).pot
@for lang in $(PO_LINGUAS) ; do \
pofile=$(srcdir)/$${lang}.po ; \
if test ! -f $${pofile} ; then \
echo "creating $${pofile}" ; \
cp template.po $${pofile} ; \
fi ; \
echo "updating $${pofile}" ; \
cp $${pofile} $${pofile}.old ; \
$(MSGMERGE) -w75 $${pofile}.old $< -o $${pofile} ; \
rm -f $${pofile}.old template.po ; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

45
po/Makevars 100644
Wyświetl plik

@ -0,0 +1,45 @@
# Makevars -- snippet for inclusion in po/ -*- Makefile -*-
# Copyright (C) 2016 Olaf Meeuwissen and the SANE developers
#
# This file is part of the SANE build infra-structure. See the
# included LICENSE file for license information.
# Message domain to use.
# Normally this is the same as the $(PACKAGE_TARNAME), but note that
# gettext does not support that variable (last checked for 0.18.1).
DOMAIN = $(PACKAGE)
# Copyright holder for the messages in the $(DOMAIN).pot file.
# This is the (set of) copyright holder(s) of files listed in the
# POTFILES.in file (insofar they contributed translatable strings).
# The translators are expected to transfer the copyright for their
# translations to the $(COPYRIGHT_HOLDER)(s), or to disclaim their
# copyright thereby putting their strings in the public domain.
COPYRIGHT_HOLDER = The SANE developers
# Where to report problems with translatable strings, that is, the
# strings in $(DOMAIN).pot or those that really should be in there.
MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT)
# Directory locations.
# The $(top_builddir) should be relative to the directory that holds
# this Makevars file. The $(subdir) ought to be set such that a `cd
# $(top_builddir)/$(subdir)` has no effect (assuming no symlinks in
# the path).
top_builddir = ..
subdir = po
# Options to pass to xgettext and other gettext utilities.
# Additional options may also by specified using AM_XGETTEXT_OPTION
# in `$(top_srcdir)/configure.ac`. See Makefile.in.in and Rules-*
# for variables available
XGETTEXT_OPTIONS = --keyword=SANE_I18N
XGETTEXT_OPTIONS += --flag=SANE_I18N:1:no-c-format
MSGMERGE_OPTIONS = --width=75
# Locale categories, in addition to LC_MESSAGES, for which message
# catalogs are to be used.
EXTRA_LOCALE_CATEGORIES =
EXTRA_DIST = README
EXTRA_DIST += Rules-automake

Wyświetl plik

@ -1,41 +0,0 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --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 = Free Software Foundation, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS =
# 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 =

Wyświetl plik

@ -1,111 +0,0 @@
# List of source files containing translatable strings
# paths relative to po
../include/sane/saneopts.h
../backend/sane_strstatus.c
../backend/artec_eplus48u.c
../backend/avision.h
../backend/canon630u.c
../backend/canon.c
../backend/canon-sane.c
../backend/canon_dr.c
../backend/canon_dr.h
../backend/cardscan.c
../backend/cardscan.h
../backend/epjitsu.c
../backend/epjitsu.h
../backend/epson.c
../backend/epson.h
../backend/epson2.c
../backend/epson2.h
../backend/fujitsu.c
../backend/fujitsu.h
../backend/genesys.c
../backend/gt68xx.c
../backend/gt68xx_low.h
../backend/hp3500.c
../backend/hp3900_sane.c
../backend/hp5400_sane.c
../backend/hp5590.c
../backend/hp-option.c
../backend/hp-option.h
../backend/kodak.c
../backend/kodak.h
../backend/kvs1025.h
../backend/kvs1025_opt.c
../backend/kvs20xx.c
../backend/kvs20xx_opt.c
../backend/kvs40xx.c
../backend/kvs40xx_opt.c
../backend/leo.c
../backend/leo.h
../backend/lexmark.c
../backend/ma1509.c
../backend/magicolor.c
../backend/matsushita.c
../backend/matsushita.h
../backend/microtek2.c
../backend/microtek2.h
../backend/mustek.c
../backend/mustek_usb.c
../backend/mustek_usb2.c
../backend/niash.c
../backend/pixma.c
../backend/pixma_sane_options.c
../backend/plustek.c
../backend/plustek_pp.c
../backend/pnm.c
../backend/rts8891.c
../backend/sceptre.c
../backend/sceptre.h
../backend/sm3840.c
../backend/snapscan.c
../backend/snapscan-options.c
../backend/stv680.c
../backend/stv680.h
../backend/teco1.c
../backend/teco1.h
../backend/teco2.c
../backend/teco2.h
../backend/teco3.c
../backend/teco3.h
../backend/test.c
../backend/u12.c
../backend/umax1220u.c
../backend/umax.c
../backend/umax_pp.c

111
po/POTFILES.in 100644
Wyświetl plik

@ -0,0 +1,111 @@
# List of source files containing translatable strings
# paths relative to the top source directory
include/sane/saneopts.h
backend/sane_strstatus.c
backend/artec_eplus48u.c
backend/avision.h
backend/canon630u.c
backend/canon.c
backend/canon-sane.c
backend/canon_dr.c
backend/canon_dr.h
backend/cardscan.c
backend/cardscan.h
backend/epjitsu.c
backend/epjitsu.h
backend/epson.c
backend/epson.h
backend/epson2.c
backend/epson2.h
backend/fujitsu.c
backend/fujitsu.h
backend/genesys.c
backend/gt68xx.c
backend/gt68xx_low.h
backend/hp3500.c
backend/hp3900_sane.c
backend/hp5400_sane.c
backend/hp5590.c
backend/hp-option.c
backend/hp-option.h
backend/kodak.c
backend/kodak.h
backend/kvs1025.h
backend/kvs1025_opt.c
backend/kvs20xx.c
backend/kvs20xx_opt.c
backend/kvs40xx.c
backend/kvs40xx_opt.c
backend/leo.c
backend/leo.h
backend/lexmark.c
backend/ma1509.c
backend/magicolor.c
backend/matsushita.c
backend/matsushita.h
backend/microtek2.c
backend/microtek2.h
backend/mustek.c
backend/mustek_usb.c
backend/mustek_usb2.c
backend/niash.c
backend/pixma.c
backend/pixma_sane_options.c
backend/plustek.c
backend/plustek_pp.c
backend/pnm.c
backend/rts8891.c
backend/sceptre.c
backend/sceptre.h
backend/sm3840.c
backend/snapscan.c
backend/snapscan-options.c
backend/stv680.c
backend/stv680.h
backend/teco1.c
backend/teco1.h
backend/teco2.c
backend/teco2.h
backend/teco3.c
backend/teco3.h
backend/test.c
backend/u12.c
backend/umax1220u.c
backend/umax.c
backend/umax_pp.c

Wyświetl plik

@ -17,7 +17,7 @@ Example for German: export LANG=de_DE ; xsane
Translators: I want to update existing translations Translators: I want to update existing translations
--------------------------------------------------- ---------------------------------------------------
* cd po ; make update * cd po ; make update-po
* Edit lang.po, add/change translations. (with lang = your * Edit lang.po, add/change translations. (with lang = your
language, e.g. "de"). You need an editor that is capable of using the language, e.g. "de"). You need an editor that is capable of using the
encoding UTF8 (unicode). encoding UTF8 (unicode).
@ -28,8 +28,8 @@ Translators: I want to update existing translations
Translators: I want to add a new language Translators: I want to add a new language
----------------------------------------- -----------------------------------------
* Edit po/LINGUAS, add your language to ALL_LINGUAS. * Add the language code to po/LINGUAS
* Run automake -OR- update po/Makefile.in accordingly by hand. * automake (if you have not enabled maintainer mode)
* ./configure * ./configure
* Go ahead with "I want to update existing translations". * Go ahead with "I want to update existing translations".
@ -45,7 +45,7 @@ Backend developers: I want to add internationalization support for my backend
already done in saneopts.h. already done in saneopts.h.
Examples: s->opt[5].title = SANE_I18N("Enhancement"); Examples: s->opt[5].title = SANE_I18N("Enhancement");
#define STANDARD_FORMAT SANE_I18N("a4 Paper") #define STANDARD_FORMAT SANE_I18N("a4 Paper")
* Edit po/POTFILES. Add all source code files that contain strings marked * Edit po/POTFILES.in. Add all source code files that contain strings marked
by SANE_I18N() to that file. by SANE_I18N() to that file.
* If you want to also add a new language, see above. * If you want to also add a new language, see above.
* ./configure * ./configure
@ -63,8 +63,3 @@ Frontend developers: I want to add internationalization support for my frontend
backward compatibility, frontends may want to check for these files, also. backward compatibility, frontends may want to check for these files, also.
* As mentioned above, GNU gettext is used. * As mentioned above, GNU gettext is used.
* With other NLS implementations, converting the mo files may work. * With other NLS implementations, converting the mo files may work.
Bugs:
- Using sed to include macros into *.pot isn't nice.

18
po/Rules-automake 100644
Wyświetl plik

@ -0,0 +1,18 @@
# Rules-automake -- wants but Makefile.in.in does not provide
# Copyright (C) 2016 Olaf Meeuwissen and the SANE developers
#
# This file is part of the SANE build infra-structure. See the
# included LICENSE file for license information.
# Automake assumes a number of "standard" targets are available when
# it runs a recursive make. We provide empty stubs for those rules
# that gettext's Makefile.in.in does not provide yet (last checked
# against gettext-0.18.1).
EMPTY_AUTOMAKE_TARGETS = install-dvi
EMPTY_AUTOMAKE_TARGETS += install-html
EMPTY_AUTOMAKE_TARGETS += install-info
EMPTY_AUTOMAKE_TARGETS += install-ps
EMPTY_AUTOMAKE_TARGETS += install-pdf
.PHONY: $(EMPTY_AUTOMAKE_TARGETS)
$(EMPTY_AUTOMAKE_TARGETS):