From 04895ef3ab7ecb64fd726cd624a6025e3cabf8f3 Mon Sep 17 00:00:00 2001 From: "john.j.camilleri" Date: Mon, 11 Jun 2012 10:43:41 +0000 Subject: [PATCH] RGL Browser: bug fix --- lib/doc/browse/Makefile | 3 ++- lib/doc/browse/build-tags.sh | 11 ++++++----- lib/doc/browse/index.json | 30 +++++++++++++++++++++++++++++- lib/doc/browse/script.js | 8 ++++---- 4 files changed, 41 insertions(+), 11 deletions(-) diff --git a/lib/doc/browse/Makefile b/lib/doc/browse/Makefile index 532a57d98..7885506b2 100644 --- a/lib/doc/browse/Makefile +++ b/lib/doc/browse/Makefile @@ -10,4 +10,5 @@ all: clean: find -name '*.gf-tags' | xargs rm cd $(dir) ; find -name '*.gfo' | xargs rm - cd $(dir) ; find -name '*.gf-tags' | xargs rm \ No newline at end of file + cd $(dir) ; find -name '*.gf-tags' | xargs rm + diff --git a/lib/doc/browse/build-tags.sh b/lib/doc/browse/build-tags.sh index 1c6998c41..4452c3dba 100644 --- a/lib/doc/browse/build-tags.sh +++ b/lib/doc/browse/build-tags.sh @@ -1,9 +1,9 @@ #!/bin/sh - -## +# # Script for building tags files for all RGL # John J. Camilleri, 2012 -## +# +#set -o errexit dir=`pwd` basedir=${dir}/../../src @@ -24,7 +24,8 @@ in_ignore() { # Iterate and build all the tags (takes some time) rm -f $index -echo "{\n\"languages\": {" >> $index +echo "{\n\"urlprefix\": \"/\"," >> $index +echo "\"languages\": {" >> $index for dir in `ls "$basedir/"` do if ! in_ignore $dir && [ -d "$basedir/$dir" ] ; then @@ -44,6 +45,6 @@ echo " \"\":{}\n}\n}" >> $index # Replace all URLs echo "Replacing URLs" cd $tagsdir -sed -ir "s|\S+?/lib/|/lib/|g" *.gf-tags +sed --in-place --regexp-extended "s|\S+?/lib/|/lib/|g" *.gf-tags exit 0 diff --git a/lib/doc/browse/index.json b/lib/doc/browse/index.json index 02999d2d7..4337e7a8e 100644 --- a/lib/doc/browse/index.json +++ b/lib/doc/browse/index.json @@ -1,5 +1,5 @@ { -"urlprefix": "/GF", +"urlprefix": "/", "languages": { "abstract": [ "Backward", @@ -234,6 +234,7 @@ "TryUrd", "TryRon", "CombinatorsJap", + "LangAPI", "CombinatorsUrd", "" ], @@ -449,6 +450,7 @@ "" ], "finnish": [ + "ParseFin", "MakeStructuralFin", "ConjunctionFin", "AllFinAbs", @@ -458,6 +460,7 @@ "ExtraFinAbs", "DictFin", "NounFin", + "DictEngFin", "AdjectiveFin", "ParadigmsFin", "ResFin", @@ -533,17 +536,21 @@ "NounGer", "AdverbGer", "IrregGerAbs", + "DictGer", "RelativeGer", "AdjectiveGer", "AllGerAbs", + "DictGerAbs", "NumeralGer", "ExtGer", "ParadigmsGer", "SentenceGer", "ExtraGer", + "ParseGer", "AllGer", "VerbGer", "PhraseGer", + "DictEngGer", "GrammarGer", "IdiomGer", "MakeStructuralGer", @@ -553,6 +560,25 @@ "TenseGer", "" ], + "hebrew": [ + "CatHeb", + "ParadigmsHeb", + "TenseHeb", + "AdverbHeb", + "LangHeb", + "VerbHeb", + "PhraseHeb", + "SentenceHeb", + "MorphoHeb", + "AdjectiveHeb", + "NounHeb", + "GrammarHeb", + "PatternsHeb", + "LexiconHeb", + "ResHeb", + "StructuralHeb", + "" + ], "hindi": [ "ExtraHin", "IdiomHin", @@ -711,6 +737,7 @@ "PhraseJap", "CommonJap", "ConjunctionJap", + "ExtraJap", "AdverbJap", "NounJap", "TextJap", @@ -718,6 +745,7 @@ "GrammarJap", "AllJap", "LexiconJap", + "ExtraJapAbs", "TenseJap", "CatJap", "RelativeJap", diff --git a/lib/doc/browse/script.js b/lib/doc/browse/script.js index a2c2a433f..199221d79 100644 --- a/lib/doc/browse/script.js +++ b/lib/doc/browse/script.js @@ -57,7 +57,7 @@ $(document).ready(function() { } var current_language = undefined; - var urlPrefix = ""; + var urlPrefix = "/"; var index; $.ajax({ url: "index.json", @@ -65,7 +65,7 @@ $(document).ready(function() { type: "GET", success: function(data) { index = data; - urlPrefix = data['urlprefix']; + if (data['urlprefix']) urlPrefix = data['urlprefix']; // Initialize the language list var lang_select = $("