forked from GitHub/gf-core
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:
@@ -24,6 +24,7 @@
|
|||||||
<!--
|
<!--
|
||||||
<dt onclick="translator.close(this)">Close
|
<dt onclick="translator.close(this)">Close
|
||||||
-->
|
-->
|
||||||
|
<dt onclick="translator.open_in_wc(this)">Open in Wide Coverage Translation Demo
|
||||||
</dl>
|
</dl>
|
||||||
<td><span onclick="">Edit</span>
|
<td><span onclick="">Edit</span>
|
||||||
<dl>
|
<dl>
|
||||||
@@ -78,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class=modtime><small>HMTL
|
<div class=modtime><small>HMTL
|
||||||
<!-- hhmts start -->Last modified: Fri Apr 11 14:10:02 CEST 2014 <!-- hhmts end -->
|
<!-- hhmts start -->Last modified: Fri Mar 6 12:46:23 CET 2015 <!-- hhmts end -->
|
||||||
</small></div>
|
</small></div>
|
||||||
<a href="about.html">About</a>
|
<a href="about.html">About</a>
|
||||||
|
|
||||||
|
|||||||
@@ -733,6 +733,19 @@ Translator.prototype.import_globalsight=function(el) {
|
|||||||
setTimeout(imp,100) // leave time to hide the menu first
|
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) {
|
Translator.prototype.remove=function(el) {
|
||||||
var t=this
|
var t=this
|
||||||
if(t.document.globalsight) return
|
if(t.document.globalsight) return
|
||||||
|
|||||||
Reference in New Issue
Block a user