| Age | Commit message (Collapse) | Author |
|
Click on sentences to choose among alternative translations.
|
|
|
|
|
|
|
|
The layout now resembles a certain other online translation service.
The translation is started automatically after text is entered, no need to
press the Translate button.
|
|
|
|
The maximum number of alternatives shown has been increased from 2 to 5
although it can slow down translation.
|
|
|
|
The demo web app now show translations from Phrasebook.pgf in green before
translations from Translate8.pgf, which can be yellow or red.
|
|
+ Adapt language selection menus to the languages supported by the grammar.
+ Add translation quality colors to the links to alternative translations.
+ Also added more country codes in langcode.js (needed for speech synthesis
voice selection).
|
|
The background color of the translation changes to pale green, yellow or red
according to the quality.
Two types of quality indications are supported:
+ From the grammar: linearizations starting with "+" or "*" are assumed to
be of high or low quality, respectively.
+ From the parse tree: if the root function is "?", then the translation is
assumed to be of low quality.
If no quality indications are detected, medium quality is assumed.
|
|
In support.js, the functions http_get_json, ajax_http_get_json
and ajax_http_post_json now calls the supplied error callback if the server
returns invalid JSON (e.g. because of a crash).
The function gftranslate.translate in gftranslate.js returns
a JSON value containing an error message (since it doesn't have an error
callback).
This should result in fewer situations where "nothing happens" and the user
doesn't know if it is beacuse the server is slow, or if there was an error.
|
|
Works in Safari and Chrome.
|
|
Cross-origin requests are allowed by the PGF service and are supported in
all modern browsers.
See http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
|
|
|
|
factored out from src/www/translator/translator.js
|
|
The translations are loaded one at a time so you don't have to wait for all
10 to see the first one.
|
|
+ PGFService.hs: add command c-grammar, include probability in parse results
+ js/gftranslation.js: add start position and limit parameters, return more
info to applications
+ Simple Translator: show two wide coverage translations
+ Wide coverage demo: show parse tree and probability (intended as grammar
debugging aids)
|
|
+ Add lexing/unlexing
+ Add a button to swap input and output
+ Minor layout adjustments
|
|
Translation'
The interface to the wide coverage translation is in js/gftranslate.js
and it assumes that the grammar is installed on the cloud server
as /robust/Translate8.pgf.
The list of supported languages is hardwired in gftranslate.js, since
there is no support for obtaining this info from the C run-time system
at the moment.
|
|
|
|
|
|
|
|
|
|
Show error message "Offline" if browser is offline.
|
|
(Also fixed a broken link in gf-web-api-examples.html)
|
|
|
|
Minibar should now work if localStorage is disabled or unavailable.
(In Firefox, disabling cookies also disables localStorage.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The with(...) {...} statement has different scoping rules in Webkit browsers
and Gecko browsers, so it is better to avoid it.
|
|
Return the given default value instead.
|
|
via the minibar
|
|
The C run-time responds badly to input that is too long, so we return an
error message here instead.
The limit is 200 URL-encoded characters.
|
|
|
|
...for more streamlined code and better browser compatibility.
|
|
Nowadays GF includes alltenses by default in the grammar search path.
|
|
|
|
in the documentation of command=remake.
|
|
Unrecoginzed parameter in cloud service requests are silently ignored.
|
|
by separate punctuation from the string sent to the robust parser.
Also added buttons to view parse trees from the robust parser.
|
|
|
|
The minibar has the alternative "All" in the target language menu. This should
not be included when transfering to the syntax editor.
|
|
Add minibar option to_multiple to be able to turn off selection of multiple
target languages.
|
|
+ The syntax editor is now accessible from the Simple Translaton Tool.
+ The minibar now automatically provides access to the syntax editor (provided
the necessary JavaScript files and style sheets have been loaded).
+ Preparations for making the syntax editor accessible from the grammar editor.
|
|
|