merge in https://github.com/espruino/EspruinoAppLoaderCore/pull/11 in such a way that we can use it from apps/locales as well (to avoid some duplication!)
more characters added to list that need remappingmaster
parent
895e7ffd59
commit
e9e92cc95b
|
|
@ -16,6 +16,7 @@
|
||||||
<p>Then click <button id="upload" class="btn btn-primary">Upload</button></p>
|
<p>Then click <button id="upload" class="btn btn-primary">Upload</button></p>
|
||||||
|
|
||||||
<script src="../../core/lib/customize.js"></script>
|
<script src="../../core/lib/customize.js"></script>
|
||||||
|
<script src="../../core/js/utils.js"></script>
|
||||||
<script src="locales.js" charset="utf-8"></script>
|
<script src="locales.js" charset="utf-8"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -59,7 +60,7 @@ exports = { name : "en_GB", currencySym:"£",
|
||||||
/*else if (chCode<256) // it's non-ascii, but <256 - just escape it
|
/*else if (chCode<256) // it's non-ascii, but <256 - just escape it
|
||||||
n = chCode;*/
|
n = chCode;*/
|
||||||
else {
|
else {
|
||||||
if (charFallbacks[ch]) return charFallbacks[ch];
|
if (CODEPAGE_CONVERSIONS[ch]) return CODEPAGE_CONVERSIONS[ch];
|
||||||
console.error(`Locale ${lang}: Character ${ch} (${chCode}) is not in Code Page ${codePage.name}`);
|
console.error(`Locale ${lang}: Character ${ch} (${chCode}) is not in Code Page ${codePage.name}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,36 +34,8 @@ const codePages = {
|
||||||
`.replace(/[ \n]/g,"")
|
`.replace(/[ \n]/g,"")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/* When it's not in the codepage, try and use
|
|
||||||
these conversions */
|
// charFallbacks is now in core/js/utils.js as CODEPAGE_CONVERSIONS
|
||||||
const charFallbacks = {
|
|
||||||
"ą":"a",
|
|
||||||
"ā":"a",
|
|
||||||
"å":"a",
|
|
||||||
"č":"c",
|
|
||||||
"ć":"c",
|
|
||||||
"ě":"e",
|
|
||||||
"ę":"e",
|
|
||||||
"ē":"e",
|
|
||||||
"æ":"e",
|
|
||||||
"ģ":"g",
|
|
||||||
"i":"ī",
|
|
||||||
"ķ":"k",
|
|
||||||
"ļ":"l",
|
|
||||||
"ł":"l",
|
|
||||||
"ń":"n",
|
|
||||||
"ņ":"n",
|
|
||||||
"ő":"o",
|
|
||||||
"ó":"o",
|
|
||||||
"ø":"o",
|
|
||||||
"ř":"r",
|
|
||||||
"ś":"s",
|
|
||||||
"š":"s",
|
|
||||||
"ū":"u",
|
|
||||||
"ż":"z",
|
|
||||||
"ź":"z",
|
|
||||||
"ž":"z",
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
timePattern / datePattern:
|
timePattern / datePattern:
|
||||||
|
|
@ -594,7 +566,7 @@ var locales = {
|
||||||
day: "Domingo,Segunda-feira,Terça-feira,Quarta-feira,Quinta-feira,Sexta-feira,Sábado",
|
day: "Domingo,Segunda-feira,Terça-feira,Quarta-feira,Quinta-feira,Sexta-feira,Sábado",
|
||||||
trans: { yes: "sim", Yes: "Sim", no: "não", No: "Não", ok: "certo", on: "ligado", off: "desligado" }
|
trans: { yes: "sim", Yes: "Sim", no: "não", No: "Não", ok: "certo", on: "ligado", off: "desligado" }
|
||||||
},
|
},
|
||||||
"cs_CZ": { // THIS NEVER WORKED PROPERLY - many chars are not in the ISO8859-1 codepage and we use charFallbacks
|
"cs_CZ": { // THIS NEVER WORKED PROPERLY - many chars are not in the ISO8859-1 codepage and we use CODEPAGE_CONVERSIONS
|
||||||
lang: "cs_CZ",
|
lang: "cs_CZ",
|
||||||
decimal_point: ",",
|
decimal_point: ",",
|
||||||
thousands_sep: " ",
|
thousands_sep: " ",
|
||||||
|
|
|
||||||
2
core
2
core
|
|
@ -1 +1 @@
|
||||||
Subproject commit e9097fa680182069a5814c3e566a0bcbcb5e72a1
|
Subproject commit 34ab74e66906a296e4f5789339a1b8a64c50bec9
|
||||||
Loading…
Reference in New Issue