mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
gfse: add Prelude to the list of RGL modules that can be opened
This commit is contained in:
@@ -1111,7 +1111,9 @@ function draw_concrete(g,i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var rgl_modules=["Syntax","Lexicon","Paradigms","Extra","Symbolic"];
|
var rgl_modules=["Syntax","Lexicon","Paradigms","Extra","Symbolic"];
|
||||||
|
var common_modules=["Prelude"];
|
||||||
var rgl_info = {
|
var rgl_info = {
|
||||||
|
Prelude: "Some facilities usable in all grammars",
|
||||||
Paradigms: "Lexical categories (A, N, V, ...) and smart paradigms (mkA, mkN, mkV, ...) for turning raw strings into new dictionary entries.",
|
Paradigms: "Lexical categories (A, N, V, ...) and smart paradigms (mkA, mkN, mkV, ...) for turning raw strings into new dictionary entries.",
|
||||||
Syntax: "Syntactic categories (Utt, Cl, V, NP, CN, AP, ...), structural words (this_Det, few_Det, ...) and functions for building phrases (mkUtt, mkCl, mkCN, mkVP, mkAP, ...)",
|
Syntax: "Syntactic categories (Utt, Cl, V, NP, CN, AP, ...), structural words (this_Det, few_Det, ...) and functions for building phrases (mkUtt, mkCl, mkCN, mkVP, mkAP, ...)",
|
||||||
Lexicon: "A multilingual lexicon with ~350 common words.",
|
Lexicon: "A multilingual lexicon with ~350 common words.",
|
||||||
@@ -1126,8 +1128,7 @@ function add_open(g,ci) {
|
|||||||
var ds={};
|
var ds={};
|
||||||
for(var i in os) ds[os[i]]=true;
|
for(var i in os) ds[os[i]]=true;
|
||||||
var list=[]
|
var list=[]
|
||||||
for(var i in rgl_modules) {
|
function add_module(b,m) {
|
||||||
var b=rgl_modules[i], m=b+conc.langcode;
|
|
||||||
if(!ds[m]) {
|
if(!ds[m]) {
|
||||||
var info=rgl_info[b];
|
var info=rgl_info[b];
|
||||||
var infotext=info ? text(" - "+info) : text("");
|
var infotext=info ? text(" - "+info) : text("");
|
||||||
@@ -1135,6 +1136,14 @@ function add_open(g,ci) {
|
|||||||
[text(m)]),infotext]));
|
[text(m)]),infotext]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for(var i in rgl_modules) {
|
||||||
|
var b=rgl_modules[i];
|
||||||
|
add_module(b,b+conc.langcode)
|
||||||
|
}
|
||||||
|
for(var i in common_modules) {
|
||||||
|
var b=common_modules[i];
|
||||||
|
add_module(b,b)
|
||||||
|
}
|
||||||
if(list.length>0) {
|
if(list.length>0) {
|
||||||
var file=element("file");
|
var file=element("file");
|
||||||
clear(file)
|
clear(file)
|
||||||
@@ -1186,7 +1195,7 @@ function draw_opens(g,ci) {
|
|||||||
if(!first) es.push(sep(", "))
|
if(!first) es.push(sep(", "))
|
||||||
var m=os[i];
|
var m=os[i];
|
||||||
var b=m.substr(0,m.length-conc.langcode.length);
|
var b=m.substr(0,m.length-conc.langcode.length);
|
||||||
var info=rgl_info[b];
|
var info=rgl_info[m] || rgl_info[b];
|
||||||
var id=ident(m);
|
var id=ident(m);
|
||||||
if(info) id.title=info;
|
if(info) id.title=info;
|
||||||
id.onclick=show_opers(m)
|
id.onclick=show_opers(m)
|
||||||
|
|||||||
Reference in New Issue
Block a user