Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
97b44647
Commit
97b44647
authored
Apr 18, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for Amagama service
parent
a63fed07
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
docs/admin.rst
docs/admin.rst
+10
-0
trans/machine/tmserver.py
trans/machine/tmserver.py
+8
-0
trans/tests/machine.py
trans/tests/machine.py
+5
-0
weblate/settings_example.py
weblate/settings_example.py
+1
-0
No files found.
docs/admin.rst
View file @
97b44647
...
...
@@ -425,6 +425,16 @@ up to adminitrator to enable them. The services have different terms of use, so
please check whether you are allowed to use them before enabling in Weblate.
The individual services are enabled using :setting:`MACHINE_TRANSLATION_SERVICES`.
Amagama
+++++++
Special installation of :ref:`tmserver` run by Virtaal authors.
To enable this service, add ``trans.machine.tmserver.AmagamaTranslation`` to
:setting:`MACHINE_TRANSLATION_SERVICES`.
.. seealso:: http://docs.translatehouse.org/projects/virtaal/en/latest/amagama.html
Apertium
++++++++
...
...
trans/machine/tmserver.py
View file @
97b44647
...
...
@@ -73,3 +73,11 @@ class TMServerTranslation(MachineTranslation):
return
[(
line
[
'target'
],
line
[
'quality'
],
self
.
name
,
line
[
'source'
])
for
line
in
response
]
class
AmagamaTranslation
(
TMServerTranslation
):
'''
Specific instance of tmserver ran by Virtaal authors.
'''
def
get_server_url
(
self
):
return
'http://amagama.locamotion.org'
trans/tests/machine.py
View file @
97b44647
...
...
@@ -27,6 +27,7 @@ from trans.machine.glosbe import GlosbeTranslation
from
trans.machine.mymemory
import
MyMemoryTranslation
from
trans.machine.opentran
import
OpenTranTranslation
from
trans.machine.apertium
import
ApertiumTranslation
from
trans.machine.tmserver
import
AmagamaTranslation
from
trans.machine.microsoft
import
(
MicrosoftTranslation
,
microsoft_translation_supported
)
...
...
@@ -82,6 +83,10 @@ class MachineTranslationTest(TestCase):
machine
=
GoogleTranslation
()
self
.
assertIsInstance
(
machine
.
translate
(
'cs'
,
'world'
,
None
),
list
)
def
test_amagama
(
self
):
machine
=
AmagamaTranslation
()
self
.
assertIsInstance
(
machine
.
translate
(
'cs'
,
'world'
,
None
),
list
)
class
WeblateTranslationTest
(
ViewTestCase
):
def
test_same
(
self
):
...
...
weblate/settings_example.py
View file @
97b44647
...
...
@@ -380,6 +380,7 @@ WHOOSH_INDEX = os.path.join(WEB_ROOT, 'whoosh-index')
# 'trans.machine.microsoft.MicrosoftTranslation',
# 'trans.machine.mymemory.MyMemoryTranslation',
# 'trans.machine.opentran.OpenTranTranslation',
# 'trans.machine.tmserver.AmagamaTranslation',
# 'trans.machine.tmserver.TMServerTranslation',
# 'trans.machine.weblatetm.WeblateSimilarTranslation',
# 'trans.machine.weblatetm.WeblateTranslation',
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment