Simple Translation tool: add File menu command 'Open in Wide Coverage Translation Demo'

Just as a quick way to test different documents in the Wide Coverage
Translation Demo.
This commit is contained in:
hallgren
2015-03-06 12:04:17 +00:00
parent 4e4d2a77e1
commit 4c03e2e67d
2 changed files with 15 additions and 1 deletions
+13
View File
@@ -733,6 +733,19 @@ Translator.prototype.import_globalsight=function(el) {
setTimeout(imp,100) // leave time to hide the menu first
}
Translator.prototype.open_in_wc=function(el) {
var t=this
hide_menu(el)
var doc=t.document
var sourcetext=doc.segments.map(function(s){return s.source}).join(" ")
var wc=appLocalStorage("gf.wc.")
wc.put("from",doc.options.from)
wc.put("to",doc.options.to)
wc.put("input",sourcetext)
var w=window.open("../wc.html","wc")
w.focus()
}
Translator.prototype.remove=function(el) {
var t=this
if(t.document.globalsight) return