Blob Blame Raw
.TH tmserver 1 "Translate Toolkit 1.3.0" "" "Translate Toolkit 1.3.0"
.SH NAME
tmserver \- a Translation Memory server,
.SH SYNOPSIS
\fBtmserver\fP \fB--bind\fP=\fIHOSTNAME\fP \fB--port\fP=\fIPORT\fP
[\fB--tmdb\fP=\fITMDBFILE\fP]
[\fB--import-translation-file\fP=\fITMFILE\fP
[\fB--import-source-lang\fP=\fISOURCE_LANG\fP]
[\fB--import-target-lang\fP=\fITARGET_LANG\fP]]

Where \fITMDBFILE\fP is the sqlite database file containing tmdb translation
memory data, if not specified a new temporary database is created, and
\fITMFILE\fP is a translation file (po, xliff, etc.) that should be imported
into the database (mostly useful when no tmdb file is specified).

.SH DESCRIPTION
\fBtmserver\fP is a Translation Memory service that can be queried via
HTTP using a simple REST like URL/http and data is exchanged between
server and client encoded in JSON.
.SH OPTIONS
.TP
\fB-h\fP, \fB--help\fP
show this help message and exit
.TP
\fB-d\fP \fITMDBFILE\fP, \fB--tmdb\fP=\fITMDBFILE\fP
translation memory database
.TP
\fB-f\fP \fITMFILES\fP, \fB--import-translation-file\fP=\fITMFILE\fP
translation file to import into the database
.TP
\fB-t\fP \fITARGET_LANG\fP, \fB--import-target-lang\fP=\fITARGET_LANG\fP
target language of translation files
.TP
\fB-s\fP \fISOURCE_LANG\fP, \fB--import-source-lang\fP=\fISOURCE_LANG\fP
source language of translation files
.TP
\fB-b\fP \fIBIND\fP, \fB--bind\fP=\fIHOSTNAME\fP
address to bind server to
.TP
\fB-p\fP \fIPORT\fP, \fB--port\fP=\fIPORT\fP
port to listen on
.SH EXAMPLE
The easiest way to run the server for testing is to pass it a large
translation file (maybe generated by \fBpocompendium\fP) to create a tmdb
database on the fly.

.B tmserver -b localhost -p 8080 -f compendium.po -s en_US -t ar

The server can be queried using a webbrowser. The url would be
http://HOST:PORT/tmserver/SOURCE_LANG/TARGET_LANG/unit/STRING

So to see suggestions for "open file" try the url
http://localhost:8080/tmserver/en_US/ar/unit/open+file