mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
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.open_in_wc(this)">Open in Wide Coverage Translation Demo
|
||||
</dl>
|
||||
<td><span onclick="">Edit</span>
|
||||
<dl>
|
||||
@@ -78,7 +79,7 @@
|
||||
</div>
|
||||
<hr>
|
||||
<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>
|
||||
<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
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user