Skip to content

Commit a637ce9

Browse files
committed
Update badge JSON paths and remove typos test size column
Badge JSON files reorganized in giella-core commit 4190a69: - lemmacount.json → badgedata/fst-lemmacount.json - spellersuggs.json → badgedata/speller-suggestions.json Changes: - Updated badge URLs in langtable.js and spellertable.js - Removed addTyposTestSize() function from spellertable.js - Reduced speller table from 5 to 4 columns - Updated colspan and addEmptyRow calls to match new column count - Test size info now included in speller-suggestions.json badge
1 parent 33f7017 commit a637ce9

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

assets/js/langtable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function addLemmaCount(repo) {
205205
const lemma_image = document.createElement('img');
206206
lemma_image.setAttribute(
207207
'src',
208-
'https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgiellalt%2F' + repo.name + '%2Fgh-pages%2Flemmacount.json&label=L'
208+
'https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgiellalt%2F' + repo.name + '%2Fgh-pages%2Fbadgedata%2Ffst-lemmacount.json&label=L'
209209
);
210210
lemma_image.setAttribute('alt', 'Lemma Count');
211211
row_lemmas.appendChild(lemma_image);

assets/js/spellertable.js

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,11 @@ function addSpellerTableHeader() {
9494
let heading_4 = document.createElement('th');
9595
heading_4.innerHTML = 'Suggestion Quality';
9696
heading_4.setAttribute('style', 'width: 20%;');
97-
let heading_5 = document.createElement('th');
98-
heading_5.innerHTML = 'Typos test size';
99-
heading_5.setAttribute('style', 'width: 15%;');
10097

10198
row_1.appendChild(heading_1);
10299
row_1.appendChild(heading_2);
103100
row_1.appendChild(heading_3);
104101
row_1.appendChild(heading_4);
105-
row_1.appendChild(heading_5);
106102

107103
return row_1;
108104
}
@@ -120,7 +116,7 @@ function addSpellerRepoTable(repos, mainFilter, filters) {
120116
if (!repos || !Array.isArray(repos)) {
121117
const errorRow = document.createElement('tr');
122118
const errorCell = document.createElement('td');
123-
errorCell.colSpan = 5; // Match number of columns in header
119+
errorCell.colSpan = 4; // Match number of columns in header
124120
errorCell.innerHTML = '<strong>⚠️ GitHub repository data is temporarily unavailable</strong><br><em>This usually resolves automatically. Please try refreshing the page in a few minutes.</em>';
125121
errorCell.style.textAlign = 'center';
126122
errorCell.style.padding = '30px 20px';
@@ -146,7 +142,7 @@ function addSpellerRepoTable(repos, mainFilter, filters) {
146142
}
147143
// If no repos found, inform the user:
148144
if (!tbody.firstChild) {
149-
tbody.appendChild(addEmptyRow(5));
145+
tbody.appendChild(addEmptyRow(4));
150146
}
151147
return table;
152148
}
@@ -160,26 +156,14 @@ function addSpellerSuggQuality(repo) {
160156
const sugg_image = document.createElement('img');
161157
sugg_image.setAttribute(
162158
'src',
163-
'https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgiellalt%2F' + repo.name + '%2Fgh-pages%2Fspellersuggs.json&label=S'
159+
'https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgiellalt%2F' + repo.name + '%2Fgh-pages%2Fbadgedata%2Fspeller-suggestions.json&label=S'
164160
);
165161
sugg_image.setAttribute('alt', 'Suggestion Quality');
166162
sugg_link.appendChild(sugg_image);
167163
row_sugg.appendChild(sugg_link);
168164
return row_sugg;
169165
}
170166

171-
function addTyposTestSize(repo) {
172-
let row_typos = document.createElement('td');
173-
const typos_image = document.createElement('img');
174-
typos_image.setAttribute(
175-
'src',
176-
'https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgiellalt%2F' + repo.name + '%2Fgh-pages%2Ftypossize.json&label=T'
177-
);
178-
typos_image.setAttribute('alt', 'Typos test size');
179-
row_typos.appendChild(typos_image);
180-
return row_typos;
181-
}
182-
183167
function addSpellerTR(repo) {
184168
let row = document.createElement('tr');
185169

@@ -190,7 +174,6 @@ function addSpellerTR(repo) {
190174
row.appendChild(addRepo(repo));
191175
row.appendChild(addLemmaCount(repo));
192176
row.appendChild(addSpellerSuggQuality(repo));
193-
row.appendChild(addTyposTestSize(repo));
194177

195178
return row;
196179
}

0 commit comments

Comments
 (0)