RGL Browser: bug fix

This commit is contained in:
john.j.camilleri
2012-06-11 10:43:41 +00:00
parent 53d66d5e98
commit 04895ef3ab
4 changed files with 41 additions and 11 deletions

View File

@@ -10,4 +10,5 @@ all:
clean: clean:
find -name '*.gf-tags' | xargs rm find -name '*.gf-tags' | xargs rm
cd $(dir) ; find -name '*.gfo' | xargs rm cd $(dir) ; find -name '*.gfo' | xargs rm
cd $(dir) ; find -name '*.gf-tags' | xargs rm cd $(dir) ; find -name '*.gf-tags' | xargs rm

View File

@@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
#
##
# Script for building tags files for all RGL # Script for building tags files for all RGL
# John J. Camilleri, 2012 # John J. Camilleri, 2012
## #
#set -o errexit
dir=`pwd` dir=`pwd`
basedir=${dir}/../../src basedir=${dir}/../../src
@@ -24,7 +24,8 @@ in_ignore() {
# Iterate and build all the tags (takes some time) # Iterate and build all the tags (takes some time)
rm -f $index rm -f $index
echo "{\n\"languages\": {" >> $index echo "{\n\"urlprefix\": \"/\"," >> $index
echo "\"languages\": {" >> $index
for dir in `ls "$basedir/"` for dir in `ls "$basedir/"`
do do
if ! in_ignore $dir && [ -d "$basedir/$dir" ] ; then if ! in_ignore $dir && [ -d "$basedir/$dir" ] ; then
@@ -44,6 +45,6 @@ echo " \"\":{}\n}\n}" >> $index
# Replace all URLs # Replace all URLs
echo "Replacing URLs" echo "Replacing URLs"
cd $tagsdir 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 exit 0

View File

@@ -1,5 +1,5 @@
{ {
"urlprefix": "/GF", "urlprefix": "/",
"languages": { "languages": {
"abstract": [ "abstract": [
"Backward", "Backward",
@@ -234,6 +234,7 @@
"TryUrd", "TryUrd",
"TryRon", "TryRon",
"CombinatorsJap", "CombinatorsJap",
"LangAPI",
"CombinatorsUrd", "CombinatorsUrd",
"" ""
], ],
@@ -449,6 +450,7 @@
"" ""
], ],
"finnish": [ "finnish": [
"ParseFin",
"MakeStructuralFin", "MakeStructuralFin",
"ConjunctionFin", "ConjunctionFin",
"AllFinAbs", "AllFinAbs",
@@ -458,6 +460,7 @@
"ExtraFinAbs", "ExtraFinAbs",
"DictFin", "DictFin",
"NounFin", "NounFin",
"DictEngFin",
"AdjectiveFin", "AdjectiveFin",
"ParadigmsFin", "ParadigmsFin",
"ResFin", "ResFin",
@@ -533,17 +536,21 @@
"NounGer", "NounGer",
"AdverbGer", "AdverbGer",
"IrregGerAbs", "IrregGerAbs",
"DictGer",
"RelativeGer", "RelativeGer",
"AdjectiveGer", "AdjectiveGer",
"AllGerAbs", "AllGerAbs",
"DictGerAbs",
"NumeralGer", "NumeralGer",
"ExtGer", "ExtGer",
"ParadigmsGer", "ParadigmsGer",
"SentenceGer", "SentenceGer",
"ExtraGer", "ExtraGer",
"ParseGer",
"AllGer", "AllGer",
"VerbGer", "VerbGer",
"PhraseGer", "PhraseGer",
"DictEngGer",
"GrammarGer", "GrammarGer",
"IdiomGer", "IdiomGer",
"MakeStructuralGer", "MakeStructuralGer",
@@ -553,6 +560,25 @@
"TenseGer", "TenseGer",
"" ""
], ],
"hebrew": [
"CatHeb",
"ParadigmsHeb",
"TenseHeb",
"AdverbHeb",
"LangHeb",
"VerbHeb",
"PhraseHeb",
"SentenceHeb",
"MorphoHeb",
"AdjectiveHeb",
"NounHeb",
"GrammarHeb",
"PatternsHeb",
"LexiconHeb",
"ResHeb",
"StructuralHeb",
""
],
"hindi": [ "hindi": [
"ExtraHin", "ExtraHin",
"IdiomHin", "IdiomHin",
@@ -711,6 +737,7 @@
"PhraseJap", "PhraseJap",
"CommonJap", "CommonJap",
"ConjunctionJap", "ConjunctionJap",
"ExtraJap",
"AdverbJap", "AdverbJap",
"NounJap", "NounJap",
"TextJap", "TextJap",
@@ -718,6 +745,7 @@
"GrammarJap", "GrammarJap",
"AllJap", "AllJap",
"LexiconJap", "LexiconJap",
"ExtraJapAbs",
"TenseJap", "TenseJap",
"CatJap", "CatJap",
"RelativeJap", "RelativeJap",

View File

@@ -57,7 +57,7 @@ $(document).ready(function() {
} }
var current_language = undefined; var current_language = undefined;
var urlPrefix = ""; var urlPrefix = "/";
var index; var index;
$.ajax({ $.ajax({
url: "index.json", url: "index.json",
@@ -65,7 +65,7 @@ $(document).ready(function() {
type: "GET", type: "GET",
success: function(data) { success: function(data) {
index = data; index = data;
urlPrefix = data['urlprefix']; if (data['urlprefix']) urlPrefix = data['urlprefix'];
// Initialize the language list // Initialize the language list
var lang_select = $("<select>") var lang_select = $("<select>")
@@ -194,7 +194,7 @@ $(document).ready(function() {
// Just get the HTTP headers to see if a file exists // Just get the HTTP headers to see if a file exists
var checkSourceFile = function(args) { var checkSourceFile = function(args) {
$.ajax({ $.ajax({
url: urlPrefix + "/lib/src/"+args.lang+"/"+args.module+".gf", url: urlPrefix + "lib/src/"+args.lang+"/"+args.module+".gf",
type: "HEAD", type: "HEAD",
success: args.onsuccess, success: args.onsuccess,
error: args.onerror error: args.onerror
@@ -206,7 +206,7 @@ $(document).ready(function() {
clearCode(); clearCode();
showLoading(); showLoading();
$.ajax({ $.ajax({
url: urlPrefix + "/lib/src/"+lang+"/"+module+".gf", url: urlPrefix + "lib/src/"+lang+"/"+module+".gf",
type: "GET", type: "GET",
dataType: "text", dataType: "text",
success: function(data, status, xhr){ success: function(data, status, xhr){