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
e07ec347
Commit
e07ec347
authored
Mar 09, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6d7474aa
4b59b4c4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
25 deletions
+78
-25
docs/changes.rst
docs/changes.rst
+4
-1
docs/usage.rst
docs/usage.rst
+35
-0
media/js/loader.js
media/js/loader.js
+39
-24
No files found.
docs/changes.rst
View file @
e07ec347
...
@@ -6,7 +6,10 @@ weblate 0.5
...
@@ -6,7 +6,10 @@ weblate 0.5
Relased on ? 2012.
Relased on ? 2012.
* Support for machine translation using Apertium and Microsoft Translator.
* Support for machine translation using following online services:
* Apertium
* Microsoft Translator
* MyMemory
* Several new translations.
* Several new translations.
* Improved merging of upstream changes.
* Improved merging of upstream changes.
* Better handle concurrent git pull and translation.
* Better handle concurrent git pull and translation.
...
...
docs/usage.rst
View file @
e07ec347
...
@@ -66,3 +66,38 @@ As an anonymous user, you have no other choice than making a suggestion.
...
@@ -66,3 +66,38 @@ As an anonymous user, you have no other choice than making a suggestion.
However if you are logged in you can still decide to make only a suggestion
However if you are logged in you can still decide to make only a suggestion
instead of saving translation, for example in case you are unsure about the
instead of saving translation, for example in case you are unsure about the
translation and you want somebody else to review it.
translation and you want somebody else to review it.
Machine translation
-------------------
Based on configuration and your language, Weblate provides buttons for following
machine translation tools.
MyMemory
++++++++
Huge translation memory with machine translation.
.. seealso::
http://mymemory.translated.net/
Apertium
++++++++
A free/open-source machine translation platform providing translation to
limited set of lanugages.
.. seealso::
http://www.apertium.org/
Microsoft Translator
++++++++++++++++++++
Machine translation service. Weblate is currently using deprecated v1 API,
which might stop working in future.
.. seealso::
http://www.microsofttranslator.com/
media/js/loader.js
View file @
e07ec347
...
@@ -2,29 +2,8 @@ function text_change(e) {
...
@@ -2,29 +2,8 @@ function text_change(e) {
$
(
'
#id_fuzzy
'
).
attr
(
'
checked
'
,
false
);
$
(
'
#id_fuzzy
'
).
attr
(
'
checked
'
,
false
);
}
}
function
load_translate_apis
()
{
$
(
function
()
{
if
(
typeof
(
apertium
)
!=
'
undefined
'
&&
apertium
.
isTranslatablePair
(
'
en
'
,
target_language
))
{
$
(
'
.button
'
).
button
();
$
(
'
ul.menu li a
'
).
button
();
$
(
'
ul.breadcums
'
).
buttonset
();
$
(
'
div.progress
'
).
each
(
function
f
(
i
,
e
)
{
e
=
$
(
e
);
e
.
progressbar
({
value
:
parseInt
(
e
.
attr
(
'
id
'
))
})});
$
(
'
.accordion
'
).
accordion
();
$
(
'
.errorlist
'
).
addClass
(
'
ui-state-error ui-corner-all
'
);
$
(
'
.sug-accept
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-check
"
}});
$
(
'
.sug-delete
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-close
"
}});
$
(
'
.navi
'
).
buttonset
();
$
(
'
.button-first
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-first
"
}});
$
(
'
.button-next
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-next
"
}});
$
(
'
.button-prev
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-prev
"
}});
$
(
'
.button-end
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-end
"
}});
$
(
'
textarea.translation
'
).
change
(
text_change
).
keypress
(
text_change
).
autogrow
().
focus
();
$
(
'
#copy-text
'
).
button
({
text
:
true
,
icons
:
{
primary
:
"
ui-icon-arrow-1-s
"
}}).
click
(
function
f
()
{
$
.
get
(
"
/js/get/
"
+
$
(
'
#id_checksum
'
).
attr
(
'
value
'
)
+
'
/
'
,
function
(
data
)
{
$
(
'
#id_target
'
).
text
(
data
);
});
return
false
;
});
if
(
typeof
(
apertium
)
!=
'
undefined
'
&&
typeof
(
target_language
)
!=
'
undefined
'
&&
apertium
.
isTranslatablePair
(
'
en
'
,
target_language
))
{
$
(
'
#copy-text
'
).
after
(
'
<a href="#" id="translate-apertium">
'
+
gettext
(
'
Translate using Apertium
'
)
+
'
</a>
'
);
$
(
'
#copy-text
'
).
after
(
'
<a href="#" id="translate-apertium">
'
+
gettext
(
'
Translate using Apertium
'
)
+
'
</a>
'
);
$
(
'
#translate-apertium
'
).
button
({
text
:
true
,
icons
:
{
primary
:
"
ui-icon-shuffle
"
}}).
click
(
function
f
()
{
$
(
'
#translate-apertium
'
).
button
({
text
:
true
,
icons
:
{
primary
:
"
ui-icon-shuffle
"
}}).
click
(
function
f
()
{
$
.
get
(
"
/js/get/
"
+
$
(
'
#id_checksum
'
).
attr
(
'
value
'
)
+
'
/
'
,
function
(
data
)
{
$
.
get
(
"
/js/get/
"
+
$
(
'
#id_checksum
'
).
attr
(
'
value
'
)
+
'
/
'
,
function
(
data
)
{
...
@@ -37,7 +16,7 @@ $(function() {
...
@@ -37,7 +16,7 @@ $(function() {
return
false
;
return
false
;
});
});
}
}
if
(
typeof
(
Microsoft
)
!=
'
undefined
'
&&
typeof
(
target_language
)
!=
'
undefined
'
)
{
if
(
typeof
(
Microsoft
)
!=
'
undefined
'
)
{
var
langs
=
Microsoft
.
Translator
.
getLanguages
();
var
langs
=
Microsoft
.
Translator
.
getLanguages
();
if
(
langs
.
indexOf
(
target_language
)
!=
-
1
)
{
if
(
langs
.
indexOf
(
target_language
)
!=
-
1
)
{
$
(
'
#copy-text
'
).
after
(
'
<a href="#" id="translate-microsoft">
'
+
gettext
(
'
Translate using Microsoft Translator
'
)
+
'
</a>
'
);
$
(
'
#copy-text
'
).
after
(
'
<a href="#" id="translate-microsoft">
'
+
gettext
(
'
Translate using Microsoft Translator
'
)
+
'
</a>
'
);
...
@@ -51,4 +30,40 @@ $(function() {
...
@@ -51,4 +30,40 @@ $(function() {
});
});
}
}
}
}
$
(
'
#copy-text
'
).
after
(
'
<a href="#" id="translate-mymemory">
'
+
gettext
(
'
Translate using MyMemory
'
)
+
'
</a>
'
);
$
(
'
#translate-mymemory
'
).
button
({
text
:
true
,
icons
:
{
primary
:
"
ui-icon-shuffle
"
}}).
click
(
function
f
()
{
$
.
get
(
"
/js/get/
"
+
$
(
'
#id_checksum
'
).
attr
(
'
value
'
)
+
'
/
'
,
function
(
data
)
{
$
.
getJSON
(
"
http://mymemory.translated.net/api/get?q=
"
+
data
+
"
&langpair=en|
"
+
target_language
,
function
(
data
)
{
if
(
data
.
responseData
!=
''
)
{
$
(
'
#id_target
'
).
text
(
data
.
responseData
.
translatedText
);
}
});
});
});
}
$
(
function
()
{
$
(
'
.button
'
).
button
();
$
(
'
ul.menu li a
'
).
button
();
$
(
'
ul.breadcums
'
).
buttonset
();
$
(
'
div.progress
'
).
each
(
function
f
(
i
,
e
)
{
e
=
$
(
e
);
e
.
progressbar
({
value
:
parseInt
(
e
.
attr
(
'
id
'
))
})});
$
(
'
.accordion
'
).
accordion
();
$
(
'
.errorlist
'
).
addClass
(
'
ui-state-error ui-corner-all
'
);
$
(
'
.sug-accept
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-check
"
}});
$
(
'
.sug-delete
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-close
"
}});
$
(
'
.navi
'
).
buttonset
();
$
(
'
.button-first
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-first
"
}});
$
(
'
.button-next
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-next
"
}});
$
(
'
.button-prev
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-prev
"
}});
$
(
'
.button-end
'
).
button
({
text
:
false
,
icons
:
{
primary
:
"
ui-icon-seek-end
"
}});
$
(
'
textarea.translation
'
).
change
(
text_change
).
keypress
(
text_change
).
autogrow
().
focus
();
$
(
'
#copy-text
'
).
button
({
text
:
true
,
icons
:
{
primary
:
"
ui-icon-arrow-1-s
"
}}).
click
(
function
f
()
{
$
.
get
(
"
/js/get/
"
+
$
(
'
#id_checksum
'
).
attr
(
'
value
'
)
+
'
/
'
,
function
(
data
)
{
$
(
'
#id_target
'
).
text
(
data
);
});
return
false
;
});
if
(
typeof
(
target_language
)
!=
'
undefined
'
)
{
load_translate_apis
();
}
});
});
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