Commit 8e638952 authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

debug pinyin wu yu yi

parent db2628ee
......@@ -405,13 +405,13 @@ function erasePinyin() {
//["","́","́","̌","̌",""] // tons[1]="´" tons[0|5]=""
var tons = [
{},
{"a":"ā","e":"ē","er":"ēr","i":"ī","o":"ō","u":"ū","ü":"ǖ"},
{"a":"á","e":"é","er":"ér","i":"í","o":"ó","u":"ú","ü":"ǘ"},
{"a":"ǎ","e":"ě","er":"ěr","i":"ǐ","o":"ǒ","u":"ǔ","ü":"ǚ"},
{"a":"à","e":"è","er":"èr","i":"ì","o":"ò","u":"ù","ü":"ǜ"},
{"a":"ā","e":"ē","er":"ēr","i":"ī","o":"ō","u":"ū","ü":"ǖ","yu":"","wu":"", "yi":""},
{"a":"á","e":"é","er":"ér","i":"í","o":"ó","u":"ú","ü":"ǘ","yu":"","wu":"", "yi":"", "m":""},
{"a":"ǎ","e":"ě","er":"ěr","i":"ǐ","o":"ǒ","u":"ǔ","ü":"ǚ","yu":"","wu":"", "yi":""},
{"a":"à","e":"è","er":"èr","i":"ì","o":"ò","u":"ù","ü":"ǜ","yu":"","wu":"", "yi":""},
{}
]
var tonalesApi = ["a","e","ɛ","ɤ","i","ɨ","o","u","y","","ɤ˞","ow","ɯɤ","","wo","wu","ij","ji","ɛj","ej"];
var tonalesApi = ["a","e","ɛ","ɤ","i","ɨ","o","u","y","","ɤ˞","ow","ɯɤ","","wo","wu","ij","ji","ɛj","ej","m"];
function recupTone(identifiant) {
var myton = identifiant.slice(-1);
......@@ -424,7 +424,7 @@ function recupTone(identifiant) {
console.log("Syllon attesté !")
var nods = document.getElementById('pinyinLab').childNodes
nods.forEach((nod) => {
if (["a","e","i","o","u","ü","er"].includes(nod.innerText) && nod.classList.contains('tonale')) {
if (["a","e","i","o","u","ü","er","yu","wu","yi"].includes(nod.innerText) && nod.classList.contains('tonale')) {
var thisVoy = nod.innerText;
console.log("TONALE!",thisVoy)
nod.innerText = nod.innerText.replace(thisVoy,tons[myton][thisVoy])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment