Commit Graph
100 Commits
Author SHA1 Message Date
hallgren 302b9f1b13 More detailed version info in the output of "gf -version" 2012-06-08 11:17:46 +00:00
hallgren e9abd71899 translator.css: restore lost width of input field 2012-06-08 11:16:21 +00:00
hallgren 22e1a5b9f7 Setup.hs: fix two problems with querying darcs 2012-05-30 16:15:59 +00:00
hallgren 13cda24924 More detailed version info in the startup message
The Setup.hs script now queries darcs to create more detailed version info
to include in the startup message.

Note thought that with distributed version control systems like darcs,
the only way to uniquely identify a version is by the set of patches included.
Since the patches are not totally ordered, just looking at the last patch is
not enough.

For official releases, we tag the current set of patches so we can refer to
it by name (e.g. RELEASE-3.3.3).
2012-05-30 15:45:45 +00:00
hallgren 7196bc8669 translator: segment imported text based on punctuation 2012-05-29 14:47:59 +00:00
hallgren 9e34a7f7fa translator: better support for ambiguous translations
The translator picks "the first" translation by default, but the user can
choose among the generated translations from a popup menu.
2012-05-28 16:42:02 +00:00
hallgren b19ae37d9c GFServer.hs: apply UTF8 encoding when saving uploaded files
This fixes a bug introduced on May 16.
2012-05-28 11:21:30 +00:00
hallgren 943652a3d2 translator: adding "Parallel texts" view
This is in addition to the existing "Segment by Segment" view.
Also some minor documentation updates.
2012-05-27 19:19:54 +00:00
hallgren 1215f2b951 gf -server: remove debug output 2012-05-27 11:52:15 +00:00
hallgren 9e32e9fde7 translator: you can now import text by copying and pasting 2012-05-25 16:48:03 +00:00
hallgren 215ec25a41 translator: use a more robust test for localStorage support and show a warning if it is missing 2012-05-23 14:39:05 +00:00
hallgren 6f328c9040 translator: fix typo 2012-05-16 14:56:32 +00:00
hallgren 7c8a744ad1 translator: update About page 2012-05-16 14:54:16 +00:00
hallgren 5bd17709bf translator: use GF's text lexer/unlexer to obtain more natural looking text
Note though that the unlexer does the wrong thing with initial words that are
supposed to be capitalized, e.g. "I am ready.", "Spanish wine is good.", so
these sentenses are not translated at the moment.
2012-05-16 14:42:26 +00:00
hallgren 114788a3db GFServer.hs: apply UTF8 decoding to all server input 2012-05-16 14:03:09 +00:00
hallgren 5ac7bfc326 translator: file browser shows files alphabetically now 2012-05-16 13:25:18 +00:00
hallgren adffb5f872 translator: bug fix
My menu hiding hack didn't work in Gecko browsers because of a difference in
the behaviour of the JavaScript setTimeout function.
2012-05-16 11:53:27 +00:00
hallgren 66e6b5269d Adding a Simple Translation Tool
It is part of the cloud services available with gf -server.
2012-05-15 15:36:06 +00:00
hallgren e90e1202c4 Integrate Japanese
* Update Setup.hs to build Japanese by default.
* News item about Japanese on the home page.
* Add Japanese to the supported RGL imports in the grammar editor (gfse).
2012-05-15 13:11:32 +00:00
hallgren 74cd9c4979 Quick updates to doc/gf-developers.t2t 2012-05-15 12:51:58 +00:00
hallgren 26ffcdbde8 Demos: add a note that the WebAlt Math translator is out of order 2012-05-04 12:52:05 +00:00
hallgren 841e54e3dc alex 3 incompatibility workaround
As a temporary workaround, alex is no longer invoked automatically when
building with cabal. Developers who want to modify the lexer need to run
alex on Lexer.x manually and record the modified Lexer.hs.

    src/compiler/GF/Grammar/lexer/Lexer.x    -- hidden from cabal
    src/compiler/GF/Grammar/Lexer.hs         -- update it manually
2012-05-04 12:39:07 +00:00
hallgren 3022c7d08e minibar_offline: fix the link to the regular minibar 2012-04-30 14:03:58 +00:00
hallgren c10bd79e26 minibar_offline: Update the API exported by pgf_offline.js to be compatible with pgf_online.js
This makes the minibar offline demo work again.
2012-04-30 13:53:55 +00:00
hallgren c6c9b994d2 minibar: word-for-word replacements: use concrete syntax for replacement words when possible
Instead of showing the name of a function in the abstract syntax, linearize it
and show the result. For functions with argument, e.g. That : Kind -> Item,
the function is applied to the right number of placeholder arguments: 'That ?'.
If the linearization fails, the name of the function is shown anyway.
2012-04-27 14:00:01 +00:00
hallgren c69f69ee9c minibar&gfse: grammar extension user interface improvements
The grammar extension is now done with a regular HTML form, so you can use the
TAB key to move between the fields and press ENTER to submit the extension when
you are done.
TODO: more immediate error feedback
2012-04-24 17:13:33 +00:00
hallgren 9d47b83e07 minibar & cloud service: minor style changes
Also include the GF logo on the cloud service start page.
2012-04-19 15:34:56 +00:00
hallgren 98ed039498 Minibar documentation update
Document recent additions in minibar/about.html.
2012-04-19 12:36:03 +00:00
hallgren ff812613c8 minibar: add buttons to use generated translations as input
This functionality was available in the origial Fridge Poetry app, but has been
missing in minibar until now.
2012-04-18 16:26:49 +00:00
hallgren 6dc12cfed9 download page: fixed a typo 2012-04-14 11:50:11 +00:00
hallgren 13ce1911da download page: added a note that Xcode 3.2.3 or later is needed on Mac OS X
The Haskell Platform page for Mac states that Xcode 3.2 or later is ok, but
there seems to be a problem with Xcode 3.2.2.

Also added some other small clarifications.
2012-04-14 10:03:27 +00:00
hallgren baadce4acd minibar: fix to prevent the typed input field from losing focus when turning word-for-word replacment on or off 2012-04-11 14:03:39 +00:00
hallgren 68e2c0c0eb minibar: internal state type change
The current intput is now represented as an array of words instead of as a
string.
(This is the kind of change is scary to do in a dynamically type language
like JavaScript. In a statically typed language like Haskell you can do it
with confidence, since you know the compiler can help you catch all mistakes...)
2012-04-10 18:00:13 +00:00
hallgren 89b415ac37 minibar_input.js: internal state simplification
Get rid of list of previous states, which was only used to delete the last
word.
2012-04-10 16:49:51 +00:00
hallgren 500daf3bd4 minibar/pgf_online.js: pass arguments to the browse function in the same way as the other functions
Also document it in gf-web-api-examples.html.
2012-04-10 13:33:12 +00:00
hallgren 8b6817754b minibar&gfse: grammar extension user interface fixes
It works OK now, but it could be better, e.g. the number of mouse clicks
required to enter an extension could to be reduced...
2012-04-05 15:25:10 +00:00
hallgren 43c28ad276 minibar&gfse: first working grammar extension interface in minibar
There are still some user interface wrinkles to iron out.
2012-04-04 17:00:25 +00:00
hallgren a4a154e5e2 minibar: remember current input
If you leave the minibar and later return, the previous input will be
restored. One input string per grammar is rememebered, so you can also switch
back and forth between grammars without losing the input.
This is implemented using localStorage, i.e. the data is stored locally on
the user's device.
2012-04-03 14:53:23 +00:00
hallgren 7ee66302d1 minibar: better implementation of word replacement
Instead of trying to reconstruct the abstract tree from the bracketed string,
use the node numbers (the field called "fid") to identify which node in the
abstact syntax tree a word in the bracketed string corresponds to.
2012-04-02 16:05:11 +00:00
hallgren c2a72daa74 gf-server.cabal: mtl is needed to build pgf-server now 2012-04-02 15:58:21 +00:00
hallgren 1c1679227e PGFService.hs: add web API function "abstrjson"
Abstract syntax trees are represented as strings in the web API. To make them
easier to manipulate in JavaScript, the new function converts them to JSON.

To support structural editing, the nodes are numbered in the same way as in
the bracketed string created when linearizing an abstract syntax tree.

Example: "Pred (That Fish) Fresh" is converted to

	{fun:"Pred",fid:3,
	 children:[{fun:"That",fid:1,
		    children:[{fun:"Fish",fid:0}]},
		   {fun:"Fresh",fid:2}]}
2012-04-02 15:42:43 +00:00
hallgren 1db4fab25c support.js: add an implementation of Array.isArray for older browsers that lack it 2012-04-01 18:23:28 +00:00
hallgren 07b2e41c2c gf.cabal: removing -O2
Removing "ghc-options: -O2" from gf.cabal has the following advantages:

+ Compiling GF is faster (time drops from 182s to 142s on my laptop)
+ Compiling the RGL is faster (time drops from 159s to 155s on my laptop)
+ Without the hardwired optimization level, the 'cabal configure' options
  --enable-optimization=<n> and --disable-optimization work as expected
  (so if you still want -O2, use --enable-optimization=2)
+ GF can be compiled with ghc-7.2.2 and ghc-7.4.1 (-O2 triggers a bug in
  these versions of ghc, it seems. Another workaround, discovered by
  Sergei Trofimovich, is to use -O0 in Data.Binary.)
2012-03-30 15:07:12 +00:00
hallgren e85a3fff56 gfse&minibar: work in progress on grammar extension fromminibar 2012-03-29 17:10:36 +00:00
hallgren a519d01754 gfse: show an informative error message in browsers that lack support for localStorage 2012-03-29 14:11:38 +00:00
hallgren 47c116b5a6 Workaround for bug in ghc-7.2.2
An apparent bug in ghc-7.2.2 causes the type Value to be exported from PGF.Data.
Workaround: restrict the imports from PGF.Data in GF.Command.Abstract and
GF.Compile.GeneratePMCFG to avoid the clash with locally defined type Value.
(ghc-7.0.4 and ghc-7.4.1 appear to be free from this bug.)
2012-03-26 23:56:56 +00:00
hallgren a8ddb8fe5c minibar: support for adding grammars from several servers to the grammar menu
You can also add grammars from several directories on the same server of course.
The included minibar configuration file adds the user's own grammars from the
grammar editor.
2012-03-26 17:17:54 +00:00
hallgren 9a6887aa49 gfse: enable word replacement in minibar when activated from the editor 2012-03-26 17:13:40 +00:00
hallgren 671c9b5390 gfse&minibar: fix bug caused by function name clash
+ Function div_id was defined in both editor.js and support.js. Solution:
  moved the more general version from editor.js to support.js.
+ Function div_class was defined in both editor.js and support.js. Solution:
  resolv incompatibility with an argument type test and put the generalized
  function in support.js.
2012-03-26 17:08:29 +00:00
hallgren 14e7125958 gf-book: apply GF style sheet
Also brought index.txt and index.html back in sync. (It looks like someone
updated index.html instead of updating index.txt and regenerating index.html.)
2012-03-26 15:02:15 +00:00
hallgren ddf1ae4626 doc/icfp-2012.t2t: link back to ICFP 2012 web site 2012-03-23 13:27:08 +00:00
hallgren 9f6293d314 GF home page: News: GF Tutorial at ICFP 2012 2012-03-23 13:20:58 +00:00
hallgren 4673aeca7b minibar: word-for-word replacement fixes
Check that the reconstructed abstract syntax tree is type correct before
enabling word-for-word replacement. Show an error message if word replacement
nevertheless fails.
2012-03-22 14:33:42 +00:00
hallgren f8ea4b8046 pgf_online.js: error callbacks
To enable customized error handling, the methods in the pgf_online objects and
the AJAX server call functions in support.js accept an error callback function
as an extra argument, in addition to the callback (continuation) for normal
results.
2012-03-22 14:09:53 +00:00
hallgren 38162e0f53 ICFP 2012 tutorial page: use the GF stylesheet for a consistent look 2012-03-20 14:04:57 +00:00
hallgren 0d57b9fa09 minibar: word-for-word replacement fix
Turn off the highlighting that indicates that word-for-word replacement is
enabled when it is no longer available (e.g if a word is deleted and there no
longer is a complete parse).
2012-03-19 15:24:35 +00:00
hallgren 428c2184fa minibar: fix for recently introduced bug affacting Webkit browsers
It seems that in Gecko browsers, the effect of "with(x) stmts" reaches inside
the bodies of local functions in stmts, but in Webkit browers it does not.
2012-03-19 15:15:47 +00:00
hallgren 387deecd31 minibar: don't try to select the most recently used grammar if it isn't in the current grammar list 2012-03-19 00:35:10 +00:00
hallgren 0591f77658 minibar: automatically select the most recently used grammar when returning to the minibar 2012-03-18 23:54:50 +00:00
hallgren 07af8988d3 PGF run-time library: function names in BracketedString (experimental)
+ Make room for function names in the BracketedString data structure.
+ Fill in function names when linearizing an abstract syntax tree to a
  BracketedString.
+ Fill in wildCId when it is not obvious what the function is.
+ Function bracketedLinearize: for compatibility with the other linearization
  functions, return Leaf "" instead of error "cannot linearize".
+ Export flattenBracketedString from module PGF.
+ PGFServce: make function names available in the JSON representation of
  BracketedString.
2012-03-18 20:12:26 +00:00
hallgren 771c1a0ad7 minibar: word-for-word replacement (experimental)
The new functionality also needs some new PGF service functionality, which will
be provided in a separate patch.
2012-03-18 20:02:11 +00:00
hallgren 63e531ad39 Cloud service start page layout fix for small screens 2012-03-17 16:23:54 +00:00
hallgren 13ecc8bdc3 Adding a .ghci file to make it easier to load GF in ghci. 2012-03-16 14:01:29 +00:00
hallgren 7c484aeada PGFService.hs: command=browse can now produce output in JSON format.
To get JSON output, add the parameter format=json. The JSON structure contains
the output from the function PGF.browse.
The default is format=html for backwards compatibility.
2012-03-16 13:55:19 +00:00
hallgren d536d02d9b minibar: add an option to make it easy to select png or svg output
for abstract synax trees, parse trees and word alignment diagrams.
2012-03-08 15:30:31 +00:00
hallgren ff7d964e19 GF home page: direct link to Issues
"Wiki" is a word with very low information scent: there is no way to know
what type of informaiton is hiding behind the Wiki link, e.g., that there is
a bug tracker (or an FAQ), so not many users will click on it.
2012-03-08 15:24:26 +00:00
hallgren 53fd2c811b gf.cabal: update version number to 3.3.3-darcs 2012-03-08 13:03:25 +00:00
hallgren 0722f6f444 PGFService.hs: add output format option to the commands abstrtree, parsetree and alignment
Supported output formats: gv, png, svg.
2012-03-08 11:25:15 +00:00
hallgren d6c2943ad1 gfse: small usability improvements 2012-03-06 23:04:36 +00:00
hallgren d50c353fd3 gfse: more helpful hints about grammar parts and RGL modules 2012-03-05 21:12:33 +00:00
hallgren 6ee74e5df5 gfse: bug fix: avoid hickup when inhertiting from a missing concrete syntax 2012-03-05 20:47:52 +00:00
hallgren a55588aad5 gf-server.cabal: always build the fastcgi module (pgf-server), lower version requirement on the cgi package
+ The flag fastcgi is removed: building the fastcgi is the main purpose of
  this cabal file again.
+ pgf-http superseded by gf-server, but is still available as an option
+ Require cgi>=3001.7.3 instead of cgi>=3001.8.0.
2012-03-05 16:38:54 +00:00
hallgren 7df6ce1f77 minibar: tool tip on the feedback button and hint in the feedback form
that the user should select a language from the To: menu to suggest a better
translation to a particular language.
2012-03-05 14:54:42 +00:00
hallgren a5a82556af Update home page and download page for GF 3.3.3 release 2012-03-03 11:53:10 +00:00
hallgren 3790733e30 GF download page: Windows binary package added 2012-03-02 17:54:38 +00:00
hallgren 5983268552 GF 3.3.3 download page: initial set of binary packages added 2012-03-02 16:12:51 +00:00
hallgren 0da74edb95 Fix release notes typos 2012-03-02 13:43:02 +00:00
hallgren 4300847117 Updated GF 3.3.3 release notes 2012-03-02 13:33:37 +00:00
hallgren 21c278f28f gf.cabal: update version number to 3.3.3
but I am not tagging it yet, there is still time for some changes
2012-03-02 10:57:08 +00:00
hallgren 0ed816c118 Update doc/gf-help-full.txt
* echo help -full -t2t | gf -run >doc/gf-help-full.txt
* Insert 3 empty lines first in the file.
2012-03-01 19:39:42 +00:00
hallgren 7f4038e0a8 gfse: bug fix
Fix a problem opening grammars created before grammar extension was introduced.
2012-03-01 18:11:58 +00:00
hallgren 1100f87925 WebSetup.hs: avoid ? wildcards because of odd behaviour under Win32
There is some discussion here: http://www.xxcopy.com/xxcopy18.htm
2012-03-01 16:33:32 +00:00
hallgren 4a1fe5012f doc-phrasebook.txt: update link to minibar doc 2012-03-01 15:53:22 +00:00
hallgren 53d57cdb5b doc-phrasebook.txt: update hyperlinks
Link to www.grammaticalframework.org instead of code.haskell.org/gf.
2012-03-01 15:45:05 +00:00
hallgren 24a650be63 GF home page minor style update 2012-03-01 14:51:16 +00:00
hallgren f34b052847 Setup.hs: include Hindi and Thai by default in RGL builds 2012-03-01 14:25:41 +00:00
hallgren 2d58947d92 WebSetup.hs: use </> instead of '/' for Win32 compatibility 2012-03-01 14:21:47 +00:00
hallgren 145d8c149f Rename FoodsThai.gf back to FoodsTha.gf
so that it is included by default when building Foods.pgf for gf -server mode.
2012-03-01 13:53:48 +00:00
hallgren b727e676b4 gfse & minibar: minor style adjustments 2012-02-29 17:37:13 +00:00
hallgren 01404e579c gf -server: update start page, add links to some documentation 2012-02-29 17:05:45 +00:00
hallgren 9a6619e819 gfse: add missing file sort.js to the repository 2012-02-29 16:36:28 +00:00
hallgren f573d52b43 PGFService.hs bug fix: pattern match failure in doParse
doParse was missing a branch for PGF.ParseIncomplete.
Also introduced the operator .= to simply the code that builds JSON objects.
2012-02-29 16:21:34 +00:00
hallgren 4052767790 Updated GF 3.3.3 release notes 2012-02-28 17:47:10 +00:00
hallgren 6f42f58f71 gfse: Translation Quiz integration
Also moved the translation quiz from demos/TransQuiz to src/www/TransQuiz so
that it will be installed by 'cabal install' along with the other files that
are installed for use by gf -server mode.
2012-02-28 17:24:34 +00:00
hallgren c1c1a73dc3 gf -server mode: JSONP support for grammar lists
Needed by the translation quiz.
2012-02-28 17:20:59 +00:00
hallgren 6a5de9e7d8 GF 3.3.3 release notes: mention the new RGL languages 2012-02-28 15:53:08 +00:00
hallgren c2cf5c48e5 Updates for the GF 3.3.3 download page 2012-02-28 14:51:09 +00:00
hallgren 40148db81d Adding release notes and download page for version 3.3.3
Feel free to add to the release notes!
2012-02-28 11:02:08 +00:00
hallgren 4441c957ea gfse: recognize Predef categories Int, Float and String
but don't show them in the startcat menu.
2012-02-27 17:18:05 +00:00
hallgren c41974422f gfse: text mode improvements
+ Preserve the startcat flag.
+ Preserve judgement order when possible (GF's parser does not preserve order
  and does not record exact source locations, only line numbers)
2012-02-27 16:50:06 +00:00