Skip to content

Puppetize machine translation service on translate.lizard

Weblate uses the translate toolkit to provide real time suggestions for translations from a sqlite database that can be fed with .po files.

https://docs.weblate.org/en/weblate-2.10.1/admin/machine.html#tmserver

This is important because it saves time for the translators, specially in cumbersome documents, and helps us to be consistent not only with our translations but, for example, with the Debian locales if we feed them to the machine.

It is a very subtle way of increasing the quality of our translations.

So, the debian package provides `tmserver` http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/tmserver.html

tmserver 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.

So, first you feed the database (I have been breeding a little one myself) with
different files:

build_tmdb -d /var/lib/tm/db -s en -t cs locale/cs/LC_MESSAGES/django.po

and then you can run it like this:

tmserver -d /var/lib/tm/db

and query it like this:

http://HOST:PORT/tmserver/SOURCE_LANG/TARGET_LANG/unit/STRING
http://localhost:8080/tmserver/en/de/unit/contribute

I was thinking on maybe creating a systemd.service to run it.

Also, what about the database? shall we add it to the mutable_data dir?
Let me know what you think and then I move on

Feature Branch: emmapeel:feature/12223-tmserver

Attachments

Parent Task: #11759 (closed)

Related issues

Original created by @emmapeel on 12223 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information