Merge branch 'master' of github.com:espruino/BangleApps

master
Gordon Williams 2022-04-06 11:45:35 +01:00
commit 6557dd70e3
4 changed files with 28 additions and 3 deletions

2
apps/bee/ChangeLog Normal file
View File

@ -0,0 +1,2 @@
0.01: New app!
0.02: Fix bug with regenerating index, fix bug in word lookups

View File

@ -31,8 +31,9 @@ function prepareLetterIdx () {
function findWord (w) { function findWord (w) {
"compile" "compile"
var ci = w.charCodeAt(0)-97; var ci = w.charCodeAt(0)-97;
var f = letterIdx[ci].indexOf(w); var f = letterIdx[ci].indexOf("\n"+w+"\n");
if (f>=0 && letterIdx[ci][f+w.length]=="\n") return true; if (f>=0) return true;
if (letterIdx[ci].substr(0, w.length)==w) return true;
return false; return false;
} }
@ -47,6 +48,7 @@ function checkWord (w) {
if (foundWords.indexOf(w)>=0) return false; // already found if (foundWords.indexOf(w)>=0) return false; // already found
if (findWord(w)) { if (findWord(w)) {
foundWords.push(w); foundWords.push(w);
foundWords.sort();
if (w.length==4) score++; if (w.length==4) score++;
else score += w.length; else score += w.length;
if (isPangram(w)) score += 7; if (isPangram(w)) score += 7;

View File

@ -2,7 +2,7 @@
"name": "Bee", "name": "Bee",
"shortName":"Bee", "shortName":"Bee",
"icon": "app.png", "icon": "app.png",
"version":"0.01", "version":"0.02",
"description": "Spelling bee", "description": "Spelling bee",
"supports" : ["BANGLEJS2"], "supports" : ["BANGLEJS2"],
"readme": "README.md", "readme": "README.md",

View File

@ -39,11 +39,13 @@ these conversions */
const charFallbacks = { const charFallbacks = {
"ą":"a", "ą":"a",
"ā":"a", "ā":"a",
"å":"a",
"č":"c", "č":"c",
"ć":"c", "ć":"c",
"ě":"e", "ě":"e",
"ę":"e", "ę":"e",
"ē":"e", "ē":"e",
"æ":"e",
"ģ":"g", "ģ":"g",
"i":"ī", "i":"ī",
"ķ":"k", "ķ":"k",
@ -53,6 +55,7 @@ const charFallbacks = {
"ņ":"n", "ņ":"n",
"ő":"o", "ő":"o",
"ó":"o", "ó":"o",
"ø":"o",
"ř":"r", "ř":"r",
"ś":"s", "ś":"s",
"š":"s", "š":"s",
@ -681,6 +684,24 @@ var locales = {
day: "Pirmdiena,Otrdiena,Trešdiena,Ceturtdiena,Piektdiena,Sestdiena,Svētdiena", day: "Pirmdiena,Otrdiena,Trešdiena,Ceturtdiena,Piektdiena,Sestdiena,Svētdiena",
trans: { yes: "jā", Yes: "Jā", no: "nē", No: "Nē", ok: "labi", on: "Ieslēgt", off: "Izslēgt", "< Back": "< Atpakaļ" } trans: { yes: "jā", Yes: "Jā", no: "nē", No: "Nē", ok: "labi", on: "Ieslēgt", off: "Izslēgt", "< Back": "< Atpakaļ" }
}, },
"no_NB": { // Using charfallbacks
lang: "no_NB",
decimal_point: ",",
thousands_sep: " ",
currency_symbol: "kr",
int_curr_symbol: "NOK",
speed: "kmh",
distance: { 0: "m", 1: "km" },
temperature: "°C",
ampm: { 0: "", 1: "" },
timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" },
datePattern: { 0: "%d. %b %Y", "1": "%d.%m.%Y" }, // 1. Mar 2020 // 01.03.20
abmonth: "Jan,Feb,Mar,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Des",
month: "Januar,Februar,Mars,April,Mai,Juni,Juli,August,September,Oktober,November,Desember",
abday: "Ma,Ti,On,To,Fr,Lø,Sø",
day: "Mandag,Tirsdag,Onsdag,Torsdag,Fredag,Lørdag,Søndag",
trans: { yes: "ja", Yes: "Ja", no: "nei", No: "Nei", ok: "ok", on: "på", off: "av", "< Back": "< Tilbake", "Delete": "Slett", "Mark Unread": "Merk som ulest" }
},
/*, /*,
"he_IL": { // This won't work until we get a font - see https://github.com/espruino/BangleApps/issues/399 "he_IL": { // This won't work until we get a font - see https://github.com/espruino/BangleApps/issues/399
codePage : "ISO8859-8", codePage : "ISO8859-8",