libtranslate-0.99 000777 001750 001750 00000000000 10176431053 015622 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/data 000777 001750 001750 00000000000 10176431051 016531 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/data/Makefile.am 000644 001750 001750 00000000566 10172237632 020654 0 ustar 00jylefort jylefort 000000 000000 pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libtranslate.pc
if WITH_GENERIC
pkgdata_in_files = services.xml.in
pkgdata_DATA = services.dtd services.xml
endif
@INTLTOOL_XML_NOMERGE_RULE@
DISTCLEANFILES = \
libtranslate.pc \
services.xml
EXTRA_DIST = \
iso639-2 \
rfc3066.sh \
services.dtd \
services.xml.in
dist-hook:
xmllint --noout --valid services.xml
libtranslate-0.99/data/Makefile.in 000644 001750 001750 00000032333 10176430637 020666 0 ustar 00jylefort jylefort 000000 000000 # Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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@
subdir = data
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/libtranslate.pc.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/talkfilters.m4 \
$(top_srcdir)/acinclude.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)/config.h
CONFIG_CLEAN_FILES = libtranslate.pc
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(pkgdatadir)"
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
pkgdataDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pkgconfig_DATA) $(pkgdata_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
HTML_DIR = @HTML_DIR@
ICONV = @ICONV@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML_CFLAGS = @LIBXML_CFLAGS@
LIBXML_LIBS = @LIBXML_LIBS@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOUP_CFLAGS = @SOUP_CFLAGS@
SOUP_LIBS = @SOUP_LIBS@
STRIP = @STRIP@
TALKFILTERS_CFLAGS = @TALKFILTERS_CFLAGS@
TALKFILTERS_LIBS = @TALKFILTERS_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GENERIC_FALSE = @WITH_GENERIC_FALSE@
WITH_GENERIC_TRUE = @WITH_GENERIC_TRUE@
WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
WITH_TALKFILTERS_FALSE = @WITH_TALKFILTERS_FALSE@
WITH_TALKFILTERS_TRUE = @WITH_TALKFILTERS_TRUE@
XGETTEXT = @XGETTEXT@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
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@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libtranslate.pc
@WITH_GENERIC_TRUE@pkgdata_in_files = services.xml.in
@WITH_GENERIC_TRUE@pkgdata_DATA = services.dtd services.xml
DISTCLEANFILES = \
libtranslate.pc \
services.xml
EXTRA_DIST = \
iso639-2 \
rfc3066.sh \
services.dtd \
services.xml.in
all: all-am
.SUFFIXES:
$(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 \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign data/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
libtranslate.pc: $(top_builddir)/config.status $(srcdir)/libtranslate.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
$(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
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 mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-pkgconfigDATA install-pkgdataDATA
install-exec-am:
install-info: install-info-am
install-man:
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-info-am uninstall-pkgconfigDATA \
uninstall-pkgdataDATA
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
dist-hook distclean distclean-generic distclean-libtool \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-pkgconfigDATA install-pkgdataDATA install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am uninstall-pkgconfigDATA \
uninstall-pkgdataDATA
@INTLTOOL_XML_NOMERGE_RULE@
dist-hook:
xmllint --noout --valid services.xml
# 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:
libtranslate-0.99/data/libtranslate.pc.in 000644 001750 001750 00000000417 10165776315 022240 0 ustar 00jylefort jylefort 000000 000000 prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/libtranslate
Name: @PACKAGE@
Description: a natural language translation library
Version: @VERSION@
Requires: gobject-2.0 gthread-2.0
Cflags: -I${includedir}
Libs: -L${libdir} -ltranslate
libtranslate-0.99/data/iso639-2 000644 001750 001750 00000034750 10166104657 017743 0 ustar 00jylefort jylefort 000000 000000 aar||aa|Afar|afar
abk||ab|Abkhazian|abkhaze
ace|||Achinese|aceh
ach|||Acoli|acoli
ada|||Adangme|adangme
ady|||Adyghe; Adygei|adyghe
afa|||Afro-Asiatic (Other)|afro-asiatiques, autres langues
afh|||Afrihili|afrihili
afr||af|Afrikaans|afrikaans
aka||ak|Akan|akan
akk|||Akkadian|akkadien
alb|sqi|sq|Albanian|albanais
alb|sqi|sq|Albanian|albanais
ale|||Aleut|aléoute
alg|||Algonquian languages|algonquines, langues
amh||am|Amharic|amharique
ang|||English, Old (ca.450-1100)|anglo-saxon (ca.450-1100)
apa|||Apache languages|apache
ara||ar|Arabic|arabe
arc|||Aramaic|araméen
arg||an|Aragonese|aragonais
arm|hye|hy|Armenian|arménien
arm|hye|hy|Armenian|arménien
arn|||Araucanian|araucan
arp|||Arapaho|arapaho
art|||Artificial (Other)|artificielles, autres langues
arw|||Arawak|arawak
asm||as|Assamese|assamais
ast|||Asturian; Bable|asturien; bable
ath|||Athapascan languages|athapascanes, langues
aus|||Australian languages|australiennes, langues
ava||av|Avaric|avar
ave||ae|Avestan|avestique
awa|||Awadhi|awadhi
aym||ay|Aymara|aymara
aze||az|Azerbaijani|azéri
bad|||Banda|banda
bai|||Bamileke languages|bamilékés, langues
bak||ba|Bashkir|bachkir
bal|||Baluchi|baloutchi
bam||bm|Bambara|bambara
ban|||Balinese|balinais
baq|eus|eu|Basque|basque
baq|eus|eu|Basque|basque
bas|||Basa|basa
bat|||Baltic (Other)|baltiques, autres langues
bej|||Beja|bedja
bel||be|Belarusian|biélorusse
bem|||Bemba|bemba
ben||bn|Bengali|bengali
ber|||Berber (Other)|berbères, autres langues
bho|||Bhojpuri|bhojpuri
bih||bh|Bihari|bihari
bik|||Bikol|bikol
bin|||Bini|bini
bis||bi|Bislama|bichlamar
bla|||Siksika|blackfoot
bnt|||Bantu (Other)|bantoues, autres langues
bos||bs|Bosnian|bosniaque
bra|||Braj|braj
bre||br|Breton|breton
btk|||Batak (Indonesia)|batak (Indonésie)
bua|||Buriat|bouriate
bug|||Buginese|bugi
bul||bg|Bulgarian|bulgare
bur|mya|my|Burmese|birman
bur|mya|my|Burmese|birman
byn|||Blin; Bilin|blin; bilen
cad|||Caddo|caddo
cai|||Central American Indian (Other)|indiennes d'Amérique centrale, autres langues
car|||Carib|caribe
cat||ca|Catalan; Valencian|catalan; valencien
cau|||Caucasian (Other)|caucasiennes, autres langues
ceb|||Cebuano|cebuano
cel|||Celtic (Other)|celtiques, autres langues
cha||ch|Chamorro|chamorro
chb|||Chibcha|chibcha
che||ce|Chechen|tchétchène
chg|||Chagatai|djaghataï
chi|zho|zh|Chinese|chinois
chi|zho|zh|Chinese|chinois
chk|||Chuukese|chuuk
chm|||Mari|mari
chn|||Chinook jargon|chinook, jargon
cho|||Choctaw|choctaw
chp|||Chipewyan|chipewyan
chr|||Cherokee|cherokee
chu||cu|Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic|slavon d'église; vieux slave; slavon liturgique; vieux bulgare
chv||cv|Chuvash|tchouvache
chy|||Cheyenne|cheyenne
cmc|||Chamic languages|chames, langues
cop|||Coptic|copte
cor||kw|Cornish|cornique
cos||co|Corsican|corse
cpe|||Creoles and pidgins, English based (Other)|créoles et pidgins anglais, autres
cpf|||Creoles and pidgins, French-based (Other)|créoles et pidgins français, autres
cpp|||Creoles and pidgins, Portuguese-based (Other)|créoles et pidgins portugais, autres
cre||cr|Cree|cree
crh|||Crimean Tatar; Crimean Turkish|tatar de Crimé
crp|||Creoles and pidgins (Other)|créoles et pidgins divers
csb|||Kashubian|kachoube
cus|||Cushitic (Other)|couchitiques, autres langues
cze|ces|cs|Czech|tchèque
cze|ces|cs|Czech|tchèque
dak|||Dakota|dakota
dan||da|Danish|danois
dar|||Dargwa|dargwa
day|||Dayak|dayak
del|||Delaware|delaware
den|||Slave (Athapascan)|esclave (athapascan)
dgr|||Dogrib|dogrib
din|||Dinka|dinka
div||dv|Divehi|maldivien
doi|||Dogri|dogri
dra|||Dravidian (Other)|dravidiennes, autres langues
dsb|||Lower Sorbian|bas-sorabe
dua|||Duala|douala
dum|||Dutch, Middle (ca.1050-1350)|néerlandais moyen (ca. 1050-1350)
dut|nld|nl|Dutch; Flemish|néerlandais; flamand
dut|nld|nl|Dutch; Flemish|néerlandais; flamand
dyu|||Dyula|dioula
dzo||dz|Dzongkha|dzongkha
efi|||Efik|efik
egy|||Egyptian (Ancient)|égyptien
eka|||Ekajuk|ekajuk
elx|||Elamite|élamite
eng||en|English|anglais
enm|||English, Middle (1100-1500)|anglais moyen (1100-1500)
epo||eo|Esperanto|espéranto
est||et|Estonian|estonien
ewe||ee|Ewe|éwé
ewo|||Ewondo|éwondo
fan|||Fang|fang
fao||fo|Faroese|féroïen
fat|||Fanti|fanti
fij||fj|Fijian|fidjien
fil|||Filipino; Pilipino|filipino; pilipino
fin||fi|Finnish|finnois
fiu|||Finno-Ugrian (Other)|finno-ougriennes, autres langues
fon|||Fon|fon
fre|fra|fr|French|français
frm|||French, Middle (ca.1400-1800)|français moyen (1400-1800)
fro|||French, Old (842-ca.1400)|français ancien (842-ca.1400)
fry||fy|Frisian|frison
ful||ff|Fulah|peul
fur|||Friulian|frioulan
gaa|||Ga|ga
gay|||Gayo|gayo
gba|||Gbaya|gbaya
gem|||Germanic (Other)|germaniques, autres langues
geo|kat|ka|Georgian|géorgien
geo|kat|ka|Georgian|géorgien
ger|deu|de|German|allemand
ger|deu|de|German|allemand
gez|||Geez|guèze
gil|||Gilbertese|kiribati
gla||gd|Gaelic; Scottish Gaelic|gaélique; gaélique écossais
gle||ga|Irish|irlandais
glg||gl|Gallegan|galicien
glv||gv|Manx|manx; mannois
gmh|||German, Middle High (ca.1050-1500)|allemand, moyen haut (ca. 1050-1500)
goh|||German, Old High (ca.750-1050)|allemand, vieux haut (ca. 750-1050)
gon|||Gondi|gond
gor|||Gorontalo|gorontalo
got|||Gothic|gothique
grb|||Grebo|grebo
grc|||Greek, Ancient (to 1453)|grec ancien (jusqu'à 1453)
gre|ell|el|Greek, Modern (1453-)|grec moderne (après 1453)
gre|ell|el|Greek, Modern (1453-)|grec moderne (après 1453)
grn||gn|Guarani|guarani
guj||gu|Gujarati|goudjrati
gwi|||Gwich´in|gwich´in
hai|||Haida|haida
hat||ht|Haitian; Haitian Creole|haïtien; créole haïtien
hau||ha|Hausa|haoussa
haw|||Hawaiian|hawaïen
heb||he|Hebrew|hébreu
her||hz|Herero|herero
hil|||Hiligaynon|hiligaynon
him|||Himachali|himachali
hin||hi|Hindi|hindi
hit|||Hittite|hittite
hmn|||Hmong|hmong
hmo||ho|Hiri Motu|hiri motu
hsb|||Upper Sorbian|haut-sorabe
hun||hu|Hungarian|hongrois
hup|||Hupa|hupa
iba|||Iban|iban
ibo||ig|Igbo|igbo
ice|isl|is|Icelandic|islandais
ice|isl|is|Icelandic|islandais
ido||io|Ido|ido
iii||ii|Sichuan Yi|yi de Sichuan
ijo|||Ijo|ijo
iku||iu|Inuktitut|inuktitut
ile||ie|Interlingue|interlingue
ilo|||Iloko|ilocano
ina||ia|Interlingua (International Auxiliary Language Association)|interlingua (langue auxiliaire internationale)
inc|||Indic (Other)|indo-aryennes, autres langues
ind||id|Indonesian|indonésien
ine|||Indo-European (Other)|indo-européennes, autres langues
inh|||Ingush|ingouche
ipk||ik|Inupiaq|inupiaq
ira|||Iranian (Other)|iraniennes, autres langues
iro|||Iroquoian languages|iroquoises, langues (famille)
ita||it|Italian|italien
jav||jv|Javanese|javanais
jbo|||Lojban|lojban
jpn||ja|Japanese|japonais
jpr|||Judeo-Persian|judéo-persan
jrb|||Judeo-Arabic|judéo-arabe
kaa|||Kara-Kalpak|karakalpak
kab|||Kabyle|kabyle
kac|||Kachin|kachin
kal||kl|Kalaallisut; Greenlandic|groenlandais
kam|||Kamba|kamba
kan||kn|Kannada|kannada
kar|||Karen|karen
kas||ks|Kashmiri|kashmiri
kau||kr|Kanuri|kanouri
kaw|||Kawi|kawi
kaz||kk|Kazakh|kazakh
kbd|||Kabardian|kabardien
kha|||Khasi|khasi
khi|||Khoisan (Other)|khoisan, autres langues
khm||km|Khmer|khmer
kho|||Khotanese|khotanais
kik||ki|Kikuyu; Gikuyu|kikuyu
kin||rw|Kinyarwanda|rwanda
kir||ky|Kirghiz|kirghize
kmb|||Kimbundu|kimbundu
kok|||Konkani|konkani
kom||kv|Komi|kom
kon||kg|Kongo|kongo
kor||ko|Korean|coréen
kos|||Kosraean|kosrae
kpe|||Kpelle|kpellé
krc|||Karachay-Balkar|karatchai balkar
kro|||Kru|krou
kru|||Kurukh|kurukh
kua||kj|Kuanyama; Kwanyama|kuanyama; kwanyama
kum|||Kumyk|koumyk
kur||ku|Kurdish|kurde
kut|||Kutenai|kutenai
lad|||Ladino|judéo-espagnol
lah|||Lahnda|lahnda
lam|||Lamba|lamba
lao||lo|Lao|lao
lat||la|Latin|latin
lav||lv|Latvian|letton
lez|||Lezghian|lezghien
lim||li|Limburgan; Limburger; Limburgish|limbourgeois
lin||ln|Lingala|lingala
lit||lt|Lithuanian|lituanien
lol|||Mongo|mongo
loz|||Lozi|lozi
ltz||lb|Luxembourgish; Letzeburgesch|luxembourgeois
lua|||Luba-Lulua|luba-lulua
lub||lu|Luba-Katanga|luba-katanga
lug||lg|Ganda|ganda
lui|||Luiseno|luiseno
lun|||Lunda|lunda
luo|||Luo (Kenya and Tanzania)|luo (Kenya et Tanzanie)
lus|||lushai|Lushai
mac|mkd|mk|Macedonian|macédonien
mac|mkd|mk|Macedonian|macédonien
mad|||Madurese|madourais
mag|||Magahi|magahi
mah||mh|Marshallese|marshall
mai|||Maithili|maithili
mak|||Makasar|makassar
mal||ml|Malayalam|malayalam
man|||Mandingo|mandingue
mao|mri|mi|Maori|maori
mao|mri|mi|Maori|maori
map|||Austronesian (Other)|malayo-polynésiennes, autres langues
mar||mr|Marathi|marathe
mas|||Masai|massaï
may|msa|ms|Malay|malais
may|msa|ms|Malay|malais
mdf|||Moksha|moksa
mdr|||Mandar|mandar
men|||Mende|mendé
mga|||Irish, Middle (900-1200)|irlandais moyen (900-1200)
mic|||Mi'kmaq; Micmac|mi'kmaq; micmac
min|||Minangkabau|minangkabau
mis|||Miscellaneous languages|diverses, langues
mkh|||Mon-Khmer (Other)|môn-khmer, autres langues
mlg||mg|Malagasy|malgache
mlt||mt|Maltese|maltais
mnc|||Manchu|mandchou
mni|||Manipuri|manipuri
mno|||Manobo languages|manobo, langues
moh|||Mohawk|mohawk
mol||mo|Moldavian|moldave
mon||mn|Mongolian|mongol
mos|||Mossi|moré
mul|||Multiple languages|multilingue
mun|||Munda languages|mounda, langues
mus|||Creek|muskogee
mwl|||Mirandese|mirandais
mwr|||Marwari|marvari
myn|||Mayan languages|maya, langues
myv|||Erzya|erza
nah|||Nahuatl|nahuatl
nai|||North American Indian|indiennes d'Amérique du Nord, autres langues
nap|||Neapolitan|napolitain
nau||na|Nauru|nauruan
nav||nv|Navajo; Navaho|navaho
nbl||nr|Ndebele, South; South Ndebele|ndébélé du Sud
nde||nd|Ndebele, North; North Ndebele|ndébélé du Nord
ndo||ng|Ndonga|ndonga
nds|||Low German; Low Saxon; German, Low; Saxon, Low|bas allemand; bas saxon; allemand, bas; saxon, bas
nep||ne|Nepali|népalais
new|||Nepal Bhasa; Newari|nepal bhasa; newari
nia|||Nias|nias
nic|||Niger-Kordofanian (Other)|nigéro-congolaises, autres langues
niu|||Niuean|niué
nno||nn|Norwegian Nynorsk|norvégien nynorsk
nob||nb|Norwegian Bokmål|norvégien bokmål
nog|||Nogai|nogaï; nogay
non|||Norse, Old|norrois, vieux
nor||no|Norwegian|norvégien
nso|||Northern Sotho; Pedi; Sepedi|sotho du Nord; pedi; sepedi
nub|||Nubian languages|nubiennes, langues
nwc|||Classical Newari; Old Newari; Classical Nepal Bhasa|newari classique
nya||ny|Chichewa; Chewa; Nyanja|chichewa; chewa; nyanja
nym|||Nyamwezi|nyamwezi
nyn|||Nyankole|nyankolé
nyo|||Nyoro|nyoro
nzi|||Nzima|nzema
oci||oc|Occitan (post 1500); Provençal|occitan (après 1500); provençal
oji||oj|Ojibwa|ojibwa
ori||or|Oriya|oriya
orm||om|Oromo|galla
osa|||Osage|osage
oss||os|Ossetian; Ossetic|ossète
ota|||Turkish, Ottoman (1500-1928)|turc ottoman (1500-1928)
oto|||Otomian languages|otomangue, langues
paa|||Papuan (Other)|papoues, autres langues
pag|||Pangasinan|pangasinan
pal|||Pahlavi|pahlavi
pam|||Pampanga|pampangan
pan||pa|Panjabi; Punjabi|pendjabi
pap|||Papiamento|papiamento
pau|||Palauan|palau
peo|||Persian, Old (ca.600-400 B.C.)|perse, vieux (ca. 600-400 av. J.-C.)
per|fas|fa|Persian|persan
per|fas|fa|Persian|persan
phi|||Philippine (Other)|philippines, autres langues
phn|||Phoenician|phénicien
pli||pi|Pali|pali
pol||pl|Polish|polonais
pon|||Pohnpeian|pohnpei
por||pt|Portuguese|portugais
pra|||Prakrit languages|prâkrit
pro|||Provençal, Old (to 1500)|provençal ancien (jusqu'à 1500)
pus||ps|Pushto|pachto
qaa-qtz |||Reserved for local use|réservée à l'usage local
que||qu|Quechua|quechua
raj|||Rajasthani|rajasthani
rap|||Rapanui|rapanui
rar|||Rarotongan|rarotonga
roa|||Romance (Other)|romanes, autres langues
roh||rm|Raeto-Romance|rhéto-roman
rom|||Romany|tsigane
rum|ron|ro|Romanian|roumain
run||rn|Rundi|rundi
rus||ru|Russian|russe
sad|||Sandawe|sandawe
sag||sg|Sango|sango
sah|||Yakut|iakoute
sai|||South American Indian (Other)|indiennes d'Amérique du Sud, autres langues
sal|||Salishan languages|salish, langues
sam|||Samaritan Aramaic|samaritain
san||sa|Sanskrit|sanskrit
sas|||Sasak|sasak
sat|||Santali|santal
scc|srp|sr|Serbian|serbe
scc|srp|sr|Serbian|serbe
scn|||Sicilian|sicilien
sco|||Scots|écossais
scr|hrv|hr|Croatian|croate
scr|hrv|hr|Croatian|croate
sel|||Selkup|selkoupe
sem|||Semitic (Other)|sémitiques, autres langues
sga|||Irish, Old (to 900)|irlandais ancien (jusqu'à 900)
sgn|||Sign Languages|langues des signes
shn|||Shan|chan
sid|||Sidamo|sidamo
sin||si|Sinhala; Sinhalese|singhalais
sio|||Siouan languages|sioux, langues
sit|||Sino-Tibetan (Other)|sino-tibétaines, autres langues
sla|||Slavic (Other)|slaves, autres langues
slo|slk|sk|Slovak|slovaque
slv||sl|Slovenian|slovène
sma|||Southern Sami|sami du Sud
sme||se|Northern Sami|sami du Nord
smi|||Sami languages (Other)|sami, autres langues
smj|||Lule Sami|sami de Lule
smn|||Inari Sami|sami d'Inari
smo||sm|Samoan|samoan
sms|||Skolt Sami|sami skolt
sna||sn|Shona|shona
snd||sd|Sindhi|sindhi
snk|||Soninke|soninké
sog|||Sogdian|sogdien
som||so|Somali|somali
son|||Songhai|songhai
sot||st|Sotho, Southern|sotho du Sud
spa||es|Spanish; Castilian|espagnol; castillan
srd||sc|Sardinian|sarde
srr|||Serer|sérère
ssa|||Nilo-Saharan (Other)|nilo-sahariennes, autres langues
ssw||ss|Swati|swati
suk|||Sukuma|sukuma
sun||su|Sundanese|soundanais
sus|||Susu|soussou
sux|||Sumerian|sumérien
swa||sw|Swahili|swahili
swe||sv|Swedish|suédois
syr|||Syriac|syriaque
tah||ty|Tahitian|tahitien
tai|||Tai (Other)|thaïes, autres langues
tam||ta|Tamil|tamoul
tat||tt|Tatar|tatar
tel||te|Telugu|télougou
tem|||Timne|temne
ter|||Tereno|tereno
tet|||Tetum|tetum
tgk||tg|Tajik|tadjik
tgl||tl|Tagalog|tagalog
tha||th|Thai|thaï
tib|bod|bo|Tibetan|tibétain
tib|bod|bo|Tibetan|tibétain
tig|||Tigre|tigré
tir||ti|Tigrinya|tigrigna
tiv|||Tiv|tiv
tkl|||Tokelau|tokelau
tlh|||Klingon; tlhIngan-Hol|klingon
tli|||Tlingit|tlingit
tmh|||Tamashek|tamacheq
tog|||Tonga (Nyasa)|tonga (Nyasa)
ton||to|Tonga (Tonga Islands)|tongan (Îles Tonga)
tpi|||Tok Pisin|tok pisin
tsi|||Tsimshian|tsimshian
tsn||tn|Tswana|tswana
tso||ts|Tsonga|tsonga
tuk||tk|Turkmen|turkmène
tum|||Tumbuka|tumbuka
tup|||Tupi languages|tupi, langues
tur||tr|Turkish|turc
tut|||Altaic (Other)|altaïques, autres langues
tvl|||Tuvalu|tuvalu
twi||tw|Twi|twi
tyv|||Tuvinian|touva
udm|||Udmurt|oudmourte
uga|||Ugaritic|ougaritique
uig||ug|Uighur; Uyghur|ouïgour
ukr||uk|Ukrainian|ukrainien
umb|||Umbundu|umbundu
und|||Undetermined|indéterminée
urd||ur|Urdu|ourdou
uzb||uz|Uzbek|ouszbek
vai|||Vai|vaï
ven||ve|Venda|venda
vie||vi|Vietnamese|vietnamien
vol||vo|Volapük|volapük
vot|||Votic|vote
wak|||Wakashan languages|wakashennes, langues
wal|||Walamo|walamo
war|||Waray|waray
was|||Washo|washo
wel|cym|cy|Welsh|gallois
wel|cym|cy|Welsh|gallois
wen|||Sorbian languages|sorabes, langues
wln||wa|Walloon|wallon
wol||wo|Wolof|wolof
xal|||Kalmyk|kalmouk
xho||xh|Xhosa|xhosa
yao|||Yao|yao
yap|||Yapese|yapois
yid||yi|Yiddish|yiddish
yor||yo|Yoruba|yoruba
ypk|||Yupik languages|yupik, langues
zap|||Zapotec|zapotèque
zen|||Zenaga|zenaga
zha||za|Zhuang; Chuang|zhuang; chuang
znd|||Zande|zandé
zul||zu|Zulu|zoulou
zun|||Zuni|zuni
libtranslate-0.99/data/rfc3066.sh 000755 001750 001750 00000004005 10172766146 020247 0 ustar 00jylefort jylefort 000000 000000 #!/bin/sh
#
# rfc3066.sh - convert the ISO639-2 language table to a RFC 3066 table
#
# Copyright (C) 2005 Jean-Yves Lefort
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Jean-Yves Lefort nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
IFS="|"
uniq | while read alpha3_bibliographic alpha3_terminologic alpha2 english_name french_name; do
# use rules from RFC 3066 2.3
if [ -n "$alpha2" ]; then
tag="$alpha2"
elif [ -n "$alpha3_terminologic" ]; then
tag="$alpha3_terminologic"
elif [ -n "$alpha3_bibliographic" ]; then
tag="$alpha3_bibliographic"
else
tag=""
fi
[ -n "$tag" ] && echo "$tag|$english_name|$french_name"
done
libtranslate-0.99/data/services.dtd 000644 001750 001750 00000005613 10172766606 021146 0 ustar 00jylefort jylefort 000000 000000
libtranslate-0.99/data/services.xml.in 000644 001750 001750 00000026545 10172766703 021605 0 ustar 00jylefort jylefort 000000 000000
libtranslate-0.99/docs 000777 001750 001750 00000000000 10176431055 016554 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/man 000777 001750 001750 00000000000 10176431054 017326 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/man/Makefile.am 000644 001750 001750 00000001146 10172242124 021431 0 ustar 00jylefort jylefort 000000 000000 if WITH_GENERIC
services_xml_5 = services.xml.5
endif
man_MANS = translate.1 $(services_xml_5)
translate.1: translate.1.xml
xsltproc /usr/local/share/xsl/docbook/manpages/docbook.xsl $<
services.xml.5.in: services.xml.5.xml
xsltproc /usr/local/share/xsl/docbook/manpages/docbook.xsl $<
mv services.xml.5 services.xml.5.in
services.xml.5: services.xml.5.in
sed -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@
MAINTAINERCLEANFILES = translate.1 services.xml.5.in
DISTCLEANFILES = version.xml
CLEANFILES = services.xml.5
EXTRA_DIST = \
services.xml.5.in \
services.xml.5.xml \
translate.1.xml \
translate.1
libtranslate-0.99/docs/man/Makefile.in 000644 001750 001750 00000035424 10176430640 021456 0 ustar 00jylefort jylefort 000000 000000 # Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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@
subdir = docs/man
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/version.xml.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/talkfilters.m4 \
$(top_srcdir)/acinclude.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)/config.h
CONFIG_CLEAN_FILES = version.xml
SOURCES =
DIST_SOURCES =
man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"
man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
HTML_DIR = @HTML_DIR@
ICONV = @ICONV@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML_CFLAGS = @LIBXML_CFLAGS@
LIBXML_LIBS = @LIBXML_LIBS@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOUP_CFLAGS = @SOUP_CFLAGS@
SOUP_LIBS = @SOUP_LIBS@
STRIP = @STRIP@
TALKFILTERS_CFLAGS = @TALKFILTERS_CFLAGS@
TALKFILTERS_LIBS = @TALKFILTERS_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GENERIC_FALSE = @WITH_GENERIC_FALSE@
WITH_GENERIC_TRUE = @WITH_GENERIC_TRUE@
WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
WITH_TALKFILTERS_FALSE = @WITH_TALKFILTERS_FALSE@
WITH_TALKFILTERS_TRUE = @WITH_TALKFILTERS_TRUE@
XGETTEXT = @XGETTEXT@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
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@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
@WITH_GENERIC_TRUE@services_xml_5 = services.xml.5
man_MANS = translate.1 $(services_xml_5)
MAINTAINERCLEANFILES = translate.1 services.xml.5.in
DISTCLEANFILES = version.xml
CLEANFILES = services.xml.5
EXTRA_DIST = \
services.xml.5.in \
services.xml.5.xml \
translate.1.xml \
translate.1
all: all-am
.SUFFIXES:
$(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 \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/man/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign docs/man/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
version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
*) ext='1' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
done
uninstall-man1:
@$(NORMAL_UNINSTALL)
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
*) ext='1' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
install-man5: $(man5_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)"
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.5*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
5*) ;; \
*) ext='5' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
done
uninstall-man5:
@$(NORMAL_UNINSTALL)
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.5*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
5*) ;; \
*) ext='5' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$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 $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-man
install-exec-am:
install-info: install-info-am
install-man: install-man1 install-man5
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-info-am uninstall-man
uninstall-man: uninstall-man1 uninstall-man5
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-man1 \
install-man5 install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-info-am \
uninstall-man uninstall-man1 uninstall-man5
translate.1: translate.1.xml
xsltproc /usr/local/share/xsl/docbook/manpages/docbook.xsl $<
services.xml.5.in: services.xml.5.xml
xsltproc /usr/local/share/xsl/docbook/manpages/docbook.xsl $<
mv services.xml.5 services.xml.5.in
services.xml.5: services.xml.5.in
sed -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@
# 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:
libtranslate-0.99/docs/man/version.xml.in 000644 001750 001750 00000000011 10165037537 022213 0 ustar 00jylefort jylefort 000000 000000 @VERSION@ libtranslate-0.99/docs/man/services.xml.5.in 000644 001750 001750 00000022335 10176431013 022516 0 ustar 00jylefort jylefort 000000 000000 .\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "SERVICES.XML" 5 "January 15, 2005" "libtranslate 0.99" "services.xml Manual"
.SH NAME
services.xml \- libtranslate generic service definitions
.SH "DESCRIPTION"
.PP
The \fIservices\&.xml\fR file contains translation service definitions for the libtranslate generic module\&.
.PP
The generic module provides an abstract framework for supporting web\-based translation services\&.
.PP
When the generic module is initialized, it reads service definitions from the \fIservices\&.xml\fR files located in \fI@pkgdatadir@\fR and \fI~/\&.libtranslate\fR, creates the services defined in these files, and makes them available to libtranslate\&.
.PP
The \fIservices\&.xml\fR file must be encoded in UTF\-8, and conform to the \fIservices\&.xml\fR Document Type Definition, located in \fI@pkgdatadir@/services\&.dtd\fR\&.
.SH "ELEMENTS"
.SS "services"
.TP
Description
The services element is the root of the document, and may contains service definitions and language mappings\&.
.TP
Children
These elements may occur zero or more times in services: custom\-language, service\&.
.SS "custom-language"
.TP
Description
The custom\-language element maps a RFC 3066 language tag to a language name\&.
.RS
.Sh "Note"
Some RFC 3066 tag to name mappings are built into libtranslate and do not need to be added (see the Built\-In RFC 3066 Tag to Name Mappings appendix in the libtranslate Reference Manual)\&.
.RE
.TP
Attributes
.RS
.TP
\fItag\fR (required)
The RFC 3066 language tag\&.
.TP
\fIname\fR (required)
The language human\-readable name\&.
.RE
.IP
.TP
Parents
This element contains custom\-language: services\&.
.SS "service"
.TP
Description
The service element defines a translation service\&.
.TP
Attributes
.RS
.TP
\fIname\fR (required)
The service symbolic name, encoded in ASCII\&.
.TP
\fInick\fR (implied, default: \fIname\fR)
The service human\-readable name\&.
.TP
\fImax\-chunk\-len\fR (optional, default: 1000)
The maximum length of an input chunk, in characters (0 means unlimited)\&.
.RE
.IP
.TP
Parents
This element contains service: services\&.
.TP
Children
This element may occur zero or more times in service: group\&.
.SS "group"
.TP
Description
The group element defines a translation group (a group represents a set of languages and translation methods)\&.
.TP
Parents
This element contains group: service\&.
.TP
Children
These elements may occur zero or more times in group: language, http\-header\&.
These elements may occur zero or one time in group: text\-translation, web\-page\-translation\&.
.SS "language"
.TP
Description
The language element adds a language to the list of languages supported by a group\&.
.TP
Attributes
.RS
.TP
\fItag\fR (required)
The RFC 3066 language tag\&.
.TP
\fIservice\-tag\fR (implied, default: \fItag\fR)
The language service\-specific tag\&. This tag is not exposed to libtranslate, but is available as \fIfrom\fR and \fIto\fR variables (see Variable Substitution)\&.
.TP
\fIto\fR (optional, default: none)
A comma\-separated list of RFC 3066 language tags this language can be translated into\&. The special list element * means "every language of this group but this one"\&.
.RE
.IP
.TP
Parents
This element contains language: group\&.
.SS "http-header"
.TP
Description
The http\-header element adds a HTTP header to the list of headers that are set when a HTTP request is issued\&.
If the http\-header element occurs inside a group element, the header is added for text and web page translations\&.
If it occurs inside a text\-translation or web\-page\-translation element, the header is only added for a text or web page translation, respectively\&.
.TP
Attributes
.RS
.TP
\fIname\fR (required)
The HTTP header name\&.
.TP
\fIvalue\fR (required)
The HTTP header value\&.
.RE
.IP
.TP
Parents
These elements contain http\-header: group, text\-translation, web\-page\-translation\&.
.SS "text-translation"
.TP
Description
The presence of the text\-translation element specifies that the group can translate text\&.
.TP
Attributes
.RS
.TP
\fIurl\fR (required)
The URL to use for translating text\&. Variable substitution is performed on the URL (see Variable Substitution)\&.
.TP
\fIpost\fR (optional, default: none)
If this attribute is present, a HTTP POST request is issued (using the attribute value as post data)\&. Otherwise, a HTTP GET request is issued\&. Variable substitution is performed on the post data (see Variable Substitution)\&.
.RE
.IP
.TP
Parents
This element contains text\-translation: group\&.
.TP
Children
These element may occur zero or more times in text\-translation: http\-header, pre\-marker, error\-marker\&.
This element may occur zero or one time in text\-translation: post\-marker\&.
.SS "pre-marker"
.TP
Description
The pre\-marker element is used to extract the translated text from the response to a text translation request\&.
For each pre\-marker element, the parser locates \fItext\fR in the server response\&. If \fItext\fR is found, the parser moves to the character following \fItext\fR\&. If it is not found, the translation fails\&. The translated text starts at the character following the last pre\-marker match\&. If no pre\-marker element is specified, the translated text starts at the first character of the server response\&.
.TP
Attributes
.RS
.TP
\fItext\fR (required)
The text to match\&.
.RE
.IP
.TP
Parents
This element contains pre\-marker: text\-translation\&.
.SS "post-marker"
.TP
Description
The post\-marker element is used to extract the translated text from the response to a text translation request\&.
If \fItext\fR can be located in the server response, the translated text ends at the character preceding \fItext\fR\&. Otherwise, the translation fails\&. If no post\-marker element is specified, the translated text ends at the last character of the server response\&.
.TP
Attributes
.RS
.TP
\fItext\fR (required)
The text to match\&.
.RE
.IP
.TP
Parents
This element contains post\-marker: text\-translation\&.
.SS "error-marker"
.TP
Description
The error\-marker element is used to check if a text translation error has occurred\&.
If one or more error\-marker elements are specified and the \fItext\fR of any of them can be located anywhere in the server response, the translation fails\&.
.TP
Attributes
.RS
.TP
\fItext\fR (required)
The text to match\&.
.RE
.IP
.TP
Parents
This element contains error\-marker: text\-translation\&.
.SS "web-page-translation"
.TP
Description
The presence of the web\-page\-translation element specifies that the group can translate a web page\&.
If no http\-header element is specified and if \fIpost\fR is not specified, the generic module does not need to connect to the server\&. In this case, \fIurl\fR is returned as the URL of the translated web page\&. Otherwise, the generic module connects to the server, issues a HTTP GET or POST request, saves the response to a local file, and returns a file:// URL pointing to that file\&.
.TP
Attributes
.RS
.TP
\fIurl\fR (required)
The URL to use for translating a web page\&. Variable substitution is performed on the URL (see Variable Substitution)\&.
.TP
\fIpost\fR (optional, default: none)
If this attribute is present, a HTTP POST request is issued (using the attribute value as post data)\&. Otherwise, a HTTP GET request is issued (or no request at all, see above)\&. Variable substitution is performed on the post data (see Variable Substitution)\&.
.RE
.IP
.TP
Parents
This element contains web\-page\-translation: group\&.
.TP
Children
This element may occur zero or more times in web\-page\-translation: http\-header\&.
.SH "VARIABLE SUBSTITUTION"
.PP
Variable substitution is performed at translation time on the \fIurl\fR and \fIpost\fR attributes of the text\-translation and web\-page\-translation elements\&.
.PP
A variable has the syntax ${\fIvarname\fR[:\fImodifiers\fR]}\&.
.PP
\fIvarname\fR may be any of the following variables:
.TP
\fItext\fR (text\-translation only)
The text to translate\&.
.TP
\fIurl\fR (web\-page\-translation only)
The URL of the web page to translate\&.
.TP
\fIfrom\fR
The source language service tag\&.
.TP
\fIto\fR
The destination language service tag\&.
.TP
\fItime\fR
The number of seconds since 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal Time\&.
.PP
\fImodifiers\fR is a comma\-separated list of modifiers\&. Each modifier is applied (in the specified order) on the contents of the variable\&. A modifier has the syntax \fIname\fR[=\fIvalue\fR]\&.
.PP
\fIname\fR may be any of the following modifiers:
.TP
escape
Escapes the unsafe characters in the variable using URI percent notation\&.
.TP
charset
Converts the variable from UTF\-8 (the libtranslate character set) to the character set \fIvalue\fR\&.
.SH "FILES"
.TP
\fI@pkgdatadir@/services\&.xml\fR
.PP
The system\-wide service definitions\&.
.TP
\fI~/\&.libtranslate/services\&.xml\fR
.PP
The user service definitions\&.
.TP
\fI@pkgdatadir@/services\&.dtd\fR
.PP
The \fIservices\&.xml\fR Document Type Definition\&.
.SH "SEE ALSO"
.PP
The libtranslate Reference Manual
.SH AUTHOR
Jean\-Yves Lefort.
libtranslate-0.99/docs/man/services.xml.5.xml 000644 001750 001750 00000054772 10172767013 022732 0 ustar 00jylefort jylefort 000000 000000
services.xml">
]>
services.xml5services.xml ManualJanuary 15, 2005libtranslate &version;Jean-YvesLefortjylefort@brutele.beservices.xmllibtranslate generic service definitionsDescription
The &file; file contains translation service definitions for the
libtranslate generic module.
The generic module provides an abstract framework for supporting
web-based translation services.
When the generic module is initialized, it reads service
definitions from the &file; files located in @pkgdatadir@ and ~/.libtranslate, creates the
services defined in these files, and makes them available to
libtranslate.
The &file; file must be encoded in UTF-8, and conform to the
&file; Document Type Definition, located in
@pkgdatadir@/services.dtd.
ElementsservicesDescription
The services element is the root of
the document, and may contains service definitions and
language mappings.
Children
These elements may occur zero or more times in
services:
custom-language,
service.
custom-languageDescription
The custom-language element maps a
RFC 3066 language tag to a language name.
Some RFC 3066 tag to name mappings are built into
libtranslate and do not need to be added (see the
Built-In RFC 3066 Tag to Name Mappings appendix in the
libtranslate Reference Manual).
Attributestag (required)The RFC 3066 language tag.name (required)The language human-readable name.Parents
This element contains
custom-language:
services.
serviceDescription
The service element defines a
translation service.
Attributesname (required)The service symbolic name, encoded in ASCII.nick (implied, default: name)The service human-readable name.max-chunk-len (optional, default: 1000)
The maximum length of an input chunk, in
characters (0 means unlimited).
Parents
This element contains service:
services.
Children
This element may occur zero or more times in
service: group.
groupDescription
The group element defines a
translation group (a group represents a set of languages
and translation methods).
Parents
This element contains group:
service.
Children
These elements may occur zero or more times in
group: language,
http-header.
These elements may occur zero or one time in
group:
text-translation,
web-page-translation.
languageDescription
The language element adds a language
to the list of languages supported by a group.
Attributestag (required)
The RFC 3066 language tag.
service-tag (implied, default: tag)
The language service-specific tag. This tag is not
exposed to libtranslate, but is available as
from and to
variables (see Variable
Substitution).
to (optional, default: none)
A comma-separated list of RFC 3066 language tags
this language can be translated into. The special
list element * means "every
language of this group but this one".
Parents
This element contains language:
group.
http-headerDescription
The http-header element adds a HTTP
header to the list of headers that are set when a HTTP
request is issued.
If the http-header element occurs
inside a group element, the header is
added for text and web page translations.
If it occurs inside a
text-translation or
web-page-translation element, the
header is only added for a text or web page translation,
respectively.
Attributesname (required)
The HTTP header name.
value (required)
The HTTP header value.
Parents
These elements contain http-header:
group,
text-translation,
web-page-translation.
text-translationDescription
The presence of the text-translation
element specifies that the group can translate text.
Attributesurl (required)
The URL to use for translating text. Variable
substitution is performed on the URL (see Variable
Substitution).
post (optional, default: none)
If this attribute is present, a HTTP POST request
is issued (using the attribute value as post
data). Otherwise, a HTTP GET request is
issued. Variable substitution is performed on the
post data (see Variable
Substitution).
Parents
This element contains text-translation:
group.
Children
These element may occur zero or more times in
text-translation:
http-header,
pre-marker,
error-marker.
This element may occur zero or one time in
text-translation:
post-marker.
pre-markerDescription
The pre-marker element is used to
extract the translated text from the response to a text
translation request.
For each pre-marker element, the
parser locates text in the server
response. If text is found, the
parser moves to the character following
text. If it is not found, the
translation fails. The translated text starts at the
character following the last
pre-marker match. If no
pre-marker element is specified, the
translated text starts at the first character of the
server response.
Attributestext (required)
The text to match.
Parents
This element contains pre-marker:
text-translation.
post-markerDescription
The post-marker element is used to
extract the translated text from the response to a text
translation request.
If text can be located in the
server response, the translated text ends at the
character preceding
text. Otherwise, the translation
fails. If no post-marker element is
specified, the translated text ends at the last
character of the server response.
Attributestext (required)
The text to match.
Parents
This element contains post-marker:
text-translation.
error-markerDescription
The error-marker element is used to
check if a text translation error has occurred.
If one or more error-marker elements
are specified and the text of any
of them can be located anywhere in the server response,
the translation fails.
Attributestext (required)
The text to match.
Parents
This element contains error-marker:
text-translation.
web-page-translationDescription
The presence of the
web-page-translation element
specifies that the group can translate a web page.
If no http-header element is
specified and if post is not
specified, the generic module does not need to connect
to the server. In this case, url
is returned as the URL of the translated web page.
Otherwise, the generic module connects to the server,
issues a HTTP GET or POST request, saves the response to
a local file, and returns a file:// URL pointing to that
file.
Attributesurl (required)
The URL to use for translating a web
page. Variable substitution is performed on the
URL (see Variable
Substitution).
post (optional, default: none)
If this attribute is present, a HTTP POST request
is issued (using the attribute value as post
data). Otherwise, a HTTP GET request is issued (or
no request at all, see above). Variable
substitution is performed on the post data (see
Variable
Substitution).
Parents
This element contains
web-page-translation:
group.
Children
This element may occur zero or more times in
web-page-translation:
http-header.
Variable Substitution
Variable substitution is performed at translation time on the
url and post
attributes of the text-translation and
web-page-translation elements.
A variable has the syntax
${varname:modifiers}.
varname may be any of the following variables:text (text-translation only)
The text to translate.
url (web-page-translation only)
The URL of the web page to translate.
from
The source language service tag.
to
The destination language service tag.
time
The number of seconds since 0 hours, 0 minutes, 0 seconds,
January 1, 1970, Coordinated Universal Time.
modifiers is a comma-separated
list of modifiers. Each modifier is applied (in the specified
order) on the contents of the variable. A modifier has the syntax
name=value.
name may be any of the following modifiers:escape
Escapes the unsafe characters in the variable using URI
percent notation.
charset
Converts the variable from UTF-8 (the libtranslate
character set) to the character set
value.
Files@pkgdatadir@/services.xml
The system-wide service definitions.
~/.libtranslate/services.xml
The user service definitions.
@pkgdatadir@/services.dtd
The &file; Document Type Definition.
See Also
The libtranslate Reference Manual
libtranslate-0.99/docs/man/translate.1.xml 000644 001750 001750 00000033007 10172767046 022273 0 ustar 00jylefort jylefort 000000 000000
translate">
]>
translate1translate ManualJanuary 15, 2005libtranslate &version;Jean-YvesLefortjylefort@brutele.betranslatetranslate a text or web page
&cmd;
-?-v--list-services
&cmd;
-s services-f lang-t lang-l
&cmd;
-s services-f lang-t langhttp_urlhttps_url
&cmd;
-s services-f lang-t lang--max-threads=n--max-retries=nfileDescription&cmd; translates a text or web page.
If the first synopsis form is used, &cmd; prints a quick help,
the version information or the list of available translation
services to standard output.
If the second synopsis form is used, &cmd; prints the list of
available language pairs to standard output.
If the third synopsis form is used, &cmd; translates the web
page pointed to by http_url or
https_url, and prints the URL of the
translated web page to standard output
(http_url must be a string starting
with http://, and
https_url must be a string starting
with https://).
If the fourth synopsis form is used, &cmd; translates the text
contained in file, and prints the
translation to standard output (if
file is omitted or given as a single
dash, standard input is used instead).
Options,
Prints a quick help to standard output.
,
Prints version information to standard output.
Lists the available translation services.
services, =services
Specifies the translation services to use. The
services argument must be a
comma-separated list of service names (default value: all
the available services).
The list of services determines the available language
pairs. The order of the list is important, as libtranslate
iterates over the list until the requested translation can
be performed.
,
Lists the available language pairs.
The and options
can be used to specify a source and/or destination
language filter. If neither nor
is specified, all the pairs are
listed.
lang, =lang
Specifies the source language of a translation. The
lang argument must be a RFC
3066 language tag such as en or
zh-TW (default value: see Language Selection).
lang, =lang
Specifies the destination language of a translation. The
lang argument must be a RFC
3066 language tag such as en or
zh-TW (default value: see Language Selection).
=n
Specifies the maximum number of concurrent threads to use
for translating text (default value: 8).
=n
Specifies the maximum number of retries per text chunk
(default value: 3).
Language Selection
Definitions: in this section,
default_from is defined as the
contents of the environment variable
TRANSLATE_DEFAULT_FROM, or, if that variable is
not set, en;
default_to is defined as the contents
of the environment variable TRANSLATE_DEFAULT_TO,
or, if that variable is not set, fr.
If the source language is not specified, it defaults to
default_from, or, if the destination
language is equal to default_from,
default_to.
If the destination language is not specified, it defaults to
default_to, or, if the source
language is equal to default_to,
default_from.
Character Set Handling
Internally, libtranslate uses the UTF-8 encoding.
If the input text is not encoded in UTF-8, &cmd; assumes it is
encoded in the character set of the current locale, and attempts
to convert it to UTF-8. If the conversion fails, &cmd; exits
with an error.
The output text is converted to the character set of the current
locale before printing.
Examples
In the following examples, it is assumed that
TRANSLATE_DEFAULT_FROM is set to
es and that
TRANSLATE_DEFAULT_TO is set to
de.
&cmd; fr
Lists all the available language pairs where the source
language is French.
&cmd; document1
Translates the contents of the file
document1 from Spanish to German and
prints the result to standard output.
&cmd; babelfish,freetranslationdocument1
Translates the contents of the file
document1 from Spanish to German, only
using the Babel Fish and FreeTranslation services, and
prints the result to standard output.
&cmd; dedocument1
Translates the contents of the file
document1 from German to Spanish and
prints the result to standard output.
echo "Le problème est résolu." | &cmd; fren
Translates the text given on standard input from French to
English and prints the result to standard output.
&cmd; enhttp://www.freebsd.org/es/index.html
Translates the web page pointed to by
http://www.freebsd.org/es/index.html
from Spanish to English and prints an URL pointing to the
result to standard output.
Diagnostics
The &cmd; utility exits with a status of 0 on success, and >0 if
an error occurs.
Environment
The following environment variables affect the execution of &cmd;:
HTTP_PROXY
The URL of the proxy to use for HTTP requests.
http_proxy
Same as HTTP_PROXY, for
compatibility.
TRANSLATE_DEFAULT_FROM
The default source language (see Language Selection).
TRANSLATE_DEFAULT_TO
The default destination language (see Language Selection).
See Also
The libtranslate Reference Manual
libtranslate-0.99/docs/man/translate.1 000644 001750 001750 00000014500 10176431006 021455 0 ustar 00jylefort jylefort 000000 000000 .\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "TRANSLATE" 1 "January 15, 2005" "libtranslate 0.99" "translate Manual"
.SH NAME
translate \- translate a text or web page
.SH "SYNOPSIS"
.ad l
.hy 0
.HP 10
\fBtranslate\fR {\fB\-?\fR | \fB\-v\fR | \fB\-\-list\-services\fR}
.ad
.hy
.ad l
.hy 0
.HP 10
\fBtranslate\fR [\-s\ \fIservices\fR] [\-f\ \fIlang\fR] [\-t\ \fIlang\fR] {\-l}
.ad
.hy
.ad l
.hy 0
.HP 10
\fBtranslate\fR [\-s\ \fIservices\fR] [\-f\ \fIlang\fR] [\-t\ \fIlang\fR] {\fB\fIhttp_url\fR\fR | \fB\fIhttps_url\fR\fR}
.ad
.hy
.ad l
.hy 0
.HP 10
\fBtranslate\fR [\-s\ \fIservices\fR] [\-f\ \fIlang\fR] [\-t\ \fIlang\fR] [\-\-max\-threads=\fIn\fR] [\-\-max\-retries=\fIn\fR] [\fIfile\fR]
.ad
.hy
.SH "DESCRIPTION"
.PP
\fBtranslate\fR translates a text or web page\&.
.PP
If the first synopsis form is used, \fBtranslate\fR prints a quick help, the version information or the list of available translation services to standard output\&.
.PP
If the second synopsis form is used, \fBtranslate\fR prints the list of available language pairs to standard output\&.
.PP
If the third synopsis form is used, \fBtranslate\fR translates the web page pointed to by \fIhttp_url\fR or \fIhttps_url\fR, and prints the URL of the translated web page to standard output (\fIhttp_url\fR must be a string starting with http://, and \fIhttps_url\fR must be a string starting with https://)\&.
.PP
If the fourth synopsis form is used, \fBtranslate\fR translates the text contained in \fIfile\fR, and prints the translation to standard output (if \fIfile\fR is omitted or given as a single dash, standard input is used instead)\&.
.SH "OPTIONS"
.TP
\fB\-?\fR, \fB\-\-help\fR
Prints a quick help to standard output\&.
.TP
\fB\-v\fR, \fB\-\-version\fR
Prints version information to standard output\&.
.TP
\fB\-\-list\-services\fR
Lists the available translation services\&.
.TP
\fB\-s\fR \fIservices\fR, \fB\-\-services\fR=\fIservices\fR
Specifies the translation services to use\&. The \fIservices\fR argument must be a comma\-separated list of service names (default value: all the available services)\&.
The list of services determines the available language pairs\&. The order of the list is important, as libtranslate iterates over the list until the requested translation can be performed\&.
.TP
\fB\-l\fR, \fB\-\-list\-pairs\fR
Lists the available language pairs\&.
The \fB\-f\fR and \fB\-t\fR options can be used to specify a source and/or destination language filter\&. If neither \fB\-f\fR nor \fB\-t\fR is specified, all the pairs are listed\&.
.TP
\fB\-f\fR \fIlang\fR, \fB\-\-from\fR=\fIlang\fR
Specifies the source language of a translation\&. The \fIlang\fR argument must be a RFC 3066 language tag such as en or zh\-TW (default value: see Language Selection)\&.
.TP
\fB\-t\fR \fIlang\fR, \fB\-\-to\fR=\fIlang\fR
Specifies the destination language of a translation\&. The \fIlang\fR argument must be a RFC 3066 language tag such as en or zh\-TW (default value: see Language Selection)\&.
.TP
\fB\-\-max\-threads\fR=\fIn\fR
Specifies the maximum number of concurrent threads to use for translating text (default value: 8)\&.
.TP
\fB\-\-max\-retries\fR=\fIn\fR
Specifies the maximum number of retries per text chunk (default value: 3)\&.
.SH "LANGUAGE SELECTION"
.PP
Definitions: in this section, \fIdefault_from\fR is defined as the contents of the environment variable \fBTRANSLATE_DEFAULT_FROM\fR, or, if that variable is not set, en; \fIdefault_to\fR is defined as the contents of the environment variable \fBTRANSLATE_DEFAULT_TO\fR, or, if that variable is not set, fr\&.
.PP
If the source language is not specified, it defaults to \fIdefault_from\fR, or, if the destination language is equal to \fIdefault_from\fR, \fIdefault_to\fR\&.
.PP
If the destination language is not specified, it defaults to \fIdefault_to\fR, or, if the source language is equal to \fIdefault_to\fR, \fIdefault_from\fR\&.
.SH "CHARACTER SET HANDLING"
.PP
Internally, libtranslate uses the UTF\-8 encoding\&.
.PP
If the input text is not encoded in UTF\-8, \fBtranslate\fR assumes it is encoded in the character set of the current locale, and attempts to convert it to UTF\-8\&. If the conversion fails, \fBtranslate\fR exits with an error\&.
.PP
The output text is converted to the character set of the current locale before printing\&.
.SH "EXAMPLES"
.PP
In the following examples, it is assumed that \fBTRANSLATE_DEFAULT_FROM\fR is set to es and that \fBTRANSLATE_DEFAULT_TO\fR is set to de\&.
.TP
\fBtranslate\fR \fB\-f\fR fr \fB\-l\fR
Lists all the available language pairs where the source language is French\&.
.TP
\fBtranslate\fR document1
Translates the contents of the file document1 from Spanish to German and prints the result to standard output\&.
.TP
\fBtranslate\fR \fB\-s\fR babelfish,freetranslation document1
Translates the contents of the file document1 from Spanish to German, only using the Babel Fish and FreeTranslation services, and prints the result to standard output\&.
.TP
\fBtranslate\fR \fB\-f\fR de document1
Translates the contents of the file document1 from German to Spanish and prints the result to standard output\&.
.TP
\fBecho\fR "Le problme est rsolu\&." | \fBtranslate\fR \fB\-f\fR fr \fB\-t\fR en
Translates the text given on standard input from French to English and prints the result to standard output\&.
.TP
\fBtranslate\fR \fB\-t\fR en http://www\&.freebsd\&.org/es/index\&.html
Translates the web page pointed to by http://www\&.freebsd\&.org/es/index\&.html from Spanish to English and prints an URL pointing to the result to standard output\&.
.SH "DIAGNOSTICS"
.PP
The \fBtranslate\fR utility exits with a status of 0 on success, and >0 if an error occurs\&.
.SH "ENVIRONMENT"
.PP
The following environment variables affect the execution of \fBtranslate\fR:
.TP
\fBHTTP_PROXY\fR
The URL of the proxy to use for HTTP requests\&.
.TP
\fBhttp_proxy\fR
Same as HTTP_PROXY, for compatibility\&.
.TP
\fBTRANSLATE_DEFAULT_FROM\fR
The default source language (see Language Selection)\&.
.TP
\fBTRANSLATE_DEFAULT_TO\fR
The default destination language (see Language Selection)\&.
.SH "SEE ALSO"
.PP
The libtranslate Reference Manual
.SH AUTHOR
Jean\-Yves Lefort.
libtranslate-0.99/docs/reference 000777 001750 001750 00000000000 10176431055 020512 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/reference/Makefile.am 000644 001750 001750 00000002745 10172241211 022616 0 ustar 00jylefort jylefort 000000 000000 include $(top_srcdir)/common.make
# The name of the module.
DOC_MODULE = libtranslate
# The top-level SGML file.
DOC_MAIN_SGML_FILE = libtranslate-docs.sgml
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS = --deprecated-guards="TRANSLATE_DISABLE_DEPRECATED"
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR = ../..
# Used for dependencies
HFILE_GLOB = $(top_srcdir)/src/*.h
CFILE_GLOB = $(top_srcdir)/src/*.c
# Headers to ignore
IGNORE_HFILES = *-private.h
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
INCLUDES = $(TRANSLATE_CFLAGS)
GTKDOC_LIBS = $(top_builddir)/src/libtranslate.la
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --sgml-mode --output-format=xml --ignore-files=trio
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
example-application.c.xml \
example-service.c.xml \
rfc3066-table.xml \
version.xml
# include common portion ...
include $(top_srcdir)/docs/gtk-doc.make
# Other files to distribute
EXTRA_DIST += \
example-application.c \
example-service.c \
lang2xml.sh
DISTCLEANFILES = version.xml
MAINTAINERCLEANFILES = \
example-application.c.xml \
example-service.c.xml \
rfc3066-table.xml
%.c.xml: %.c
sed -e 's,&,\&,g; s,<,\<,g; s,>,\>,g' $< > $@
rfc3066-table.xml: $(top_srcdir)/data/iso639-2 $(top_srcdir)/data/rfc3066.sh lang2xml.sh
$(top_srcdir)/data/rfc3066.sh < $(top_srcdir)/data/iso639-2 | ./lang2xml.sh > $@
libtranslate-0.99/docs/reference/Makefile.in 000644 001750 001750 00000043760 10176430640 022643 0 ustar 00jylefort jylefort 000000 000000 # Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 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@
# -*- mode: makefile -*-
####################################
# Everything below here is generic #
####################################
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/version.xml.in $(top_srcdir)/common.make \
$(top_srcdir)/docs/gtk-doc.make
subdir = docs/reference
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/talkfilters.m4 \
$(top_srcdir)/acinclude.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)/config.h
CONFIG_CLEAN_FILES = version.xml
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_DOC_USE_LIBTOOL_FALSE = @GTK_DOC_USE_LIBTOOL_FALSE@
GTK_DOC_USE_LIBTOOL_TRUE = @GTK_DOC_USE_LIBTOOL_TRUE@
HTML_DIR = @HTML_DIR@
ICONV = @ICONV@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML_CFLAGS = @LIBXML_CFLAGS@
LIBXML_LIBS = @LIBXML_LIBS@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOUP_CFLAGS = @SOUP_CFLAGS@
SOUP_LIBS = @SOUP_LIBS@
STRIP = @STRIP@
TALKFILTERS_CFLAGS = @TALKFILTERS_CFLAGS@
TALKFILTERS_LIBS = @TALKFILTERS_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GENERIC_FALSE = @WITH_GENERIC_FALSE@
WITH_GENERIC_TRUE = @WITH_GENERIC_TRUE@
WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
WITH_TALKFILTERS_FALSE = @WITH_TALKFILTERS_FALSE@
WITH_TALKFILTERS_TRUE = @WITH_TALKFILTERS_TRUE@
XGETTEXT = @XGETTEXT@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
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@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
modulesdir = $(pkglibdir)/modules
TRANSLATE_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)/src
# The name of the module.
DOC_MODULE = libtranslate
# The top-level SGML file.
DOC_MAIN_SGML_FILE = libtranslate-docs.sgml
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS = --deprecated-guards="TRANSLATE_DISABLE_DEPRECATED"
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR = ../..
# Used for dependencies
HFILE_GLOB = $(top_srcdir)/src/*.h
CFILE_GLOB = $(top_srcdir)/src/*.c
# Headers to ignore
IGNORE_HFILES = *-private.h
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
INCLUDES = $(TRANSLATE_CFLAGS)
GTKDOC_LIBS = $(top_builddir)/src/libtranslate.la
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --sgml-mode --output-format=xml --ignore-files=trio
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
example-application.c.xml \
example-service.c.xml \
rfc3066-table.xml \
version.xml
@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
# We set GPATH here; this gives us semantics for GNU make
# which are more like other make's VPATH, when it comes to
# whether a source that is a target of one rule is then
# searched for in VPATH/GPATH.
#
GPATH = $(srcdir)
TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
# include common portion ...
# Other files to distribute
EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE).types $(DOC_MODULE)-sections.txt \
$(DOC_MODULE)-overrides.txt example-application.c \
example-service.c lang2xml.sh
DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
SCANOBJ_FILES = \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).interfaces \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals
CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
DISTCLEANFILES = version.xml
MAINTAINERCLEANFILES = \
example-application.c.xml \
example-service.c.xml \
rfc3066-table.xml
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common.make $(top_srcdir)/docs/gtk-doc.make $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/reference/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign docs/reference/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
version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../.. $(distdir)/../../docs
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
check-am: all-am
check: check-am
all-am: Makefile all-local
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
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 distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic \
maintainer-clean-local
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-local
.PHONY: all all-am all-local check check-am clean clean-generic \
clean-libtool clean-local dist-hook 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-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic \
maintainer-clean-local mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am uninstall-local
@ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp
#### scan ####
@ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB)
@ENABLE_GTK_DOC_TRUE@ @echo '*** Scanning header files ***'
@ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir)
@ENABLE_GTK_DOC_TRUE@ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
@ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
@ENABLE_GTK_DOC_TRUE@ else \
@ENABLE_GTK_DOC_TRUE@ cd $(srcdir) ; \
@ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \
@ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \
@ENABLE_GTK_DOC_TRUE@ done \
@ENABLE_GTK_DOC_TRUE@ fi
@ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
@ENABLE_GTK_DOC_TRUE@ touch scan-build.stamp
@ENABLE_GTK_DOC_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
@ENABLE_GTK_DOC_TRUE@ @true
#### templates ####
@ENABLE_GTK_DOC_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
@ENABLE_GTK_DOC_TRUE@ @echo '*** Rebuilding template files ***'
@ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir)
@ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
@ENABLE_GTK_DOC_TRUE@ touch tmpl-build.stamp
@ENABLE_GTK_DOC_TRUE@tmpl.stamp: tmpl-build.stamp
@ENABLE_GTK_DOC_TRUE@ @true
#### xml ####
@ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
@ENABLE_GTK_DOC_TRUE@ @echo '*** Building XML ***'
@ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir)
@ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS)
@ENABLE_GTK_DOC_TRUE@ touch sgml-build.stamp
@ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp
@ENABLE_GTK_DOC_TRUE@ @true
#### html ####
@ENABLE_GTK_DOC_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
@ENABLE_GTK_DOC_TRUE@ @echo '*** Building HTML ***'
@ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir)
@ENABLE_GTK_DOC_TRUE@ rm -rf $(srcdir)/html
@ENABLE_GTK_DOC_TRUE@ mkdir $(srcdir)/html
@ENABLE_GTK_DOC_TRUE@ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
@ENABLE_GTK_DOC_TRUE@ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
@ENABLE_GTK_DOC_TRUE@ @echo '-- Fixing Crossreferences'
@ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
@ENABLE_GTK_DOC_TRUE@ touch html-build.stamp
@ENABLE_GTK_DOC_FALSE@all-local:
##############
clean-local:
rm -f *~ *.bak
rm -rf .libs
maintainer-clean-local: clean
cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
install-data-local:
installfiles=`echo $(srcdir)/html/*`; \
if test "$$installfiles" = '$(srcdir)/html/*'; \
then echo '-- Nothing to install' ; \
else \
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
for i in $$installfiles; do \
echo '-- Installing '$$i ; \
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
done; \
echo '-- Installing $(srcdir)/html/index.sgml' ; \
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
fi
uninstall-local:
rm -f $(DESTDIR)$(TARGET_DIR)/*
#
# Require gtk-doc when making dist
#
@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc:
@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc:
@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist"
@ENABLE_GTK_DOC_FALSE@ @false
dist-hook: dist-check-gtkdoc dist-hook-local
mkdir $(distdir)/tmpl
mkdir $(distdir)/xml
mkdir $(distdir)/html
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-cp $(srcdir)/xml/*.xml $(distdir)/xml
-cp $(srcdir)/html/* $(distdir)/html
.PHONY : dist-hook-local
%.c.xml: %.c
sed -e 's,&,\&,g; s,<,\<,g; s,>,\>,g' $< > $@
rfc3066-table.xml: $(top_srcdir)/data/iso639-2 $(top_srcdir)/data/rfc3066.sh lang2xml.sh
$(top_srcdir)/data/rfc3066.sh < $(top_srcdir)/data/iso639-2 | ./lang2xml.sh > $@
# 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:
libtranslate-0.99/docs/reference/version.xml.in 000644 001750 001750 00000000011 10165040114 023357 0 ustar 00jylefort jylefort 000000 000000 @VERSION@ libtranslate-0.99/docs/reference/example-application.c.xml 000644 001750 001750 00000006021 10176431017 025461 0 ustar 00jylefort jylefort 000000 000000 /*
* Copyright (C) 2005 Jean-Yves Lefort
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Jean-Yves Lefort nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <locale.h>
#include <stdlib.h>
#include <translate.h>
int
main (int argc, char **argv)
{
GError *err = NULL;
GSList *services;
TranslateSession *session;
char *translation;
setlocale(LC_ALL, ""); /* use user's locale */
if (argc != 4)
{
g_printerr("Usage: translate FROM TO {TEXT | HTTP_URL | HTTPS_URL}\n");
exit(1);
}
/* initialize libtranslate */
if (! translate_init(&err))
{
g_printerr("Unable to initialize libtranslate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* create a session which will use all the services */
services = translate_get_services();
session = translate_session_new(services);
g_slist_foreach(services, (GFunc) g_object_unref, NULL);
g_slist_free(services);
/* translate text or web page, depending on the string given */
translation = (g_str_has_prefix(argv[3], "http://")
|| g_str_has_prefix(argv[3], "https://"))
? translate_session_translate_web_page(session, argv[3], argv[1], argv[2],
NULL, NULL, &err)
: translate_session_translate_text(session, argv[3], argv[1], argv[2],
NULL, NULL, &err);
/* handle failure */
if (! translation)
{
g_printerr("Unable to translate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* success, print the translation, cleanup and exit */
g_print("%s\n", translation);
g_free(translation);
g_object_unref(session);
return 0;
}
libtranslate-0.99/docs/reference/example-service.c.xml 000644 001750 001750 00000013276 10176431017 024630 0 ustar 00jylefort jylefort 000000 000000 /*
* Copyright (C) 2005 Jean-Yves Lefort
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Jean-Yves Lefort nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <locale.h>
#include <stdlib.h>
#include <gmodule.h>
#include <translate.h>
#define REVERSE_TYPE_SERVICE (reverse_service_get_type())
typedef struct
{
TranslateService parent;
} ReverseService;
typedef struct
{
TranslateServiceClass parent;
} ReverseServiceClass;
static gboolean
reverse_service_get_pairs (TranslateService *service,
GSList **pairs,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err)
{
/* initialize the list */
*pairs = NULL;
/* add the English -> English (reversed) pair */
*pairs = g_slist_append(*pairs,
translate_pair_new(TRANSLATE_PAIR_TEXT,
"en", "en-x-rev"));
/* add the English (reversed) -> English pair */
*pairs = g_slist_append(*pairs,
translate_pair_new(TRANSLATE_PAIR_TEXT,
"en-x-rev", "en"));
return TRUE; /* success */
}
static char *
reverse_service_translate_text (TranslateService *service,
const char *text,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err)
{
return g_utf8_strreverse(text, -1);
}
static void
reverse_service_class_init (ReverseServiceClass *class)
{
TranslateServiceClass *service_class = TRANSLATE_SERVICE_CLASS(class);
service_class->get_pairs = reverse_service_get_pairs;
service_class->translate_text = reverse_service_translate_text;
}
static void
reverse_service_register_type (GType *type)
{
static const GTypeInfo info = {
sizeof(ReverseServiceClass),
NULL,
NULL,
(GClassInitFunc) reverse_service_class_init,
NULL,
NULL,
sizeof(ReverseService),
0,
NULL
};
*type = g_type_register_static(TRANSLATE_TYPE_SERVICE,
"ReverseService",
&info,
0);
}
static GType
reverse_service_get_type (void)
{
static GType type;
static GOnce once = G_ONCE_INIT;
g_once(&once, (GThreadFunc) reverse_service_register_type, &type);
return type;
}
static TranslateService *
reverse_service_new (void)
{
return g_object_new(REVERSE_TYPE_SERVICE,
"name", "reverse",
"nick", "Reverse",
NULL);
}
static void
reverse_service_register_tag (void)
{
/*
* Register our en-x-rev custom tag. The tag name was chosen
* according to rules specified in RFC 3066 section 2.2.
*
* Note that registering a language name is optional and has
* aesthetical purposes only. If no name exists for a particular
* tag, the tag itself will be used.
*/
translate_add_language("en-x-rev", "English (reversed)");
}
#ifdef STANDALONE
int
main (int argc, char **argv)
{
GError *err = NULL;
GSList *services = NULL;
TranslateSession *session;
char *reversed;
setlocale(LC_ALL, ""); /* use user's locale */
if (argc != 2)
{
g_printerr("Usage: rev TEXT\n");
exit(1);
}
/* initialize libtranslate */
if (! translate_init(&err))
{
g_printerr("Unable to initialize libtranslate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* register our custom tag */
reverse_service_register_tag();
/* create a session which will use our reverse service */
services = g_slist_append(services, reverse_service_new());
session = translate_session_new(services);
g_slist_foreach(services, (GFunc) g_object_unref, NULL);
g_slist_free(services);
/* reverse the given text */
reversed = translate_session_translate_text(session, argv[1], "en", "en-x-rev",
NULL, NULL, &err);
/* handle failure */
if (! reversed)
{
g_printerr("Unable to reverse text: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* success, print the reversed text, cleanup and exit */
g_print("%s", reversed);
g_free(reversed);
g_object_unref(session);
return 0;
}
#else /* ! STANDALONE */
G_MODULE_EXPORT gboolean
translate_module_init (GError **err)
{
TranslateService *service;
/* register our custom tag */
reverse_service_register_tag();
/* add the reverse service */
service = reverse_service_new();
translate_add_service(service);
g_object_unref(service);
return TRUE; /* success */
}
#endif /* ! STANDALONE */
libtranslate-0.99/docs/reference/rfc3066-table.xml 000644 001750 001750 00000160173 10176431021 023466 0 ustar 00jylefort jylefort 000000 000000
Built-in RFC 3066 Tag to Name MappingsRFC 3066 TagEnglish NameFrench NameaaAfarafarabAbkhazianabkhazeaceAchineseacehachAcoliacoliadaAdangmeadangmeadyAdyghe; AdygeiadygheafaAfro-Asiatic (Other)afro-asiatiques, autres languesafhAfrihiliafrihiliafAfrikaansafrikaansakAkanakanakkAkkadianakkadiensqAlbanianalbanaisaleAleutaléoutealgAlgonquian languagesalgonquines, languesamAmharicamhariqueangEnglish, Old (ca.450-1100)anglo-saxon (ca.450-1100)apaApache languagesapachearArabicarabearcAramaicaraméenanAragonesearagonaishyArmenianarménienarnAraucanianaraucanarpArapahoarapahoartArtificial (Other)artificielles, autres languesarwArawakarawakasAssameseassamaisastAsturian; Bableasturien; bableathAthapascan languagesathapascanes, languesausAustralian languagesaustraliennes, languesavAvaricavaraeAvestanavestiqueawaAwadhiawadhiayAymaraaymaraazAzerbaijaniazéribadBandabandabaiBamileke languagesbamilékés, languesbaBashkirbachkirbalBaluchibaloutchibmBambarabambarabanBalinesebalinaiseuBasquebasquebasBasabasabatBaltic (Other)baltiques, autres languesbejBejabedjabeBelarusianbiélorussebemBembabembabnBengalibengaliberBerber (Other)berbères, autres languesbhoBhojpuribhojpuribhBiharibiharibikBikolbikolbinBinibinibiBislamabichlamarblaSiksikablackfootbntBantu (Other)bantoues, autres languesbsBosnianbosniaquebraBrajbrajbrBretonbretonbtkBatak (Indonesia)batak (Indonésie)buaBuriatbouriatebugBuginesebugibgBulgarianbulgaremyBurmesebirmanbynBlin; Bilinblin; bilencadCaddocaddocaiCentral American Indian (Other)indiennes d'Amérique centrale, autres languescarCaribcaribecaCatalan; Valenciancatalan; valenciencauCaucasian (Other)caucasiennes, autres languescebCebuanocebuanocelCeltic (Other)celtiques, autres langueschChamorrochamorrochbChibchachibchaceChechentchétchènechgChagataidjaghataïzhChinesechinoischkChuukesechuukchmMarimarichnChinook jargonchinook, jargonchoChoctawchoctawchpChipewyanchipewyanchrCherokeecherokeecuChurch Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonicslavon d'église; vieux slave; slavon liturgique; vieux bulgarecvChuvashtchouvachechyCheyennecheyennecmcChamic languageschames, languescopCopticcoptekwCornishcorniquecoCorsicancorsecpeCreoles and pidgins, English based (Other)créoles et pidgins anglais, autrescpfCreoles and pidgins, French-based (Other)créoles et pidgins français, autrescppCreoles and pidgins, Portuguese-based (Other)créoles et pidgins portugais, autrescrCreecreecrhCrimean Tatar; Crimean Turkishtatar de CrimécrpCreoles and pidgins (Other)créoles et pidgins diverscsbKashubiankachoubecusCushitic (Other)couchitiques, autres languescsCzechtchèquedakDakotadakotadaDanishdanoisdarDargwadargwadayDayakdayakdelDelawaredelawaredenSlave (Athapascan)esclave (athapascan)dgrDogribdogribdinDinkadinkadvDivehimaldiviendoiDogridogridraDravidian (Other)dravidiennes, autres languesdsbLower Sorbianbas-sorabeduaDualadoualadumDutch, Middle (ca.1050-1350)néerlandais moyen (ca. 1050-1350)nlDutch; Flemishnéerlandais; flamanddyuDyuladiouladzDzongkhadzongkhaefiEfikefikegyEgyptian (Ancient)égyptienekaEkajukekajukelxElamiteélamiteenEnglishanglaisenmEnglish, Middle (1100-1500)anglais moyen (1100-1500)eoEsperantoespérantoetEstonianestonieneeEweéwéewoEwondoéwondofanFangfangfoFaroeseféroïenfatFantifantifjFijianfidjienfilFilipino; Pilipinofilipino; pilipinofiFinnishfinnoisfiuFinno-Ugrian (Other)finno-ougriennes, autres languesfonFonfonfrFrenchfrançaisfrmFrench, Middle (ca.1400-1800)français moyen (1400-1800)froFrench, Old (842-ca.1400)français ancien (842-ca.1400)fyFrisianfrisonffFulahpeulfurFriulianfrioulangaaGagagayGayogayogbaGbayagbayagemGermanic (Other)germaniques, autres langueskaGeorgiangéorgiendeGermanallemandgezGeezguèzegilGilbertesekiribatigdGaelic; Scottish Gaelicgaélique; gaélique écossaisgaIrishirlandaisglGallegangaliciengvManxmanx; mannoisgmhGerman, Middle High (ca.1050-1500)allemand, moyen haut (ca. 1050-1500)gohGerman, Old High (ca.750-1050)allemand, vieux haut (ca. 750-1050)gonGondigondgorGorontalogorontalogotGothicgothiquegrbGrebogrebogrcGreek, Ancient (to 1453)grec ancien (jusqu'à 1453)elGreek, Modern (1453-)grec moderne (après 1453)gnGuaraniguaraniguGujaratigoudjratigwiGwich´ingwich´inhaiHaidahaidahtHaitian; Haitian Creolehaïtien; créole haïtienhaHausahaoussahawHawaiianhawaïenheHebrewhébreuhzHererohererohilHiligaynonhiligaynonhimHimachalihimachalihiHindihindihitHittitehittitehmnHmonghmonghoHiri Motuhiri motuhsbUpper Sorbianhaut-sorabehuHungarianhongroishupHupahupaibaIbanibanigIgboigboisIcelandicislandaisioIdoidoiiSichuan Yiyi de SichuanijoIjoijoiuInuktitutinuktitutieInterlingueinterlingueiloIlokoilocanoiaInterlingua (International Auxiliary Language Association)interlingua (langue auxiliaire internationale)incIndic (Other)indo-aryennes, autres languesidIndonesianindonésienineIndo-European (Other)indo-européennes, autres languesinhIngushingoucheikInupiaqinupiaqiraIranian (Other)iraniennes, autres languesiroIroquoian languagesiroquoises, langues (famille)itItalianitalienjvJavanesejavanaisjboLojbanlojbanjaJapanesejaponaisjprJudeo-Persianjudéo-persanjrbJudeo-Arabicjudéo-arabekaaKara-KalpakkarakalpakkabKabylekabylekacKachinkachinklKalaallisut; GreenlandicgroenlandaiskamKambakambaknKannadakannadakarKarenkarenksKashmirikashmirikrKanurikanourikawKawikawikkKazakhkazakhkbdKabardiankabardienkhaKhasikhasikhiKhoisan (Other)khoisan, autres langueskmKhmerkhmerkhoKhotanesekhotanaiskiKikuyu; GikuyukikuyurwKinyarwandarwandakyKirghizkirghizekmbKimbundukimbundukokKonkanikonkanikvKomikomkgKongokongokoKoreancoréenkosKosraeankosraekpeKpellekpellékrcKarachay-Balkarkaratchai balkarkroKrukroukruKurukhkurukhkjKuanyama; Kwanyamakuanyama; kwanyamakumKumykkoumykkuKurdishkurdekutKutenaikutenailadLadinojudéo-espagnollahLahndalahndalamLambalambaloLaolaolaLatinlatinlvLatvianlettonlezLezghianlezghienliLimburgan; Limburger; LimburgishlimbourgeoislnLingalalingalaltLithuanianlituanienlolMongomongolozLozilozilbLuxembourgish; LetzeburgeschluxembourgeoisluaLuba-Lulualuba-lulualuLuba-Katangaluba-katangalgGandagandaluiLuisenoluisenolunLundalundaluoLuo (Kenya and Tanzania)luo (Kenya et Tanzanie)luslushaiLushaimkMacedonianmacédonienmadMaduresemadouraismagMagahimagahimhMarshallesemarshallmaiMaithilimaithilimakMakasarmakassarmlMalayalammalayalammanMandingomandinguemiMaorimaorimapAustronesian (Other)malayo-polynésiennes, autres languesmrMarathimarathemasMasaimassaïmsMalaymalaismdfMokshamoksamdrMandarmandarmenMendemendémgaIrish, Middle (900-1200)irlandais moyen (900-1200)micMi'kmaq; Micmacmi'kmaq; micmacminMinangkabauminangkabaumisMiscellaneous languagesdiverses, languesmkhMon-Khmer (Other)môn-khmer, autres languesmgMalagasymalgachemtMaltesemaltaismncManchumandchoumniManipurimanipurimnoManobo languagesmanobo, languesmohMohawkmohawkmoMoldavianmoldavemnMongolianmongolmosMossimorémulMultiple languagesmultilinguemunMunda languagesmounda, languesmusCreekmuskogeemwlMirandesemirandaismwrMarwarimarvarimynMayan languagesmaya, languesmyvErzyaerzanahNahuatlnahuatlnaiNorth American Indianindiennes d'Amérique du Nord, autres languesnapNeapolitannapolitainnaNaurunauruannvNavajo; NavahonavahonrNdebele, South; South Ndebelendébélé du SudndNdebele, North; North Ndebelendébélé du NordngNdongandongandsLow German; Low Saxon; German, Low; Saxon, Lowbas allemand; bas saxon; allemand, bas; saxon, basneNepalinépalaisnewNepal Bhasa; Newarinepal bhasa; newariniaNiasniasnicNiger-Kordofanian (Other)nigéro-congolaises, autres languesniuNiueanniuénnNorwegian Nynorsknorvégien nynorsknbNorwegian Bokmålnorvégien bokmålnogNogainogaï; nogaynonNorse, Oldnorrois, vieuxnoNorwegiannorvégiennsoNorthern Sotho; Pedi; Sepedisotho du Nord; pedi; sepedinubNubian languagesnubiennes, languesnwcClassical Newari; Old Newari; Classical Nepal Bhasanewari classiquenyChichewa; Chewa; Nyanjachichewa; chewa; nyanjanymNyamwezinyamwezinynNyankolenyankolényoNyoronyoronziNzimanzemaocOccitan (post 1500); Provençaloccitan (après 1500); provençalojOjibwaojibwaorOriyaoriyaomOromogallaosaOsageosageosOssetian; OsseticossèteotaTurkish, Ottoman (1500-1928)turc ottoman (1500-1928)otoOtomian languagesotomangue, languespaaPapuan (Other)papoues, autres languespagPangasinanpangasinanpalPahlavipahlavipamPampangapampanganpaPanjabi; PunjabipendjabipapPapiamentopapiamentopauPalauanpalaupeoPersian, Old (ca.600-400 B.C.)perse, vieux (ca. 600-400 av. J.-C.)faPersianpersanphiPhilippine (Other)philippines, autres languesphnPhoenicianphénicienpiPalipaliplPolishpolonaisponPohnpeianpohnpeiptPortugueseportugaispraPrakrit languagesprâkritproProvençal, Old (to 1500)provençal ancien (jusqu'à 1500)psPushtopachtoqaa-qtz Reserved for local useréservée à l'usage localquQuechuaquechuarajRajasthanirajasthanirapRapanuirapanuirarRarotonganrarotongaroaRomance (Other)romanes, autres languesrmRaeto-Romancerhéto-romanromRomanytsiganeroRomanianroumainrnRundirundiruRussianrussesadSandawesandawesgSangosangosahYakutiakoutesaiSouth American Indian (Other)indiennes d'Amérique du Sud, autres languessalSalishan languagessalish, languessamSamaritan AramaicsamaritainsaSanskritsanskritsasSasaksasaksatSantalisantalsrSerbianserbescnSiciliansicilienscoScotsécossaishrCroatiancroateselSelkupselkoupesemSemitic (Other)sémitiques, autres languessgaIrish, Old (to 900)irlandais ancien (jusqu'à 900)sgnSign Languageslangues des signesshnShanchansidSidamosidamosiSinhala; SinhalesesinghalaissioSiouan languagessioux, languessitSino-Tibetan (Other)sino-tibétaines, autres languesslaSlavic (Other)slaves, autres languesskSlovakslovaqueslSlovenianslovènesmaSouthern Samisami du SudseNorthern Samisami du NordsmiSami languages (Other)sami, autres languessmjLule Samisami de LulesmnInari Samisami d'InarismSamoansamoansmsSkolt Samisami skoltsnShonashonasdSindhisindhisnkSoninkesoninkésogSogdiansogdiensoSomalisomalisonSonghaisonghaistSotho, Southernsotho du SudesSpanish; Castilianespagnol; castillanscSardiniansardesrrSerersérèressaNilo-Saharan (Other)nilo-sahariennes, autres languesssSwatiswatisukSukumasukumasuSundanesesoundanaissusSususoussousuxSumeriansumérienswSwahiliswahilisvSwedishsuédoissyrSyriacsyriaquetyTahitiantahitientaiTai (Other)thaïes, autres languestaTamiltamoulttTatartatarteTelugutélougoutemTimnetemneterTerenoterenotetTetumtetumtgTajiktadjiktlTagalogtagalogthThaithaïboTibetantibétaintigTigretigrétiTigrinyatigrignativTivtivtklTokelautokelautlhKlingon; tlhIngan-HolklingontliTlingittlingittmhTamashektamacheqtogTonga (Nyasa)tonga (Nyasa)toTonga (Tonga Islands)tongan (Îles Tonga)tpiTok Pisintok pisintsiTsimshiantsimshiantnTswanatswanatsTsongatsongatkTurkmenturkmènetumTumbukatumbukatupTupi languagestupi, languestrTurkishturctutAltaic (Other)altaïques, autres languestvlTuvalutuvalutwTwitwityvTuviniantouvaudmUdmurtoudmourteugaUgariticougaritiqueugUighur; UyghurouïgourukUkrainianukrainienumbUmbunduumbunduundUndeterminedindéterminéeurUrduourdouuzUzbekouszbekvaiVaivaïveVendavendaviVietnamesevietnamienvoVolapükvolapükvotVoticvotewakWakashan languageswakashennes, langueswalWalamowalamowarWaraywaraywasWashowashocyWelshgalloiswenSorbian languagessorabes, langueswaWalloonwallonwoWolofwolofxalKalmykkalmoukxhXhosaxhosayaoYaoyaoyapYapeseyapoisyiYiddishyiddishyoYorubayorubaypkYupik languagesyupik, langueszapZapoteczapotèquezenZenagazenagazaZhuang; Chuangzhuang; chuangzndZandezandézuZuluzoulouzunZunizuni
libtranslate-0.99/docs/reference/version.xml 000644 001750 001750 00000000005 10176430750 022770 0 ustar 00jylefort jylefort 000000 000000 0.99
libtranslate-0.99/docs/reference/libtranslate-docs.sgml 000644 001750 001750 00000030035 10172767176 025100 0 ustar 00jylefort jylefort 000000 000000
]>
&lib; Reference Manualfor &lib; &version;January 15, 2005Jean-YvesLefortjylefort@brutele.beOverview
&lib; is a library for translating text and web pages between
natural languages. Its modular infrastructure allows to
implement new translation services separately from the core
library.
&lib; is shipped with a generic module supporting web-based translation services such as
Babel Fish,
Google Language Tools
and SYSTRAN.
Moreover, the generic module allows to add new services simply
by adding a few lines to a XML file (see the
services.xml5
manual page).
&lib; is implemented on top of the GLib Object System.
Conventions
Unless noted otherwise, strings passed to library functions
must be encoded in UTF-8.
Unless noted otherwise, strings returned by &lib; are
encoded in UTF-8.
Unless noted otherwise, &lib; is thread-safe.
Compiling &lib; ApplicationsCompiling on UNIX
To compile a &lib; application, you need to tell the
compiler where to find the &lib; header files and
libraries. This is done with the
pkg-config utility.
The following interactive shell session demonstrates how
pkg-config is used:
$ pkg-config --cflags libtranslate
-I/usr/local/include/libtranslate -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
$ pkg-config --libs libtranslate
-L/usr/local/lib -ltranslate -lgobject-2.0 -lglib-2.0 -liconv
The simplest way to compile a program is to use the
"backticks" feature of the shell. If you enclose a command
in backticks (not single quotes), then
its output will be substituted into the command line before
execution. So to compile a &lib; Hello World, you would type
the following:
$ cc `pkg-config --cflags --libs libtranslate` hello.c -o helloCompiling on UNIX With Autoconf and Automake
To compile a &lib; application using GNU
Autoconf and GNU
Automake, insert the following line at the
appropriate place in the configure.ac
file:
PKG_CHECK_MODULES(LIBTRANSLATE, libtranslate,, [AC_MSG_ERROR([unable to find libtranslate])])
and insert the following lines in the appropriate
Makefile.am file:
bin_PROGRAMS = hello
hello_SOURCES = hello.c
hello_CPPFLAGS = $(LIBTRANSLATE_CFLAGS)
hello_LDFLAGS = $(LIBTRANSLATE_LIBS)Compiling &lib; ModulesCompiling on UNIX
To compile a &lib; module, you need to tell the compiler
where to find the &lib; header files. This is done with the
pkg-config utility.
For instance, to compile a &lib; Hello World module, you
would type the following:
$ cc `pkg-config --cflags libtranslate` -shared -fPIC hello.c -o hello.soCompiling on UNIX With Autoconf, Automake and Libtool
To compile a &lib; module using GNU
Autoconf, GNU
Automake and GNU
Libtool, insert the following line at the
appropriate place in the configure.ac
file:
PKG_CHECK_MODULES(LIBTRANSLATE, libtranslate,, [AC_MSG_ERROR([unable to find libtranslate])])
and insert the following lines in the appropriate
Makefile.am file:
modulesdir = $(libdir)/libtranslate/modules
modules_LTLIBRARIES = hello.la
hello_la_SOURCES = hello.c
hello_la_CPPFLAGS = $(LIBTRANSLATE_CFLAGS)
hello_la_LDFLAGS = -avoid-version -moduleModule Search Paths
&lib; loads modules from prefix/libtranslate/modules
(where prefix is the prefix where
&lib; is installed) and from ~/.libtranslate/modules
(where ~ is the path to your home
directory). Filenames not having the system-specific shared
object extension (usually .so) are ignored.
TutorialsTranslating Text or Web Pages
To translate text or web pages, you need to initialize &lib;
with a call to translate_init(), create a new
session using translate_session_new(),
and call the appropriate translation function, translate_session_translate_text()
or translate_session_translate_web_page().
A Simple Command-Line Translator
The following example demonstrates how to use &lib; for
creating a simple command-line text and web page translator.
The source code of this example is available in the &lib;
source distribution
(docs/reference/example-application.c),
and is reproduced below.
On UNIX, compile it as follows:
$ cc `pkg-config --cflags --libs libtranslate` example-application.c -o example-application&example-application;Implementing Translation Services
To implement a translation service, you need to create a
subclass of TranslateService, create an
instance of your subclass with g_object_new(), and add the
service using translate_add_service().
Web-Based Services
If you are implementing support for a web-based service,
just adding a definition to the services.xml
file (without having to resort to C code) might be sufficient.
See the
services.xml5
manual page.
A Simple Service for Reversing Text
The following example demonstrates how to create an add-on
service for &lib;, and compile it either as a module or as a
standalone application.
The source code of this example is available in the &lib;
source distribution
(docs/reference/example-service.c),
and is reproduced below.
To build a module on UNIX, compile the source as follows:
$ cc `pkg-config --cflags libtranslate` -shared -fPIC example-service.c -o example-service.so
To build a standalone application on UNIX, compile the
source as follows:
$ cc `pkg-config --cflags --libs libtranslate` -DSTANDALONE example-service.c -o example-service&example-service;API ReferenceObject Hierarchy
&index-Object-Tree;
&translate;
&translate-common;
&TranslatePair;
&TranslateService;
&TranslateSession;
&translate-util;
Built-in RFC 3066 Tag to Name Mappings
The following tag to name mappings are built into &lib;. Calling
translate_get_language_name()
for any tag of this table will return its localized language
name.
&rfc3066-table;
libtranslate-0.99/docs/reference/libtranslate.types 000644 001750 001750 00000000146 10164527466 024351 0 ustar 00jylefort jylefort 000000 000000 #include "translate.h"
translate_pair_get_type
translate_service_get_type
translate_session_get_type
libtranslate-0.99/docs/reference/libtranslate-sections.txt 000644 001750 001750 00000004617 10166111173 025642 0 ustar 00jylefort jylefort 000000 000000 translate-sessionTranslateSession
TranslateSession
TRANSLATE_SESSION_ERROR
TranslateSessionError
translate_session_new
translate_session_set_services
translate_session_set_max_threads
translate_session_set_max_retries
translate_session_get_services
translate_session_get_pairs
translate_session_get_max_threads
translate_session_get_max_retries
translate_session_translate_text
translate_session_translate_web_page
TRANSLATE_SESSION
TRANSLATE_IS_SESSION
TRANSLATE_TYPE_SESSION
translate_session_get_type
TRANSLATE_SESSION_CLASS
TRANSLATE_IS_SESSION_CLASS
TRANSLATE_SESSION_GET_CLASS
translate-pairTranslatePair
TranslatePair
TranslatePairFlags
translate_pair_new
translate_pair_get_flags
translate_pair_get_from
translate_pair_get_to
translate_pairs_sort_by_tag
translate_pairs_sort_by_name
translate_pairs_find
TRANSLATE_PAIR
TRANSLATE_IS_PAIR
TRANSLATE_TYPE_PAIR
translate_pair_get_type
TRANSLATE_PAIR_CLASS
TRANSLATE_IS_PAIR_CLASS
TRANSLATE_PAIR_GET_CLASS
translate-serviceTranslateService
TranslateService
TranslateServiceClass
translate_service_get_name
translate_service_get_nick
translate_service_get_max_chunk_len
translate_service_get_pairs
TRANSLATE_SERVICE
TRANSLATE_IS_SERVICE
TRANSLATE_TYPE_SERVICE
translate_service_get_type
TRANSLATE_SERVICE_CLASS
TRANSLATE_IS_SERVICE_CLASS
TRANSLATE_SERVICE_GET_CLASS
translate
TRANSLATE_MAJOR_VERSION
TRANSLATE_MINOR_VERSION
TRANSLATE_MICRO_VERSION
translate_major_version
translate_minor_version
translate_micro_version
TRANSLATE_ERROR
TRANSLATE_INIT_ERROR
TranslateError
TranslateInitError
TranslateModuleInitFunc
translate_initialized
translate_init
translate_add_service
translate_get_service
translate_get_services
translate_add_language
translate_get_language_name
translate_set_proxy
translate_get_proxy
translate-util
translate_ascii_strcase_equal
translate_ascii_strcase_hash
translate_ascii_strcasestr
translate_ascii_strcasestr_len
translate_ascii_strcasecoll
translate_utf8_strcasecoll
translate_utf8_strcmp
translate_utf8_strcasecmp
translate_utf8_strpbrk
translate_utf8_strrpbrk
translate_time
translate_sgml_ref_expand
translate-common
TranslateProgressFunc
libtranslate-0.99/docs/reference/libtranslate-overrides.txt 000644 001750 001750 00000000000 10161371573 026002 0 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/reference/example-application.c 000644 001750 001750 00000005755 10173774761 024714 0 ustar 00jylefort jylefort 000000 000000 /*
* Copyright (C) 2005 Jean-Yves Lefort
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Jean-Yves Lefort nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include
#include
#include
int
main (int argc, char **argv)
{
GError *err = NULL;
GSList *services;
TranslateSession *session;
char *translation;
setlocale(LC_ALL, ""); /* use user's locale */
if (argc != 4)
{
g_printerr("Usage: translate FROM TO {TEXT | HTTP_URL | HTTPS_URL}\n");
exit(1);
}
/* initialize libtranslate */
if (! translate_init(&err))
{
g_printerr("Unable to initialize libtranslate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* create a session which will use all the services */
services = translate_get_services();
session = translate_session_new(services);
g_slist_foreach(services, (GFunc) g_object_unref, NULL);
g_slist_free(services);
/* translate text or web page, depending on the string given */
translation = (g_str_has_prefix(argv[3], "http://")
|| g_str_has_prefix(argv[3], "https://"))
? translate_session_translate_web_page(session, argv[3], argv[1], argv[2],
NULL, NULL, &err)
: translate_session_translate_text(session, argv[3], argv[1], argv[2],
NULL, NULL, &err);
/* handle failure */
if (! translation)
{
g_printerr("Unable to translate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* success, print the translation, cleanup and exit */
g_print("%s\n", translation);
g_free(translation);
g_object_unref(session);
return 0;
}
libtranslate-0.99/docs/reference/example-service.c 000644 001750 001750 00000013200 10173774771 024032 0 ustar 00jylefort jylefort 000000 000000 /*
* Copyright (C) 2005 Jean-Yves Lefort
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Jean-Yves Lefort nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include
#include
#include
#include
#define REVERSE_TYPE_SERVICE (reverse_service_get_type())
typedef struct
{
TranslateService parent;
} ReverseService;
typedef struct
{
TranslateServiceClass parent;
} ReverseServiceClass;
static gboolean
reverse_service_get_pairs (TranslateService *service,
GSList **pairs,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err)
{
/* initialize the list */
*pairs = NULL;
/* add the English -> English (reversed) pair */
*pairs = g_slist_append(*pairs,
translate_pair_new(TRANSLATE_PAIR_TEXT,
"en", "en-x-rev"));
/* add the English (reversed) -> English pair */
*pairs = g_slist_append(*pairs,
translate_pair_new(TRANSLATE_PAIR_TEXT,
"en-x-rev", "en"));
return TRUE; /* success */
}
static char *
reverse_service_translate_text (TranslateService *service,
const char *text,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err)
{
return g_utf8_strreverse(text, -1);
}
static void
reverse_service_class_init (ReverseServiceClass *class)
{
TranslateServiceClass *service_class = TRANSLATE_SERVICE_CLASS(class);
service_class->get_pairs = reverse_service_get_pairs;
service_class->translate_text = reverse_service_translate_text;
}
static void
reverse_service_register_type (GType *type)
{
static const GTypeInfo info = {
sizeof(ReverseServiceClass),
NULL,
NULL,
(GClassInitFunc) reverse_service_class_init,
NULL,
NULL,
sizeof(ReverseService),
0,
NULL
};
*type = g_type_register_static(TRANSLATE_TYPE_SERVICE,
"ReverseService",
&info,
0);
}
static GType
reverse_service_get_type (void)
{
static GType type;
static GOnce once = G_ONCE_INIT;
g_once(&once, (GThreadFunc) reverse_service_register_type, &type);
return type;
}
static TranslateService *
reverse_service_new (void)
{
return g_object_new(REVERSE_TYPE_SERVICE,
"name", "reverse",
"nick", "Reverse",
NULL);
}
static void
reverse_service_register_tag (void)
{
/*
* Register our en-x-rev custom tag. The tag name was chosen
* according to rules specified in RFC 3066 section 2.2.
*
* Note that registering a language name is optional and has
* aesthetical purposes only. If no name exists for a particular
* tag, the tag itself will be used.
*/
translate_add_language("en-x-rev", "English (reversed)");
}
#ifdef STANDALONE
int
main (int argc, char **argv)
{
GError *err = NULL;
GSList *services = NULL;
TranslateSession *session;
char *reversed;
setlocale(LC_ALL, ""); /* use user's locale */
if (argc != 2)
{
g_printerr("Usage: rev TEXT\n");
exit(1);
}
/* initialize libtranslate */
if (! translate_init(&err))
{
g_printerr("Unable to initialize libtranslate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* register our custom tag */
reverse_service_register_tag();
/* create a session which will use our reverse service */
services = g_slist_append(services, reverse_service_new());
session = translate_session_new(services);
g_slist_foreach(services, (GFunc) g_object_unref, NULL);
g_slist_free(services);
/* reverse the given text */
reversed = translate_session_translate_text(session, argv[1], "en", "en-x-rev",
NULL, NULL, &err);
/* handle failure */
if (! reversed)
{
g_printerr("Unable to reverse text: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* success, print the reversed text, cleanup and exit */
g_print("%s", reversed);
g_free(reversed);
g_object_unref(session);
return 0;
}
#else /* ! STANDALONE */
G_MODULE_EXPORT gboolean
translate_module_init (GError **err)
{
TranslateService *service;
/* register our custom tag */
reverse_service_register_tag();
/* add the reverse service */
service = reverse_service_new();
translate_add_service(service);
g_object_unref(service);
return TRUE; /* success */
}
#endif /* ! STANDALONE */
libtranslate-0.99/docs/reference/lang2xml.sh 000755 001750 001750 00000004345 10172766154 022665 0 ustar 00jylefort jylefort 000000 000000 #!/bin/sh
#
# lang2xml.sh - convert a RFC 3066 language table to a DocBook XML file
#
# Copyright (C) 2005 Jean-Yves Lefort
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Jean-Yves Lefort nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
cat <
Built-in RFC 3066 Tag to Name MappingsRFC 3066 TagEnglish NameFrench Name
EOF
IFS="|"
while read tag english_name french_name; do
cat <$tag$english_name$french_name
EOF
done
cat <
EOF
libtranslate-0.99/docs/reference/tmpl 000777 001750 001750 00000000000 10176431055 021466 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/reference/tmpl/translate-service.sgml 000644 001750 001750 00000013422 10176431055 026062 0 ustar 00jylefort jylefort 000000 000000
TranslateService
service object
A #TranslateService object defines a set of language pairs as well as
the methods to translate a text or web page using one of the pairs.
A new translation service can be implemented in two ways:
Adding a definition to the services.xml file
The generic module provides an abstract framework for supporting
web-based translation services. At runtime, the generic module reads
service definitions from services.xml files and
creates the services defined in these files.
If you are adding support for a web-based translation service, this is
the way to go. See the
services.xml5
manual page for more details.
Creating a #TranslateService subclass
If the services.xml file cannot satisfactorily be
used to describe the service you want to implement, you need to
program the service in C by creating a subclass of #TranslateService
and overriding the @get_pairs, @translate_text and/or
@translate_web_page methods.
If you want all the applications using libtranslate to be able to use
the new service, you need to create a libtranslate module and install
it in the appropriate path (see Compiling libtranslate Modules).
Otherwise, just integrate the service with your application. In either
case, you need to expose an instance of the service to libtranslate by
calling translate_add_service(). If the service is included in a module,
this needs to be done from translate_module_init(). Otherwise, do it
from your application initialization code, somewhere after the call to
translate_init().
The #TranslateService struct contains private data only, and should be
accessed using the functions below.
The service class contains methods which should be implemented by
subclasses in order to provide the service functionality.
Implementing the @get_pairs method is mandatory. The @translate_text
and @translate_web_page methods are only required if any pair returned
by the @get_pairs method has the #TRANSLATE_PAIR_TEXT or
#TRANSLATE_PAIR_WEB_PAGE flag set, respectively.
@parent: the parent class
@get_pairs: Specifies the function which is called to retrieve the
list of language pairs implemented by @service. The function should
return %TRUE and store a list of #TranslatePair objects in @pairs on
success, or return %FALSE and store an error in @err on failure. If
@progress_func is not %NULL, @get_pairs should call it at regular
intervals with a progress update (or -1 if the progress is unknown),
and the @user_data argument. If, when called, @progress_func returns
%FALSE, @get_pairs must cancel the operation as soon as possible,
return %NULL, and set @err to an error of domain #TRANSLATE_ERROR and
code #TRANSLATE_ERROR_CANCELLED.
@translate_text: Specifies the function which is called to translate a
chunk of text. The function should return a newly-allocated string
containing the translation of @text on success, or return %NULL and
set @err on failure. If the max-chunk-len
property of service is not 0, it is guaranteed that the number of
UTF-8 characters in @text will not exceed max-chunk-len . It is
guaranteed that the @from/@to pair will be a member (with the flag
#TRANSLATE_PAIR_TEXT set) of the list returned by the @get_pairs
method. If @progress_func is not %NULL, @translate_text should call it
at regular intervals with a progress update (or -1 if the progress is
unknown), and the @user_data argument. If, when called, @progress_func
returns %FALSE, @translate_text must cancel the translation as soon as
possible, return %NULL, and set @err to an error of domain
#TRANSLATE_ERROR and code #TRANSLATE_ERROR_CANCELLED.
@translate_web_page: Specifies the function which is called to
translate a web page. The function should return a newly-allocated
string containing the URL of the translated web page on success, or
return %NULL and set @err on failure. It is guaranteed that the
@from/@to pair will be a member (with the flag
#TRANSLATE_PAIR_WEB_PAGE set) of the list returned by the @get_pairs
method. If @progress_func is not %NULL, @translate_web_page should
call it at regular intervals with a progress update (or -1 if the
progress is unknown), and the @user_data argument. If, when called,
@progress_func returns %FALSE, @translate_web_page must cancel the
translation as soon as possible, return %NULL, and set @err to an
error of domain #TRANSLATE_ERROR and code #TRANSLATE_ERROR_CANCELLED.
@service:
@Returns:
@service:
@Returns:
@service:
@Returns:
@service:
@Returns:
libtranslate-0.99/docs/reference/tmpl/translate-util.sgml 000644 001750 001750 00000003111 10176431055 025371 0 ustar 00jylefort jylefort 000000 000000
translate-util
miscellaneous utility functions
The following functions may come in handy to manipulate ASCII or UTF-8
strings, get the current time, or expand SGML character references and
XHTML character entities.
@s1:
@s2:
@Returns:
@key:
@Returns:
@big:
@little:
@Returns:
@big:
@big_len:
@little:
@Returns:
@s1:
@s2:
@Returns:
@s1:
@s2:
@Returns:
@s1:
@s2:
@Returns:
@s1:
@s2:
@Returns:
@p:
@len:
@charset:
@Returns:
@p:
@len:
@charset:
@Returns:
@Returns:
@str:
@Returns:
libtranslate-0.99/docs/reference/tmpl/translate-session.sgml 000644 001750 001750 00000005071 10176431055 026106 0 ustar 00jylefort jylefort 000000 000000
TranslateSession
session object
A #TranslateSession object is used to translate a text or web page
using a set of translation services. After creating a new session with
translate_session_new(), you can translate a text or web page using
translate_session_translate_text() or
translate_session_translate_web_page().
The #TranslateSession struct contains private data only, and should be
accessed using the functions below.
The error domain of translate_session_translate_text() and
translate_session_translate_web_page(). Errors in this domain are from
the #TranslateSessionError enumeration.
Error codes returned by translate_session_translate_text() and
translate_session_translate_web_page().
@TRANSLATE_SESSION_ERROR_NO_SERVICE: no service could translate using
the given language pair
@services:
@Returns:
@session:
@services:
@session:
@max_threads:
@session:
@max_retries:
@session:
@Returns:
@session:
@Returns:
@session:
@Returns:
@session:
@Returns:
@session:
@text:
@from:
@to:
@progress_func:
@user_data:
@err:
@Returns:
@session:
@url:
@from:
@to:
@progress_func:
@user_data:
@err:
@Returns:
libtranslate-0.99/docs/reference/tmpl/translate.sgml 000644 001750 001750 00000007550 10176431055 024431 0 ustar 00jylefort jylefort 000000 000000
translate
library initialization and core functions
The following functions, variables and macros are used to determine
the libtranslate version, initialize libtranslate, manipulate
services, languages and the network proxy.
Like #translate_major_version, but from the headers used at
application compile time, rather than from the library linked against
at application runtime.
Like #translate_minor_version, but from the headers used at
application compile time, rather than from the library linked against
at application runtime.
Like #translate_micro_version, but from the headers used at
application compile time, rather than from the library linked against
at application runtime.
The major version number of libtranslate.
This variable is in the library, so it represents the translate
library you have linked against. Contrast with the
#TRANSLATE_MAJOR_VERSION macro, which represents the major version of
the libtranslate headers you have included.
The minor version number of libtranslate.
This variable is in the library, so it represents the translate
library you have linked against. Contrast with the
#TRANSLATE_MINOR_VERSION macro, which represents the minor version of
the libtranslate headers you have included.
The micro version number of libtranslate.
This variable is in the library, so it represents the translate
library you have linked against. Contrast with the
#TRANSLATE_MICRO_VERSION macro, which represents the micro version of
the libtranslate headers you have included.
Generic libtranslate error domain. Errors in this domain are from the
#TranslateError enumeration.
The error domain of translate_init(). Errors in this domain are from
the #TranslateInitError enumeration.
Generic error codes returned by libtranslate routines when more
specialized error codes are not relevant.
@TRANSLATE_ERROR_FAILED: a generic error has occurred
@TRANSLATE_ERROR_CANCELLED: the user has cancelled the operation
Error codes returned by translate_init().
@TRANSLATE_INIT_ERROR_MULTI_THREADING_NOT_SUPPORTED: multi-threading is not supported
@err:
@Returns:
Whether libtranslate is initialized or not (read-only). You probably
do not need to use this variable, as translate_init() can be called
multiple times.
@err:
@Returns:
@service:
@Returns:
@name:
@Returns:
@Returns:
@tag:
@name:
@Returns:
@tag:
@Returns:
@uri:
@Returns:
libtranslate-0.99/docs/reference/tmpl/translate-pair.sgml 000644 001750 001750 00000003446 10176431055 025362 0 ustar 00jylefort jylefort 000000 000000
TranslatePair
language pair object and functions for handling pair lists
A #TranslatePair object defines the source and destination languages
of a translation, as well as flags specifying the contexts of
application of the pair.
You only need to create pairs if you are implementing a service (see
the @get_pairs method of #TranslateServiceClass).
The #TranslatePair struct contains private data only, and should be
accessed using the functions below.
Specifies the features of a #TranslatePair object.
@TRANSLATE_PAIR_TEXT: the pair can be used to translate text
@TRANSLATE_PAIR_WEB_PAGE: the pair can be used to translate a web page
@flags:
@from:
@to:
@Returns:
@pair:
@Returns:
@pair:
@Returns:
@pair:
@Returns:
@pairs:
@Returns:
@pairs:
@Returns:
@pairs:
@from:
@to:
@Returns:
libtranslate-0.99/docs/reference/tmpl/translate-common.sgml 000644 001750 001750 00000000623 10176431055 025711 0 ustar 00jylefort jylefort 000000 000000
translate-common
common declarations
The following declaration is used in several places.
@progress:
@user_data:
@Returns:
libtranslate-0.99/docs/reference/tmpl/libtranslate-unused.sgml 000644 001750 001750 00000000000 10176431055 026400 0 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/reference/xml 000777 001750 001750 00000000000 10176431055 021312 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/reference/xml/translate.xml 000644 001750 001750 00000043736 10176431055 024121 0 ustar 00jylefort jylefort 000000 000000 translate3LIBTRANSLATE Librarytranslatelibrary initialization and core functionsSynopsis
#define TRANSLATE_MAJOR_VERSION
#define TRANSLATE_MINOR_VERSION
#define TRANSLATE_MICRO_VERSION
extern const unsigned int translate_major_version;
extern const unsigned int translate_minor_version;
extern const unsigned int translate_micro_version;
#define TRANSLATE_ERROR
#define TRANSLATE_INIT_ERROR
enum TranslateError;
enum TranslateInitError;
gboolean (*TranslateModuleInitFunc) (GError **err);
extern gboolean translate_initialized;
gboolean translate_init (GError **err);
gboolean translate_add_service (TranslateService *service);
TranslateService* translate_get_service (const char *name);
GSList* translate_get_services (void);
gboolean translate_add_language (const char *tag,
const char *name);
const char* translate_get_language_name (const char *tag);
void translate_set_proxy (const char *uri);
char* translate_get_proxy (void);
Description
The following functions, variables and macros are used to determine
the libtranslate version, initialize libtranslate, manipulate
services, languages and the network proxy.
DetailsTRANSLATE_MAJOR_VERSIONTRANSLATE_MAJOR_VERSION#define TRANSLATE_MAJOR_VERSION 0
Like translate_major_version, but from the headers used at
application compile time, rather than from the library linked against
at application runtime.
TRANSLATE_MINOR_VERSIONTRANSLATE_MINOR_VERSION#define TRANSLATE_MINOR_VERSION 99
Like translate_minor_version, but from the headers used at
application compile time, rather than from the library linked against
at application runtime.
TRANSLATE_MICRO_VERSIONTRANSLATE_MICRO_VERSION#define TRANSLATE_MICRO_VERSION 0
Like translate_micro_version, but from the headers used at
application compile time, rather than from the library linked against
at application runtime.
translate_major_versiontranslate_major_versionextern const unsigned int translate_major_version;
The major version number of libtranslate.
This variable is in the library, so it represents the translate
library you have linked against. Contrast with the
TRANSLATE_MAJOR_VERSION macro, which represents the major version of
the libtranslate headers you have included.
translate_minor_versiontranslate_minor_versionextern const unsigned int translate_minor_version;
The minor version number of libtranslate.
This variable is in the library, so it represents the translate
library you have linked against. Contrast with the
TRANSLATE_MINOR_VERSION macro, which represents the minor version of
the libtranslate headers you have included.
translate_micro_versiontranslate_micro_versionextern const unsigned int translate_micro_version;
The micro version number of libtranslate.
This variable is in the library, so it represents the translate
library you have linked against. Contrast with the
TRANSLATE_MICRO_VERSION macro, which represents the micro version of
the libtranslate headers you have included.
TRANSLATE_ERRORTRANSLATE_ERROR#define TRANSLATE_ERROR (translate_error_quark())
Generic libtranslate error domain. Errors in this domain are from the
TranslateError enumeration.
TRANSLATE_INIT_ERRORTRANSLATE_INIT_ERROR#define TRANSLATE_INIT_ERROR (translate_init_error_quark())
The error domain of translate_init(). Errors in this domain are from
the TranslateInitError enumeration.
enum TranslateErrorTranslateErrortypedef enum
{
TRANSLATE_ERROR_FAILED,
TRANSLATE_ERROR_CANCELLED
} TranslateError;
Generic error codes returned by libtranslate routines when more
specialized error codes are not relevant.
TRANSLATE_ERROR_FAILEDa generic error has occurred
TRANSLATE_ERROR_CANCELLEDthe user has cancelled the operation
enum TranslateInitErrorTranslateInitErrortypedef enum
{
TRANSLATE_INIT_ERROR_MULTI_THREADING_NOT_SUPPORTED
} TranslateInitError;
Error codes returned by translate_init().
TRANSLATE_INIT_ERROR_MULTI_THREADING_NOT_SUPPORTEDmulti-threading is not supported
TranslateModuleInitFunc ()TranslateModuleInitFuncgboolean (*TranslateModuleInitFunc) (GError **err);
Specifies the type of the module initialization function.
A libtranslate module must contain a function named
translate_module_init(), which is called when the module is loaded.err : a location to report errors, or NULL.
Returns : the function should return FALSE if the module could
not be initialized. In such case it should also set err, which is
printed by libtranslate.
translate_initializedtranslate_initializedextern gboolean translate_initialized;
Whether libtranslate is initialized or not (read-only). You probably
do not need to use this variable, as translate_init() can be called
multiple times.
translate_init ()translate_initgboolean translate_init (GError **err);
Initializes libtranslate. This function can safely be called
multiple times (however, it is not
thread-safe, read below). When it is called more than once, it
returns the status (and error if any) of the initial invocation.
Unlike other libtranslate functions, translate_init() is
not thread-safe, and must
not be called while any mutex is held. The
reason is that translate_init() may call g_thread_init(). Refer to
the g_thread_init() documentation for more details.
err : a location to report errors, or NULL. Any of the errors in
TranslateInitError or other domains may occur.
Returns :TRUE if the initialization was successful, FALSE
otherwise (in such case err is set to the error that has
occurred).
translate_add_service ()translate_add_servicegboolean translate_add_service (TranslateService *service);
Adds service to the libtranslate service list. If a service with
the same name is already in the list, nothing is done and FALSE is
returned.service : a service.
Returns :TRUE if the service was added, FALSE if it was
already in the list.
translate_get_service ()translate_get_serviceTranslateService* translate_get_service (const char *name);
Looks up a service in the libtranslate service list.name : a service name, encoded in ASCII.
Returns : a new reference to the service with name name, or
NULL if not found.
translate_get_services ()translate_get_servicesGSList* translate_get_services (void);
Gets a copy of the libtranslate service list. When no longer
needed, the list should be freed with:
g_slist_foreach(list, (GFunc) g_object_unref, NULL);
g_slist_free(list);
Returns : a copy of the libtranslate service list.
translate_add_language ()translate_add_languagegboolean translate_add_language (const char *tag,
const char *name);
Adds a language tag to name mapping to the libtranslate language
database. If a language with the same tag already exists in the
database, nothing is done and FALSE is returned.
Some RFC 3066 tag to name mappings are built into libtranslate and do not
need to be added.
tag : a RFC 3066 language tag.
name : the language human-readable name.
Returns :TRUE if the language was added, FALSE if it was
already in the database.
translate_get_language_name ()translate_get_language_nameconst char* translate_get_language_name (const char *tag);
Looks up a language tag in the libtranslate language database, and
returns its human-readable name.tag : a RFC 3066 language tag.
Returns : the human-readable name of the language with tag
tag, or tag itself if not found. If the returned string is not
tag, it is owned by libtranslate and must not be modified or
freed.
translate_set_proxy ()translate_set_proxyvoid translate_set_proxy (const char *uri);
Sets the URI of a proxy server to use for network transfers.uri : the URI of a proxy server, or NULL to unset.
translate_get_proxy ()translate_get_proxychar* translate_get_proxy (void);
Gets the URI thas has been previously set with
translate_set_proxy().
If you are implementing a service, you must
use this URI for proxying network transfers.Returns : the libtranslate proxy URI, or NULL if no proxy is
set. The returned string should be freed when no longer needed.
libtranslate-0.99/docs/reference/xml/translate-util.xml 000644 001750 001750 00000045033 10176431055 025064 0 ustar 00jylefort jylefort 000000 000000 translate-util3LIBTRANSLATE Librarytranslate-utilmiscellaneous utility functionsSynopsis
gboolean translate_ascii_strcase_equal (gconstpointer s1,
gconstpointer s2);
unsigned int translate_ascii_strcase_hash (gconstpointer key);
char* translate_ascii_strcasestr (const char *big,
const char *little);
char* translate_ascii_strcasestr_len (const char *big,
unsigned int big_len,
const char *little);
int translate_ascii_strcasecoll (const char *s1,
const char *s2);
int translate_utf8_strcasecoll (const char *s1,
const char *s2);
int translate_utf8_strcmp (const char *s1,
const char *s2);
int translate_utf8_strcasecmp (const char *s1,
const char *s2);
char* translate_utf8_strpbrk (const char *p,
gssize len,
const char *charset);
char* translate_utf8_strrpbrk (const char *p,
gssize len,
const char *charset);
time_t translate_time (void);
char* translate_sgml_ref_expand (const char *str);
Description
The following functions may come in handy to manipulate ASCII or UTF-8
strings, get the current time, or expand SGML character references and
XHTML character entities.
Detailstranslate_ascii_strcase_equal ()translate_ascii_strcase_equalgboolean translate_ascii_strcase_equal (gconstpointer s1,
gconstpointer s2);
Compares two strings, ignoring the case of ASCII characters of both
strings, and returns TRUE if they are equal. It can be passed to
g_hash_table_new() as the key_equal_func parameter, when using
strings as case-insensitive keys in a GHashTable.s1 : a nul-terminated string.
s2 : a nul-terminated string.
Returns :TRUE if the two strings match.
translate_ascii_strcase_hash ()translate_ascii_strcase_hashunsigned int translate_ascii_strcase_hash (gconstpointer key);
Converts a string to a hash value, ignoring the case of ASCII
characters of the string. It can be passed to g_hash_table_new() as
the hash_func parameter, when using strings as case-insensitive
keys in a GHashTable.key : a string key.
Returns : a hash value corresponding to the key.
translate_ascii_strcasestr ()translate_ascii_strcasestrchar* translate_ascii_strcasestr (const char *big,
const char *little);
Locates the first occurrence of little in big, ignoring the case
of ASCII characters of both strings.big : a nul-terminated string, which may not be encoded in UTF-8.
little : the nul-terminated string to search for, which may not be
encoded in UTF-8.
Returns : if little is an empty string, big is returned; if
little occurs nowhere in big, NULL is returned; otherwise a
pointer to the first character of the first occurrence of little
in big is returned.
translate_ascii_strcasestr_len ()translate_ascii_strcasestr_lenchar* translate_ascii_strcasestr_len (const char *big,
unsigned int big_len,
const char *little);
Locates the first occurrence of little in big, ignoring the case
of ASCII characters of both strings, and limiting the length of the
search to big_len.big : a nul-terminated string, which may not be encoded in UTF-8.
big_len : length of big in bytes, or -1 if big is nul-terminated.
little : the nul-terminated string to search for, which may not be
encoded in UTF-8.
Returns : if little is an empty string, big is returned; if
little occurs nowhere in big, NULL is returned; otherwise a
pointer to the first character of the first occurrence of little
in big is returned.
translate_ascii_strcasecoll ()translate_ascii_strcasecollint translate_ascii_strcasecoll (const char *s1,
const char *s2);
Compares two strings for ordering using the linguistically correct
rules for the current locale, ignoring the case of ASCII characters
of both strings.s1 : a nul-terminated string, which may not be encoded in UTF-8.
s2 : a nul-terminated string, which may not be encoded in UTF-8.
Returns : an integer greater than, equal to, or less than 0,
according as s1 is greater than, equal to, or less than s2.
translate_utf8_strcasecoll ()translate_utf8_strcasecollint translate_utf8_strcasecoll (const char *s1,
const char *s2);
Compares two UTF-8 strings for ordering using the linguistically
correct rules for the current locale, ignoring the case of both
strings.s1 : a nul-terminated string.
s2 : a nul-terminated string.
Returns : an integer greater than, equal to, or less than 0,
according as s1 is greater than, equal to, or less than s2.
translate_utf8_strcmp ()translate_utf8_strcmpint translate_utf8_strcmp (const char *s1,
const char *s2);
Compares two UTF-8 strings for ordering.s1 : a nul-terminated string.
s2 : a nul-terminated string.
Returns : an integer greater than, equal to, or less than 0,
according as s1 is greater than, equal to, or less than s2.
translate_utf8_strcasecmp ()translate_utf8_strcasecmpint translate_utf8_strcasecmp (const char *s1,
const char *s2);
Compares two UTF-8 strings for ordering, ignoring the case of both
strings.s1 : a nul-terminated string.
s2 : a nul-terminated string.
Returns : an integer greater than, equal to, or less than 0,
according as s1 is greater than, equal to, or less than s2.
translate_utf8_strpbrk ()translate_utf8_strpbrkchar* translate_utf8_strpbrk (const char *p,
gssize len,
const char *charset);
Locates in p the first occurrence of any character in the string
charset.p : a nul-terminated string.
len : length of p in bytes, or -1 if p is nul-terminated.
charset : the set of characters to search for.
Returns : the first occurrence of any character of charset in
p, or NULL if no characters from charset occur anywhere in p.
translate_utf8_strrpbrk ()translate_utf8_strrpbrkchar* translate_utf8_strrpbrk (const char *p,
gssize len,
const char *charset);
Locates in p the last occurrence of any character in the string
charset.p : a nul-terminated string.
len : length of p in bytes, or -1 if p is nul-terminated.
charset : the set of characters to search for.
Returns : the last occurrence of any character of charset in
p, or NULL if no characters from charset occur anywhere in p.
translate_time ()translate_timetime_t translate_time (void);
Returns the current time, issuing a warning if an error occurs.Returns : the number of seconds since 0 hours, 0 minutes, 0
seconds, January 1, 1970, Coordinated Universal Time, or 0 if an
error has occurred.
translate_sgml_ref_expand ()translate_sgml_ref_expandchar* translate_sgml_ref_expand (const char *str);
Parses str, expanding its SGML character references and XHTML
character entities into their Unicode character value.
Numerical SGML character references as well as XHTML entities are
supported. Unsupported entities will be inserted verbatim into the
result.str : a nul-terminated string.
Returns : the expansion of str. The returned string should be
freed when no longer needed.
libtranslate-0.99/docs/reference/xml/translate-session.xml 000644 001750 001750 00000056332 10176431055 025576 0 ustar 00jylefort jylefort 000000 000000 TranslateSession3LIBTRANSLATE LibraryTranslateSessionsession objectSynopsis
struct TranslateSession;
#define TRANSLATE_SESSION_ERROR
enum TranslateSessionError;
TranslateSession* translate_session_new (const GSList *services);
void translate_session_set_services (TranslateSession *session,
const GSList *services);
void translate_session_set_max_threads
(TranslateSession *session,
unsigned int max_threads);
void translate_session_set_max_retries
(TranslateSession *session,
unsigned int max_retries);
GSList* translate_session_get_services (TranslateSession *session);
GSList* translate_session_get_pairs (TranslateSession *session);
unsigned int translate_session_get_max_threads
(TranslateSession *session);
int translate_session_get_max_retries
(TranslateSession *session);
char* translate_session_translate_text
(TranslateSession *session,
const char *text,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err);
char* translate_session_translate_web_page
(TranslateSession *session,
const char *url,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err);
Object Hierarchy
GObject
+----TranslateSession
Properties
"max-retries" gint : Read / Write / Construct
"max-threads" guint : Read / Write / Construct
"pairs" gpointer : Read
"services" gpointer : Read / Write / Construct
Description
A TranslateSession object is used to translate a text or web page
using a set of translation services. After creating a new session with
translate_session_new(), you can translate a text or web page using
translate_session_translate_text() or
translate_session_translate_web_page().
Detailsstruct TranslateSessionTranslateSessionstruct TranslateSession;
The TranslateSession struct contains private data only, and should be
accessed using the functions below.
TRANSLATE_SESSION_ERRORTRANSLATE_SESSION_ERROR#define TRANSLATE_SESSION_ERROR (translate_session_error_quark())
The error domain of translate_session_translate_text() and
translate_session_translate_web_page(). Errors in this domain are from
the TranslateSessionError enumeration.
enum TranslateSessionErrorTranslateSessionErrortypedef enum
{
TRANSLATE_SESSION_ERROR_NO_SERVICE
} TranslateSessionError;
Error codes returned by translate_session_translate_text() and
translate_session_translate_web_page().
TRANSLATE_SESSION_ERROR_NO_SERVICEno service could translate using
the given language pair
translate_session_new ()translate_session_newTranslateSession* translate_session_new (const GSList *services);
Creates a new translation session, which will use services for
performing translations.services : a list of TranslateService objects to use. See
translate_session_set_services().
Returns : a new translation session.
translate_session_set_services ()translate_session_set_servicesvoid translate_session_set_services (TranslateSession *session,
const GSList *services);
Sets the services used by session. Default value: NULL.
The list of services determines the available language pairs (see
translate_session_get_pairs()). The order of the list is important,
as translate_session_translate_text() and
translate_session_translate_web_page() iterate over the list until
the translation can be performed.session : a session.
services : a list of TranslateService objects to use.
translate_session_set_max_threads ()translate_session_set_max_threadsvoid translate_session_set_max_threads
(TranslateSession *session,
unsigned int max_threads);
Sets the maximum number of concurrent threads to use for
translating text. Default value: 8.session : a session.
max_threads : a maximum number of threads.
translate_session_set_max_retries ()translate_session_set_max_retriesvoid translate_session_set_max_retries
(TranslateSession *session,
unsigned int max_retries);
Sets the maximum number of retries per text chunk. Default value:
3.session : a session.
max_retries : a maximum number of retries.
translate_session_get_services ()translate_session_get_servicesGSList* translate_session_get_services (TranslateSession *session);
Gets the services used by session. When no longer needed, the list
should be freed with:
g_slist_foreach(list, (GFunc) g_object_unref, NULL);
g_slist_free(list);
session : a session.
Returns : the list of TranslateService objects used by
session.
translate_session_get_pairs ()translate_session_get_pairsGSList* translate_session_get_pairs (TranslateSession *session);
Gets the list of language pairs available for translations. When no longer
needed, the list should be freed with:
g_slist_foreach(list, (GFunc) g_object_unref, NULL);
g_slist_free(list);
session : a session.
Returns : the list of TranslatePair objects available for
translations.
translate_session_get_max_threads ()translate_session_get_max_threadsunsigned int translate_session_get_max_threads
(TranslateSession *session);
Gets the maximum number of concurrent threads to use for
translating text.session : a session.
Returns : the maximum number of threads.
translate_session_get_max_retries ()translate_session_get_max_retriesint translate_session_get_max_retries
(TranslateSession *session);
Gets the maximum number of retries per text chunk.session : a session.
Returns : the maximum number of retries.
translate_session_translate_text ()translate_session_translate_textchar* translate_session_translate_text
(TranslateSession *session,
const char *text,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err);
Translates text from the language from into the language to.
If progress_func is specified, it may be
called periodically to report progress. If, when called,
progress_func returns FALSE, the translation is cancelled as soon
as possible, NULL is returned, and err is set to an error of
domain TRANSLATE_ERROR and code TRANSLATE_ERROR_CANCELLED.session : a session.
text : a nul-terminated string.
from : a RFC 3066 language tag.
to : a RFC 3066 language tag.
progress_func : a function to call when progressing, or NULL.
user_data : data to pass to progress_func, or NULL.
err : a location to report errors, or NULL. Any of the errors in
TranslateSessionError, TranslateError or other domains may occur.
Returns : the translated text on success, or NULL on failure
(in such case err is set). The returned string should be freed
when no longer needed.
translate_session_translate_web_page ()translate_session_translate_web_pagechar* translate_session_translate_web_page
(TranslateSession *session,
const char *url,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err);
Translates a web page from the language from into the language
to.
If progress_func is specified, it may be
called periodically to report progress. If, when called,
progress_func returns FALSE, the translation is cancelled as soon
as possible, NULL is returned, and err is set to an error of
domain TRANSLATE_ERROR and code TRANSLATE_ERROR_CANCELLED.session : a session.
url : an URL.
from : a RFC 3066 language tag.
to : a RFC 3066 language tag.
progress_func : a function to call when progressing, or NULL.
user_data : data to pass to progress_func, or NULL.
err : a location to report errors, or NULL. Any of the errors in
TranslateSessionError, TranslateError or other domains may occur.
Returns : an URL pointing to the translated web page on
success, or NULL on failure (in such case err is set). The
returned string should be freed when no longer needed.
Properties"max-retries" (gint : Read / Write / Construct)The maximum number of times to retry a translation of the same chunk (-1 for unlimited)."max-threads" (guint : Read / Write / Construct)The maximum number of translation threads to use."pairs" (gpointer : Read)The list of pairs this session supports."services" (gpointer : Read / Write / Construct)The list of services used by this session.
libtranslate-0.99/docs/reference/xml/translate-service.xml 000644 001750 001750 00000037521 10176431055 025552 0 ustar 00jylefort jylefort 000000 000000 TranslateService3LIBTRANSLATE LibraryTranslateServiceservice objectSynopsis
struct TranslateService;
struct TranslateServiceClass;
const char* translate_service_get_name (TranslateService *service);
const char* translate_service_get_nick (TranslateService *service);
unsigned int translate_service_get_max_chunk_len
(TranslateService *service);
const GSList* translate_service_get_pairs (TranslateService *service);
Object Hierarchy
GObject
+----TranslateService
Properties
"max-chunk-len" guint : Read / Write / Construct Only
"name" gchararray : Read / Write / Construct Only
"nick" gchararray : Read / Write / Construct Only
"pairs" gpointer : Read
Description
A TranslateService object defines a set of language pairs as well as
the methods to translate a text or web page using one of the pairs.
A new translation service can be implemented in two ways:
Adding a definition to the services.xml file
The generic module provides an abstract framework for supporting
web-based translation services. At runtime, the generic module reads
service definitions from services.xml files and
creates the services defined in these files.
If you are adding support for a web-based translation service, this is
the way to go. See the
services.xml5
manual page for more details.
Creating a TranslateService subclass
If the services.xml file cannot satisfactorily be
used to describe the service you want to implement, you need to
program the service in C by creating a subclass of TranslateService
and overriding the get_pairs, translate_text and/or
translate_web_page methods.
If you want all the applications using libtranslate to be able to use
the new service, you need to create a libtranslate module and install
it in the appropriate path (see Compiling libtranslate Modules).
Otherwise, just integrate the service with your application. In either
case, you need to expose an instance of the service to libtranslate by
calling translate_add_service(). If the service is included in a module,
this needs to be done from translate_module_init(). Otherwise, do it
from your application initialization code, somewhere after the call to
translate_init().
Detailsstruct TranslateServiceTranslateServicestruct TranslateService;
The TranslateService struct contains private data only, and should be
accessed using the functions below.
struct TranslateServiceClassTranslateServiceClassstruct TranslateServiceClass {
GObjectClass parent;
gboolean (*get_pairs) (TranslateService *service,
GSList **pairs,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err);
char *(*translate_text) (TranslateService *service,
const char *text,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err);
char *(*translate_web_page) (TranslateService *service,
const char *url,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err);
};
The service class contains methods which should be implemented by
subclasses in order to provide the service functionality.
Implementing the get_pairs method is mandatory. The translate_text
and translate_web_page methods are only required if any pair returned
by the get_pairs method has the TRANSLATE_PAIR_TEXT or
TRANSLATE_PAIR_WEB_PAGE flag set, respectively.
GObjectClass parentthe parent class
gboolean (*get_pairs) (TranslateService *service,
GSList **pairs,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err)Specifies the function which is called to retrieve the
list of language pairs implemented by service. The function should
return TRUE and store a list of TranslatePair objects in pairs on
success, or return FALSE and store an error in err on failure. If
progress_func is not NULL, get_pairs should call it at regular
intervals with a progress update (or -1 if the progress is unknown),
and the user_data argument. If, when called, progress_func returns
FALSE, get_pairs must cancel the operation as soon as possible,
return NULL, and set err to an error of domain TRANSLATE_ERROR and
code TRANSLATE_ERROR_CANCELLED.
char* (*translate_text) (TranslateService *service,
const char *text,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err)Specifies the function which is called to translate a
chunk of text. The function should return a newly-allocated string
containing the translation of text on success, or return NULL and
set err on failure. If the max-chunk-len
property of service is not 0, it is guaranteed that the number of
UTF-8 characters in text will not exceed max-chunk-len . It is
guaranteed that the from/to pair will be a member (with the flag
TRANSLATE_PAIR_TEXT set) of the list returned by the get_pairs
method. If progress_func is not NULL, translate_text should call it
at regular intervals with a progress update (or -1 if the progress is
unknown), and the user_data argument. If, when called, progress_func
returns FALSE, translate_text must cancel the translation as soon as
possible, return NULL, and set err to an error of domain
TRANSLATE_ERROR and code TRANSLATE_ERROR_CANCELLED.
char* (*translate_web_page) (TranslateService *service,
const char *url,
const char *from,
const char *to,
TranslateProgressFunc progress_func,
gpointer user_data,
GError **err)Specifies the function which is called to
translate a web page. The function should return a newly-allocated
string containing the URL of the translated web page on success, or
return NULL and set err on failure. It is guaranteed that the
from/to pair will be a member (with the flag
TRANSLATE_PAIR_WEB_PAGE set) of the list returned by the get_pairs
method. If progress_func is not NULL, translate_web_page should
call it at regular intervals with a progress update (or -1 if the
progress is unknown), and the user_data argument. If, when called,
progress_func returns FALSE, translate_web_page must cancel the
translation as soon as possible, return NULL, and set err to an
error of domain TRANSLATE_ERROR and code TRANSLATE_ERROR_CANCELLED.
translate_service_get_name ()translate_service_get_nameconst char* translate_service_get_name (TranslateService *service);
Gets the symbolic name of service.service : a service.
Returns : the symbolic name of service, encoded in ASCII.
translate_service_get_nick ()translate_service_get_nickconst char* translate_service_get_nick (TranslateService *service);
Gets the human-readable name of service.service : a service.
Returns : the human-readable name of service.
translate_service_get_max_chunk_len ()translate_service_get_max_chunk_lenunsigned int translate_service_get_max_chunk_len
(TranslateService *service);
Gets the maximum chunk length of service.service : a service.
Returns : the maximum chunk length of service, in characters.
translate_service_get_pairs ()translate_service_get_pairsconst GSList* translate_service_get_pairs (TranslateService *service);
Gets the list of language pairs implemented by service.service : a service.
Returns : a list of TranslatePair objects.
Properties"max-chunk-len" (guint : Read / Write / Construct Only)The maximum length of an input chunk, in characters (0 means unlimited)."name" (gchararray : Read / Write / Construct Only)The service symbolic name, encoded in ASCII."nick" (gchararray : Read / Write / Construct Only)The service human-readable name."pairs" (gpointer : Read)The list of language pairs this service implements.
libtranslate-0.99/docs/reference/xml/translate-pair.xml 000644 001750 001750 00000030374 10176431055 025044 0 ustar 00jylefort jylefort 000000 000000 TranslatePair3LIBTRANSLATE LibraryTranslatePairlanguage pair object and functions for handling pair listsSynopsis
struct TranslatePair;
enum TranslatePairFlags;
TranslatePair* translate_pair_new (TranslatePairFlags flags,
const char *from,
const char *to);
TranslatePairFlags translate_pair_get_flags (TranslatePair *pair);
const char* translate_pair_get_from (TranslatePair *pair);
const char* translate_pair_get_to (TranslatePair *pair);
GSList* translate_pairs_sort_by_tag (GSList *pairs);
GSList* translate_pairs_sort_by_name (GSList *pairs);
TranslatePair* translate_pairs_find (const GSList *pairs,
const char *from,
const char *to);
Object Hierarchy
GObject
+----TranslatePair
Properties
"flags" TranslatePairFlags : Read / Write / Construct Only
"from" gchararray : Read / Write / Construct Only
"to" gchararray : Read / Write / Construct Only
Description
A TranslatePair object defines the source and destination languages
of a translation, as well as flags specifying the contexts of
application of the pair.
You only need to create pairs if you are implementing a service (see
the get_pairs method of TranslateServiceClass).
Detailsstruct TranslatePairTranslatePairstruct TranslatePair;
The TranslatePair struct contains private data only, and should be
accessed using the functions below.
enum TranslatePairFlagsTranslatePairFlagstypedef enum
{
TRANSLATE_PAIR_TEXT = 1 << 0,
TRANSLATE_PAIR_WEB_PAGE = 1 << 1
} TranslatePairFlags;
Specifies the features of a TranslatePair object.
TRANSLATE_PAIR_TEXTthe pair can be used to translate text
TRANSLATE_PAIR_WEB_PAGEthe pair can be used to translate a web page
translate_pair_new ()translate_pair_newTranslatePair* translate_pair_new (TranslatePairFlags flags,
const char *from,
const char *to);
Creates a new language pair.flags : the pair flags.
from : the source language RFC 3066 tag.
to : the destination language RFC 3066 tag.
Returns : a new language pair.
translate_pair_get_flags ()translate_pair_get_flagsTranslatePairFlags translate_pair_get_flags (TranslatePair *pair);
Gets the flags of pair.pair : a pair.
Returns : the pair flags.
translate_pair_get_from ()translate_pair_get_fromconst char* translate_pair_get_from (TranslatePair *pair);
Gets the source language of pair.pair : a pair.
Returns : the RFC 3066 tag of the source language of pair.
translate_pair_get_to ()translate_pair_get_toconst char* translate_pair_get_to (TranslatePair *pair);
Gets the destination language of pair.pair : a pair.
Returns : the RFC 3066 tag of the destination language of
pair.
translate_pairs_sort_by_tag ()translate_pairs_sort_by_tagGSList* translate_pairs_sort_by_tag (GSList *pairs);
Sorts a pair list by source and destination RFC 3066 tag. Tag
comparisons are performed using translate_ascii_strcasecoll().pairs : a list of TranslatePair objects.
Returns :pairs sorted.
translate_pairs_sort_by_name ()translate_pairs_sort_by_nameGSList* translate_pairs_sort_by_name (GSList *pairs);
Sorts a pair list by source and destination human-readable language
name. Names are obtained using translate_get_language_name(), and
are compared using translate_utf8_strcasecoll().pairs : a list of TranslatePair objects.
Returns :pairs sorted.
translate_pairs_find ()translate_pairs_findTranslatePair* translate_pairs_find (const GSList *pairs,
const char *from,
const char *to);
Finds the first pair in pairs whose source and/or destination
language match from and/or to.pairs : a list of TranslatePair objects.
from : a RFC 3066 tag, or NULL.
to : a RFC 3066 tag, or NULL.
Returns : a pair, or NULL if not found. The returned pair
belongs to pairs, its reference count is not incremented.
Properties"flags" (TranslatePairFlags : Read / Write / Construct Only)The pair flags."from" (gchararray : Read / Write / Construct Only)The source language RFC 3066 tag."to" (gchararray : Read / Write / Construct Only)The destination language RFC 3066 tag.
libtranslate-0.99/docs/reference/xml/translate-common.xml 000644 001750 001750 00000003662 10176431055 025401 0 ustar 00jylefort jylefort 000000 000000 translate-common3LIBTRANSLATE Librarytranslate-commoncommon declarationsSynopsis
gboolean (*TranslateProgressFunc) (double progress,
gpointer user_data);
Description
The following declaration is used in several places.
DetailsTranslateProgressFunc ()TranslateProgressFuncgboolean (*TranslateProgressFunc) (double progress,
gpointer user_data);
Specifies the type of function which is called when a task has just
progressed.progress : the task progress from 0.0 to 1.0 inclusive, or -1 if
the progress is not known.
user_data : data associated with the function.
Returns : the function should return FALSE if the task must be
cancelled.
libtranslate-0.99/docs/reference/html 000777 001750 001750 00000000000 10176431055 021456 5 ustar 00jylefort jylefort 000000 000000 libtranslate-0.99/docs/reference/html/TranslatePair.html 000644 001750 001750 00000035445 10176431055 025203 0 ustar 00jylefort jylefort 000000 000000 TranslatePair
libtranslate Reference Manual
TranslatePair
TranslatePair — language pair object and functions for handling pair lists
"flags" TranslatePairFlags : Read / Write / Construct Only
"from" gchararray : Read / Write / Construct Only
"to" gchararray : Read / Write / Construct Only
Description
A TranslatePair object defines the source and destination languages
of a translation, as well as flags specifying the contexts of
application of the pair.
You only need to create pairs if you are implementing a service (see
the get_pairs method of TranslateServiceClass).
Details
struct TranslatePair
struct TranslatePair;
The TranslatePair struct contains private data only, and should be
accessed using the functions below.
The following example demonstrates how to use libtranslate for
creating a simple command-line text and web page translator.
The source code of this example is available in the libtranslate
source distribution
(docs/reference/example-application.c),
and is reproduced below.
On UNIX, compile it as follows:
$ cc `pkg-config --cflags --libs libtranslate` example-application.c -o example-application
/*
* Copyright (C) 2005 Jean-Yves Lefort
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Jean-Yves Lefort nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <locale.h>
#include <stdlib.h>
#include <translate.h>
int
main (int argc, char **argv)
{
GError *err = NULL;
GSList *services;
TranslateSession *session;
char *translation;
setlocale(LC_ALL, ""); /* use user's locale */
if (argc != 4)
{
g_printerr("Usage: translate FROM TO {TEXT | HTTP_URL | HTTPS_URL}\n");
exit(1);
}
/* initialize libtranslate */
if (! translate_init(&err))
{
g_printerr("Unable to initialize libtranslate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* create a session which will use all the services */
services = translate_get_services();
session = translate_session_new(services);
g_slist_foreach(services, (GFunc) g_object_unref, NULL);
g_slist_free(services);
/* translate text or web page, depending on the string given */
translation = (g_str_has_prefix(argv[3], "http://")
|| g_str_has_prefix(argv[3], "https://"))
? translate_session_translate_web_page(session, argv[3], argv[1], argv[2],
NULL, NULL, &err)
: translate_session_translate_text(session, argv[3], argv[1], argv[2],
NULL, NULL, &err);
/* handle failure */
if (! translation)
{
g_printerr("Unable to translate: %s\n", err->message);
g_error_free(err);
exit(1);
}
/* success, print the translation, cleanup and exit */
g_print("%s\n", translation);
g_free(translation);
g_object_unref(session);
return 0;
}