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
ba6847a6
Commit
ba6847a6
authored
Mar 19, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
There is no need to manually set service id
parent
f661d691
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
9 deletions
+6
-9
trans/machine/base.py
trans/machine/base.py
+3
-3
trans/machine/dummy.py
trans/machine/dummy.py
+1
-2
trans/machine/mymemory.py
trans/machine/mymemory.py
+1
-2
trans/machine/opentran.py
trans/machine/opentran.py
+1
-2
No files found.
trans/machine/base.py
View file @
ba6847a6
...
...
@@ -35,13 +35,13 @@ class MachineTranslation(object):
'''
Generic object for machine translation services.
'''
name
=
None
verbose
=
None
name
=
'MT'
def
__init__
(
self
):
'''
Creates new machine translation object.
'''
self
.
mtid
=
self
.
name
.
lower
().
replace
(
' '
,
'-'
)
def
json_req
(
self
,
url
,
**
kwargs
):
'''
...
...
@@ -93,7 +93,7 @@ class MachineTranslation(object):
'''
Returns list of supported languages.
'''
cache_key
=
'%s-languages'
%
self
.
name
cache_key
=
'%s-languages'
%
self
.
mtid
# Try using list from cache
languages
=
cache
.
get
(
cache_key
)
...
...
trans/machine/dummy.py
View file @
ba6847a6
...
...
@@ -25,8 +25,7 @@ class DummyTranslation(MachineTranslation):
'''
Dummy machine translation for testing purposes.
'''
name
=
'dummy'
verbose
=
'Dummy'
name
=
'Dummy'
def
download_languages
(
self
):
'''
...
...
trans/machine/mymemory.py
View file @
ba6847a6
...
...
@@ -25,8 +25,7 @@ class MyMemoryTranslation(MachineTranslation):
'''
MyMemory machine translation support.
'''
name
=
'mymemory'
verbose
=
'MyMemory'
name
=
'MyMemory'
def
is_supported
(
self
,
language
):
'''
...
...
trans/machine/opentran.py
View file @
ba6847a6
...
...
@@ -26,8 +26,7 @@ class OpenTranTranslation(MachineTranslation):
'''
Open-Tran machine translation support.
'''
name
=
'open-tran'
verbose
=
'Open-Tran'
name
=
'Open-Tran'
def
download_languages
(
self
):
'''
...
...
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