Commit 342c32ab authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

mise à jour custphon

parent e94c64ee
"ɑː",
"ɑɹ",
"ɖʐ",
"əʊ",
"ɜː",
"ɡɣ",
"ɡʷ",
"ɡʒ",
"ɢʁ",
"ɪə",
"ɪɹ",
"ɟʝ",
"ɴɢ",
"ɲ",
"ɲɟ",
"ɳɖ",
"ɳʈ",
"ŋɡ",
"ŋʷ",
"ɔː",
"ɔɪ",
"ɔɹ",
"ʈʂ",
"ʊə",
"ʊɹ",
"aɪ",
"aɪə",
"aʊ",
"aʊwə",
"bβ",
"ɡb",
"bv",
"cç",
"ɲc",
"dð",
"dɮ",
"dʐ",
"dʑ",
"dʒ",
"dz",
"eə",
"eɪ",
"eɹ",
"ef",
"ʔh",
"iː",
"ɥi",
"ij",
"iz",
"jə",
"jʊ",
"jʊə",
"jʊɹ"
"jʊɹ",
"ju",
"juː",
"kʃ",
"kʷ",
"ŋk",
"kp",
"ks",
"kw",
"kx",
"əl",
"lj",
"əm",
"mɸ",
"mβ",
"ŋm",
"mb",
"mp",
"ən",
"nð",
"nʃ",
"nʒ",
"nθ",
"nd",
"nd̪",
"nj",
"ns",
"nt",
"nt̪",
"nz",
"oʊ",
"pɸ",
"pf",
"ɴq",
"qχ",
"sz",
"tɕ",
"tɕʰ",
"tɬ",
"tʂ",
"tʂʰ",
"tʃ",
"tʃʼ",
"tθ",
"ts",
"tsʰ",
"tsʼ",
"uː",
"wɑ",
"wɑː",
"wɛ̃",
"wʌ",
"wa",
"waɪ",
"waɹ",
"xʷ",
"əz",
"ɡz",
"ɪz",
"ɑɹ",
"aɪ",
"aɪə",
"aʊ",
"aʊwə",
"əl",
"əm",
"ən",
"əʊ",
"dz",
"dʒ",
"dʐ",
"dʑ",
"ef",
"eɪ",
"eə",
"eɹ",
"ɪə",
"jʊə",
"ɡb",
"ɡz",
"ɡʒ",
"ɥi",
"ij",
"ɪɹ",
"ɲ",
"jə",
"juː",
"jʊɹ",
"kp",
"ks",
"kʃ",
"kx",
"kʷ",
"lj",
"nj",
"oʊ",
"ɔɪ",
"ɔɹ",
"pf",
"sz",
"tsʰ",
"tʂʰ",
"tɕʰ",
"tɬ",
"dɮ",
"ts",
"tsʼ",
"tʃ",
"tʃʼ",
"tʂ",
"tɕ",
"tθ",
"ʊə",
"ʊɹ",
"wa",
"waɹ",
"wɑ",
"wɑː",
"waɪ",
"wɛ̃",
"wʌ",
"ju",
"jʊ",
"iz",
"ɪz",
"əz",
"mp",
"mb",
"nt̪",
"nd̪",
"nt",
"nd",
"ɳʈ",
"ɳɖ",
"ɲc",
"ɲɟ",
"ŋk",
"ŋɡ",
"ɴq",
"ɴɢ",
"ŋm",
"pɸ",
"bβ",
"bv",
"dð",
"ʈʂ",
"ɖʐ",
"cç",
"ɟʝ",
"ɡɣ",
"qχ",
"ɢʁ",
"ʔh",
"mɸ",
"mβ",
"nθ",
"nð",
"ns",
"nz",
"nʃ",
"nʒ",
"ŋʷ",
"kʷ",
"ɡʷ",
"xʷ",
"tʃ",
"ks",
"dʒ",
"nj",
"eə",
"əl",
"əm",
"ən",
"sz",
"tθ",
"ɡz",
"kʃ",
"ɡʒ",
"ts",
"ɑː",
"eɪ",
"aɪ",
"iː",
"ɔː",
"əʊ",
"aʊ",
"ɔɪ",
"ɪə",
"uː",
"ɜː",
"ʊə",
"jə",
"wʌ",
"əz",
"ɪz",
"kw",
"jʊ",
"ɪɹ",
"wa",
"ju",
"ʊɹ",
"ɑɹ",
"ɔɹ",
"oʊ",
"juː",
"jʊə",
"aɪə",
"wɑː",
"waɪ",
"waɹ",
"jʊɹ"
\ No newline at end of file
...@@ -81,7 +81,7 @@ def getLenDic(lang): ...@@ -81,7 +81,7 @@ def getLenDic(lang):
##### MISE EN MÉMOIRE DES DICTIONNAIRES (seulement les transcriptions+regions) ##### MISE EN MÉMOIRE DES DICTIONNAIRES (seulement les transcriptions+regions)
def makeWord2trans(alemDic): def makeWord2trans(alemDic):
query = alemDic.find()#.limit(1000) query = alemDic.find().limit(1000)
word2trans = {} word2trans = {}
cpt = 0 cpt = 0
for q in query: for q in query:
...@@ -108,9 +108,9 @@ print("Mise en mémoire de dicoEn...") ...@@ -108,9 +108,9 @@ print("Mise en mémoire de dicoEn...")
word2transEn = makeWord2trans(dicoEn) word2transEn = makeWord2trans(dicoEn)
print("Nombre d'entrées dans AlemDic-dicoEn :", getLenDic(('en'))) print("Nombre d'entrées dans AlemDic-dicoEn :", getLenDic(('en')))
print("Mise en mémoire de dicoZh...") # print("Mise en mémoire de dicoZh...")
word2transZh = makeWord2trans(dicoZh) # word2transZh = makeWord2trans(dicoZh)
print("Nombre d'entrées dans AlemDic-dicoZh :", getLenDic('zh')) # print("Nombre d'entrées dans AlemDic-dicoZh :", getLenDic('zh'))
######################################## ########################################
######### LECTURE DES FICHIERS ######### ######### LECTURE DES FICHIERS #########
......
...@@ -118,7 +118,7 @@ function selectLang(lang){ ...@@ -118,7 +118,7 @@ function selectLang(lang){
} }
// Phon Table // Phon Table
// if this function is defined (wikicolor main page) // if this function is defined (wikicolor main page)
// if (typeof(makePhonTable)==='function') { makePhonTable(lang) }; if (typeof(makePhonTable)==='function') { makePhonTable(lang) };
} }
function interface(lang) { function interface(lang) {
......
This diff is collapsed.
...@@ -13,29 +13,77 @@ let lang2phons = { ...@@ -13,29 +13,77 @@ let lang2phons = {
"zh": {} "zh": {}
} }
var bi = ["ɑɹ","","aɪə","aʊ","aʊwə","əl","əm","ən","əʊ","dz","","","","ef","","","","ɪə","jʊə","ɡb","ɡz","ɡʒ","ɥi","ij","ɪɹ","ɲ","jə","juː","jʊɹ","kp","ks","","kx","","lj","nj","","ɔɪ","ɔɹ","pf","sz","tsʰ","tʂʰ","tɕʰ","","","ts","tsʼ","","tʃʼ","","","","ʊə","ʊɹ","wa","waɹ","","wɑː","waɪ","wɛ̃","wʌ","ju","jʊ","iz","ɪz","əz","mp","mb","nt̪","n","nt","nd","ɳʈ","ɳɖ","ɲc","ɲɟ","ŋk","ŋɡ","ɴq","ɴɢ","ŋm","","","bv","","ʈʂ","ɖʐ","","ɟʝ","ɡɣ","","ɢʁ","ʔh","","","","","ns","nz","","","ŋʷ","","ɡʷ",""] var bi = ["ɑː","ɑɹ","ɖʐ","əʊ","ɜː","ɡɣ","ɡʷ","ɡʒ","ɢʁ","ɪə","ɪɹ","ɟʝ","ɴɢ","ɲ","ɲɟ","ɳɖ","ɳʈ","ŋɡ","ŋʷ","ɔː","ɔɪ","ɔɹ","ʈʂ","ʊə","ʊɹ","","ə","","aʊwə","","ɡb","bv","","ɲc","","","","","","dz","","","","ef","ʔh","","ɥi","ij","iz","","","jʊə","jʊɹ","jʊɹ","ju","juː","","","ŋk","kp","ks","kw","kx","əl","lj","əm","","","ŋm","mb","mp","ən","nð","nʃ","nʒ","","nd","nd̪","nj","ns","nt","nt̪","nz","","","pf","ɴq","","sz","","tɕʰ","","tʂ","tʂʰ","","tʃʼ","","ts","tsʰ","tsʼ","","","wɑː","wɛ̃","","wa","waɪ","waɹ","xʷ","əz","ɡz","ɪz"];
document.getElementById('colorPicker-Base').value = getComputedStyle(document.documentElement).getPropertyValue('--phon_base'); document.getElementById('colorPicker-Base').value = getComputedStyle(document.documentElement).getPropertyValue('--phon_base');
// Mémorisation des couleurs de variables de Phonochromie Alem
let memCol = {}; let memCol = {};
for (phon in api2class){ for (phon in api2class){
memCol[phon] = getComputedStyle(document.documentElement).getPropertyValue('--'+api2class[phon]); memCol[phon] = getComputedStyle(document.documentElement).getPropertyValue('--'+api2class[phon]).trim();
} }
// Identification de la css Phonochromie Alem :
var thisCSS;
for (c=0; c<document.styleSheets.length; c++) {
if (document.styleSheets[c].href!=null && document.styleSheets[c].href.search(/phonochromie/)>0) { thisCSS = document.styleSheets[c] }
}
// Initialisation memClass, pour enregistrer le contenu d'une classe quand il est désactivé
var memClass = {}
function setPhon(phon) { function setPhon(phon) {
var q = document.querySelectorAll('.'+phon+'0'); // var q = document.querySelectorAll('.'+phon+'0');
for (el=0; el<q.length; el++) { // for (el=0; el<q.length; el++) {
q[el].classList.remove(phon+'0'); // q[el].classList.remove(phon+'0');
q[el].classList.add(phon); // q[el].classList.add(phon);
// }
// Modification directe de la css : réactiver /s/ revient à remettre les attributs couleurs de .phon_s enregistrés dans memClass
// identifier l'entrée de la css à modifier
for (r=0; r<thisCSS.cssRules.length; r++) {
if(thisCSS.cssRules[r].selectorText == "."+phon) {
console.log("Modification CSS:",r,thisCSS.cssRules[r])
// on remet les couleurs enregistrées dans memClass memClass[phon]
thisCSS.cssRules[r].style['fill'] = memClass[phon]['fill']
thisCSS.cssRules[r].style['color'] = memClass[phon]['color']
thisCSS.cssRules[r].style['stop-color'] = memClass[phon]['stop-color']
thisCSS.cssRules[r].style['-webkit-text-fill-color'] = memClass[phon]['-webkit-text-fill-color']
}
} }
} }
function unsetPhon(phon) { function unsetPhon(phon) {
var q = document.querySelectorAll('.'+phon); // var q = document.querySelectorAll('.'+phon);
for (el=0; el<q.length; el++) { // for (el=0; el<q.length; el++) {
q[el].classList.remove(phon); // q[el].classList.remove(phon);
q[el].classList.add(phon+'0'); // q[el].classList.add(phon+'0');
// }
// Modification directe de la css : désactiver /s/ revient à remplacer les attributs couleurs de .phon_s par .phon_base (et enregistrement des valeurs dans memClass)
// identifier l'entrée de la css à modifier
for (r=0; r<thisCSS.cssRules.length; r++) {
if(thisCSS.cssRules[r].selectorText == "."+phon) {
console.log("Modification CSS:",r,thisCSS.cssRules[r])
// Enregistrement des couleurs dans memClass pour la clé phon
var [fill,col,stop,webkit] = [
thisCSS.cssRules[r].style['fill'],
thisCSS.cssRules[r].style['color'],
thisCSS.cssRules[r].style['stop-color'],
thisCSS.cssRules[r].style['-webkit-text-fill-color']
]
memClass[phon] = {'fill':fill, 'color':col, 'stop-color':stop, '-webkit-text-fill-color':webkit}
// Suppression indications couleurs dans la css
thisCSS.cssRules[r].style['fill'] = 'var(--phon_base)'
thisCSS.cssRules[r].style['color'] = 'var(--phon_base)'
thisCSS.cssRules[r].style['stop-color'] = 'var(--phon_base)'
thisCSS.cssRules[r].style['-webkit-text-fill-color'] = ''
}
} }
} }
//------------------------------------------------ //------------------------------------------------
//>>>>>>>>>>>>> document.styleSheets[3].cssRules[69].style.fill //>>>>>>>>>>>>> document.styleSheets[3].cssRules[69].style.fill
...@@ -126,4 +174,22 @@ function makePhonTable(lang) { ...@@ -126,4 +174,22 @@ function makePhonTable(lang) {
} }
custphonList[i].innerHTML = '<div class="form-check m-1"><input class="form-check-input check-phon check-vownas" type="checkbox" onchange="togglePhon(this.id)" id="cb-'+api2class[api]+'" checked><label class="form-check-label" for="cb-'+api2class[api]+'">'+api+colpick+'</label></div>'; custphonList[i].innerHTML = '<div class="form-check m-1"><input class="form-check-input check-phon check-vownas" type="checkbox" onchange="togglePhon(this.id)" id="cb-'+api2class[api]+'" checked><label class="form-check-label" for="cb-'+api2class[api]+'">'+api+colpick+'</label></div>';
} }
custphonList = document.querySelectorAll('.custphonschwa');
for (i=0; i<custphonList.length; i++) {
var api = custphonList[i].dataset.phon;
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ memCol[api] +'">';
if (bi.includes(api)){
colpick = '';
}
custphonList[i].innerHTML = '<div class="form-check m-1"><input class="form-check-input check-phon check-schwa" type="checkbox" onchange="togglePhon(this.id)" id="cb-'+api2class[api]+'" checked><label class="form-check-label" for="cb-'+api2class[api]+'">'+api+colpick+'</label></div>';
}
// déchecker tous les phonèmes déjà désactivés (listés dans memClass)
for (phon in memClass) {
var thisCb = document.getElementById('cb-'+phon);
if (thisCb != null) {
document.getElementById('cb-'+phon).checked = false;
}
}
} }
...@@ -259,11 +259,11 @@ ...@@ -259,11 +259,11 @@
.phon_o_maju_maj { background: -webkit-linear-gradient(var(--phon_o_maj) 50%, var(--phon_u_maj) 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;} .phon_o_maju_maj { background: -webkit-linear-gradient(var(--phon_o_maj) 50%, var(--phon_u_maj) 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;}
/* gradients triples */ /* gradients triples */
.phon_ju_majarobase { background: -webkit-linear-gradient(var(--phon_j) 55%, var(--phon_u_maj) 65%, var(--phon_schwa) 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;} .phon_ju_majarobase { background: -webkit-linear-gradient(var(--phon_j) 45%, var(--phon_u_maj) 55%, var(--phon_schwa) 65%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;}
.phon_wai_maj { background: -webkit-linear-gradient(var(--phon_w) 58%, var(--phon_a) 58%, var(--phon_i_maj) 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;} .phon_wai_maj { background: -webkit-linear-gradient(var(--phon_w) 45%, var(--phon_a) 55%, var(--phon_i_maj) 65%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;}
.phon_war { background: -webkit-linear-gradient(var(--phon_w) 58%, var(--phon_a) 58%, var(--phon_r_slash) 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;} .phon_war { background: -webkit-linear-gradient(var(--phon_w) 45%, var(--phon_a) 55%, var(--phon_r_slash) 65%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;}
.phon_ju_majr { background: -webkit-linear-gradient(var(--phon_j) 58%, var(--phon_u_maj) 58%, var(--phon_r_slash) 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;} .phon_ju_majr { background: -webkit-linear-gradient(var(--phon_j) 45%, var(--phon_u_maj) 55%, var(--phon_r_slash) 65%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;}
.phon_ai_majarobase { background: -webkit-linear-gradient(var(--phon_a) 58%, var(--phon_i_maj) 58%, var(--phon_arobase) 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;} .phon_ai_majarobase { background: -webkit-linear-gradient(var(--phon_a) 45%, var(--phon_i_maj) 55%, var(--phon_arobase) 65%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;}
/* gradients horizontaux (mandarin) */ /* gradients horizontaux (mandarin) */
......
...@@ -543,7 +543,13 @@ footer { ...@@ -543,7 +543,13 @@ footer {
background-color: rgb(82, 82, 82); background-color: rgb(82, 82, 82);
} }
.phonTableTd {
text-align: center;
}
[class*="custphon"] { [class*="custphon"] {
width: max-content; width: max-content;
margin: auto; margin: auto;
display: inline-flex;
font-family: Verdana, Arial, Helvetica, sans-serif;
} }
\ No newline at end of file
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</div> </div>
</div> </div>
<div class="accordion" id="accordionExample" style="display:none"> <div class="accordion" id="accordionExample">
<div class="accordion-item"> <div class="accordion-item">
<h2 class="accordion-header" id="headingTwo"> <h2 class="accordion-header" id="headingTwo">
<button class="accordion-button collapsed myAccordion-btn langtitle" id="ti_btnCustom" style="border-radius: 50%;" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> <button class="accordion-button collapsed myAccordion-btn langtitle" id="ti_btnCustom" style="border-radius: 50%;" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
......
Markdown is supported
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