Commit 4a7e059e authored by Sylvain Coulange's avatar Sylvain Coulange 🌼
Browse files

ajout allemand en cours

parent 406d94b3
......@@ -51,6 +51,7 @@ urlpatterns = [
path('zh/', clavier_views.newPage),
path('dz/', clavier_views.newPage),
path('shy/', clavier_views.newPage),
path('de/', clavier_views.newPage),
path('id-<str:pageId>/', clavier_views.loadPage),
path('id-<str:pageId>/page', clavier_views.getPageContent),
path('<str:pageLang>/id-<str:pageId>/', clavier_views.loadPage),
......
......@@ -25,7 +25,7 @@ var pageId = '0'
if (dataPage == 0) {
// Chargement d'une page vierge
console.log("Chargement d'une page vierge.")
var thisRawURL = thisURL.replace('/fr','').replace('/en','').replace('/zh','').replace('/dz','').replace('/shy','');
var thisRawURL = thisURL.replace('/fr','').replace('/en','').replace('/zh','').replace('/dz','').replace('/shy',''.replace('/de',''));
setLangFromUrl()
} else {
console.log("Chargement de la page",dataPage.pageId)
......@@ -212,7 +212,7 @@ function recupPhon(identifiant){
//// IF modeGraphies
//// → lister les graphies
if (thisPageLang != "dz" && thisPageLang != "shy") {
if (thisPageLang != "dz" && thisPageLang != "shy" && thisPageLang != "de") {
currentPhon = identifiant
var graphZone = document.getElementById("graphiesZone")
......@@ -275,6 +275,36 @@ function recupPhon(identifiant){
newg.setAttribute('onClick', "writeGraph('"+graphlist[g]+"','"+identifiant.replace('rect_', 'phon_')+" noUnderLine')")
}
hanDiv.appendChild(newg)
}
} else if (thisPageLang == "de") {
// Allemand = comme ARABE ALGÉRIEN - traitement plus simple
var graphZone = document.getElementById("graphiesZone")
graphlist = api2de[phon2api[identifiant.replace('rect_', 'phon_')]]
console.log(identifiant, graphlist)
graphZone.innerHTML = "";
var hanDiv = document.createElement("div");
hanDiv.id = "hanDiv";
hanDiv.style.width = "100%";
hanDiv.style.height = "100%";
hanDiv.classList = "d-flex justify-content-evenly align-content-around flex-wrap";
document.getElementById('graphiesZone').innerHTML = "";
document.getElementById('graphiesZone').appendChild(hanDiv);
document.getElementById('graphiesZone').appendChild(hanDiv);
for (g in graphlist) {
newg = document.createElement('div')
var graphie = graphlist[g];
if (maj) graphie = graphie[0].toUpperCase()+graphie.slice(1);
newg.innerHTML = graphie;
newg.classList.add('graph')
newg.classList.add('graph6')
newg.classList.add(identifiant.replace('rect_', 'phon_'))
newg.setAttribute('onClick', "writeGraph('"+graphie+"','"+identifiant.replace('rect_', 'phon_')+"')")
hanDiv.appendChild(newg)
}
}
......
......@@ -4,6 +4,7 @@ var id2class = {
"rect_o_maj_nas":"phon_o_maj_nas",
"rect_1":"phon_1",
"rect_2":"phon_2",
"rect_2_long":"phon_2_long",
"rect_3":"phon_3",
"rect_3_long":"phon_3_long",
"rect_4":"phon_4",
......@@ -18,9 +19,11 @@ var id2class = {
"rect_a_maj_nas":"phon_a_maj_nas",
"rect_b":"phon_b",
"rect_b_maj":"phon_b_maj",
"rect_c_maj":"phon_c_maj",
"rect_d":"phon_d",
"rect_d_maj":"phon_d_maj",
"rect_e":"phon_e",
"rect_e_long":"phon_e_long",
"rect_e_maj":"phon_e_maj",
"rect_e_maj_nas":"phon_e_maj_nas",
"rect_f":"phon_f",
......@@ -79,6 +82,7 @@ var id2class = {
"rect_dz":"phon_dz",
"rect_dz_maj":"phon_dz_maj",
"rect_ks":"phon_ks",
"rect_kv":"phon_kv",
"rect_gz":"phon_gz",
"rect_ij":"phon_ij",
"rect_h_maj_i":"phon_h_maj_i",
......@@ -91,6 +95,8 @@ var id2class = {
"rect_u_majarobase":"phon_u_majarobase",
"rect_o_maji_maj":"phon_o_maji_maj",
"rect_ai_maj":"phon_ai_maj",
"rect_schw6":"phon_schw6",
"rect_a_maju_maj":"phon_a_maju_maj",
"punct":"phon_neutre"
};
......
......@@ -6,7 +6,7 @@ var thisPageLang = "";
// set page target language
function setLangFromUrl() {
var pageLang = thisURL.match(/.*\/(fr|en|zh|dz|shy)/);
var pageLang = thisURL.match(/.*\/(fr|en|zh|dz|shy|de)/);
if (pageLang) {
console.log("Langue indiquée par l'url:",pageLang[1]);
thisPageLang = pageLang[1];
......@@ -15,6 +15,7 @@ function setLangFromUrl() {
if (pageLang[1]=="zh") selectLang("zh");
if (pageLang[1]=="dz") selectLang("dz");
if (pageLang[1]=="shy") selectLang("shy");
if (pageLang[1]=="de") selectLang("de");
} else {
console.log("Chargement langue par défaut (fr)");
thisPageLang = "fr"
......@@ -132,6 +133,20 @@ function selectLang(lang, p="default", f="default"){
if (pageId == '0') window.history.pushState("", "", "/shy");
interface("shy");
} else if (lang == "de") {
var phonoDeAlem = document.createElement('option');
phonoDeAlem.value = "phonoDeAlem";
phonoDeAlem.innerHTML = "ALeM Deutsch v05b";
phonolist.appendChild(phonoDeAlem);
var fidelDeAlem = document.createElement('option');
fidelDeAlem.value = "fidelDeAlem";
fidelDeAlem.innerHTML = "Fidel ALeM Deutsch";
fidellist.appendChild(fidelDeAlem);
if (pageId == '0') window.history.pushState("", "", "/de");
interface("de");
}
selectPanneau(p);
selectFidel(f);
......@@ -151,6 +166,8 @@ function selectPanneau(p){
} else if (p=="default" && thisPageLang=="shy") {
if (modeGraphies==0) p = "phonoShypSb4";
else p = "phonoShyfSb4";
} else if (p=="default" && thisPageLang=="de") {
p = "phonoDeAlem";
}
var svgFrKinephones = document.getElementById('svgFrKinephones'); // Panneau FR Kinephones
......@@ -179,6 +196,10 @@ function selectPanneau(p){
var svgShypSb4 = document.getElementById('svgShypSb4'); // Panneau Chaoui Sarra Benbouaziz v4
var svgShyfSb4 = document.getElementById('svgShyfSb4'); // Panneau Fidel Chaoui Sarra Benbouaziz v4
var svgBackDeAlem = document.getElementById('svgBackDeAlem'); // Panneau DE ALeM (fond couleurs)
var pngPochoirDeAlem = document.getElementById('pngPochoirDeAlem'); // Panneau DE ALeM (formes bouches)
var svgClickDeAlem = document.getElementById('svgClickDeAlem'); // Panneau DE ALeM (zones clickables)
function resetPanneaux() {
// FR DO
doCalques.style.display = 'none';
......@@ -220,6 +241,11 @@ function selectPanneau(p){
// SHY Fidel SB v4
svgShyfSb4.style.display = 'none';
// DE ALEM
svgBackDeAlem.style.display = 'none';
pngPochoirDeAlem.style.display = 'none';
svgClickDeAlem.style.display = 'none';
if (modeGraphies==1) {
document.getElementById('graphies').style.display = 'block'
document.getElementById('clavier').classList.remove('clavierSeul')
......@@ -339,6 +365,15 @@ function selectPanneau(p){
svgShyfSb4.style.display = 'block';
document.getElementById('selectFidel').style.display = 'none';
} else if (p == 'phonoDeAlem') {
resetPanneaux();
// DE Alem
svgBackDeAlem.style.display = 'block';
pngPochoirDeAlem.style.display = 'block';
svgClickDeAlem.style.display = 'block';
}
}
......@@ -354,6 +389,8 @@ function selectFidel(f){
f = "fidelSb";
} else if (f=="default" && thisPageLang=="shy") {
f = "";
} else if (f=="default" && thisPageLang=="de") {
f = "fidelDeAlem";
}
fidel = dicoFidels[f];
document.getElementById('selectFidel').value = f;
......@@ -455,6 +492,12 @@ function interface(lang) {
// Indiquer le lien de Page Vierge
document.getElementById('hrefNewPage').href = thisRawURL+'shy/';
} else if (lang == "de") {
initInterface();
// Indiquer le lien de Page Vierge
document.getElementById('hrefNewPage').href = thisRawURL+'de/';
} else { // "fr" par défaut
initInterface();
......
// api2phon généré automatiquement.
var phon2api = {
"phon_1":"ɨ",
"phon_2":"ø",
"phon_3_long":"ɜː",
"phon_3_rho":"ɝ",
"phon_3_slash":"ɞ",
"phon_3":"ɜ",
"phon_4":"ɾ",
"phon_5":"",
"phon_5X":"ɫ",
"phon_6":"ɐ",
"phon_7_rho":"ɤ˞",
"phon_7":"ɤ",
"phon_8":"ɵ",
"phon_9_maj":"ɶ",
"phon_9_nas":"œ̃",
"phon_9":"œ",
"phon_a_centr":"ä",
"phon_a_maj_long":"ɑː",
"phon_a_maj_nas":"ɑ̃",
"phon_a_maj":"ɑ",
"phon_a_majr":"ɑɹ",
"phon_a_rho":"",
"phon_a":"a",
"phon_ai_maj":"",
"phon_ai_majarobase":"aɪə",
"phon_arobase_rho":"ɚ",
"phon_arobase_slash":"ɘ",
"phon_arobase":"ə",
"phon_arobasel":"əl",
"phon_arobasem":"əm",
"phon_arobasen":"ən",
"phon_arobaseu_maj":"əʊ",
"phon_au_maj":"",
"phon_au_majwarobase":"aʊwə",
"phon_b_chev":"ɓ",
"phon_b_maj_slash":"ʙ",
"phon_b_maj":"β",
"phon_b":"b",
"phon_bb_maj":"",
"phon_bv":"bv",
"phon_c_maj":"ç",
"phon_c":"c",
"phon_cbrack":"æ",
"phon_cbrack2":"ʉ",
"phon_cc_maj":"",
"phon_chevron_slash":"ʢ",
"phon_chevron2_slash":"ʡ",
"phon_d_chev":"ɗ",
"phon_d_maj":"ð",
"phon_d_retr":"ɖ",
"phon_d_slashz_retr":"ɖʐ",
"phon_d":"d",
"phon_dd_maj":"",
"phon_dz_maj":"",
"phon_dz_retr":"",
"phon_dz_slash":"",
"phon_dz":"dz",
"phon_e_maj_nas":"ɛ̃",
"phon_e_maj":"ɛ",
"phon_e_maj_long":"ɛː",
"phon_e":"e",
"phon_e_long":"",
"phon_earobase":"",
"phon_ef":"ef",
"phon_egal_slash":"ǂ",
"phon_ei_maj":"",
"phon_er":"",
"phon_exclam_slash":"ǃ",
"phon_f_maj":"ɱ",
"phon_f":"f",
"phon_g_chev":"ɠ",
"phon_g_maj_slash_chev":"ʛ",
"phon_g_maj_slash":"ɢ",
"phon_g_maj_slashr_maj":"ɢʁ",
"phon_g_maj":"ɣ",
"phon_g_majw":"ɣw",
"phon_g_majwX":"ɣʷ",
"phon_g":"ɡ",
"phon_gb":"ɡb",
"phon_gg_maj":"ɡɣ",
"phon_glottstop_slash":"ʕ",
"phon_glottstop":"ʔ",
"phon_glottstoph":"ʔh",
"phon_gw":"ɡw",
"phon_gwX":"ɡʷ",
"phon_gz_maj":"ɡʒ",
"phon_gz":"ɡz",
"phon_h_maj_i":"ɥi",
"phon_h_maj_slash":"ʜ",
"phon_h_maj":"ɥ",
"phon_h_slash":"ɦ",
"phon_h":"h",
"phon_i_long":"",
"phon_i_maj":"ɪ",
"phon_i_majarobase":"ɪə",
"phon_i_majr":"ɪɹ",
"phon_i":"i",
"phon_ij":"ij",
"phon_j_maj_slash_chev":"ʄ",
"phon_j_maj_slash":"ɟ",
"phon_j_maj_slashj_slash":"ɟʝ",
"phon_j_maj":"ɲ",
"phon_j_majc":"ɲc",
"phon_j_majj_maj_slash":"ɲɟ",
"phon_j_slash":"ʝ",
"phon_j":"j",
"phon_j3_rho":"",
"phon_jarobase":"",
"phon_ju_long":"juː",
"phon_ju_majarobase":"jʊə",
"phon_ju_majr":"jʊɹ",
"phon_k_chev2":"",
"phon_k_h":"",
"phon_k_maj_slash":"ɮ",
"phon_k_maj":"ɬ",
"phon_k":"k",
"phon_kp":"kp",
"phon_ks_maj":"",
"phon_ks":"ks",
"phon_kw":"kw",
"phon_kwX":"",
"phon_kx":"kx",
"phon_l_maj_slash":"ʟ",
"phon_l_maj":"ʎ",
"phon_l_retr":"ɭ",
"phon_l":"l",
"phon_lj":"lj",
"phon_m_maj_slash":"ɰ",
"phon_m_maj":"ɯ",
"phon_m":"m",
"phon_mb_maj":"",
"phon_mb":"mb",
"phon_mp_slash":"",
"phon_mp":"mp",
"phon_n_maj_slash":"ɴ",
"phon_n_maj_slashg_maj_slash":"ɴɢ",
"phon_n_maj_slashq":"ɴq",
"phon_n_maj":"ŋ",
"phon_n_majg":"ŋɡ",
"phon_n_majk":"ŋk",
"phon_n_majm":"ŋm",
"phon_n_majw":"ŋw",
"phon_n_majwX":"ŋʷ",
"phon_n_retr":"ɳ",
"phon_n_retrd_retr":"ɳɖ",
"phon_n_retrt":"ɳʈ",
"phon_n":"n",
"phon_nd_d":"nd̪",
"phon_nd_maj":"",
"phon_nd":"nd",
"phon_nj":"nj",
"phon_ns_maj":"",
"phon_ns":"ns",
"phon_nt_d":"nt̪",
"phon_nt_maj":"",
"phon_nt":"nt",
"phon_nz_maj":"",
"phon_nz":"nz",
"phon_o_maj_long":"ɔː",
"phon_o_maj_nas":"ɔ̃",
"phon_o_maj_slash":"ʘ",
"phon_o_maj":"ɔ",
"phon_o_maji_maj":"ɔɪ",
"phon_o_majr":"ɔɹ",
"phon_o":"o",
"phon_ou_maj":"",
"phon_p_chev2":"",
"phon_p_d":"",
"phon_p_h":"",
"phon_p_maj":"ʋ",
"phon_p_slash":"ɸ",
"phon_p":"p",
"phon_pf":"pf",
"phon_pipe_slash":"ǀ",
"phon_pipe_slashpipe_slash":"ǁ",
"phon_pp_slash":"",
"phon_q_chev2":"",
"phon_q_maj":"ɒ",
"phon_q":"q",
"phon_qx_maj":"",
"phon_r_0":"",
"phon_r_maj_slash":"ʀ",
"phon_r_maj":"ʁ",
"phon_r_retr":"ɽ",
"phon_r_slash_retr":"ɻ",
"phon_r_slash":"ɹ",
"phon_r":"r",
"phon_s_chev2":"",
"phon_s_maj_chev2":"ʃʼ",
"phon_s_maj":"ʃ",
"phon_s_retr":"ʂ",
"phon_s_slash":"ɕ",
"phon_s":"s",
"phon_schwa":"ə",
"phon_schwar":"əɹ",
"phon_schwaz":"əz",
"phon_schwi":"ɪ",
"phon_schwiz":"ɪz",
"phon_schwju":"",
"phon_schwu":"ʊ",
"phon_sz":"sz",
"phon_t_chev2":"",
"phon_t_h":"",
"phon_t_hs_retr":"tʂʰ",
"phon_t_hs_slash":"tɕʰ",
"phon_t_hs":"tsʰ",
"phon_t_maj":"θ",
"phon_t_retr_chev2":"ʈʼ",
"phon_t_retr":"ʈ",
"phon_t_slashs_retr":"ʈʂ",
"phon_t":"t",
"phon_tk_maj_slash":"",
"phon_tk_maj":"",
"phon_ts_chev2":"tsʼ",
"phon_ts_maj_chev2":"tʃʼ",
"phon_ts_maj":"",
"phon_ts_retr":"",
"phon_ts_slash":"",
"phon_ts":"ts",
"phon_tt_maj":"",
"phon_u_long":"",
"phon_u_maj":"ʊ",
"phon_u_majarobase":"ʊə",
"phon_u_majr":"ʊɹ",
"phon_u":"u",
"phon_v_flap":"",
"phon_v_maj":"ʌ",
"phon_v":"v",
"phon_w_maj":"ʍ",
"phon_w":"w",
"phon_wa_maj_long":"wɑː",
"phon_wa_maj":"",
"phon_wa":"wa",
"phon_wai_maj":"waɪ",
"phon_war":"waɹ",
"phon_we_maj_nas":"wɛ̃",
"phon_wv_maj":"",
"phon_x_chev2":"",
"phon_x_maj_slash":"ħ",
"phon_x_maj":"χ",
"phon_x_slash":"ɧ",
"phon_x":"x",
"phon_xw":"xw",
"phon_xwX":"",
"phon_y_maj":"ʏ",
"phon_y":"y",
"phon_z_maj":"ʒ",
"phon_z_retr":"ʐ",
"phon_z_slash":"ʑ",
"phon_z":"z",
"phon_1":"ɨ",
"phon_2_long":"øː",
"phon_2":"ø",
"phon_3_long":"ɜː",
"phon_3_rho":"ɝ",
"phon_3_slash":"ɞ",
"phon_3":"ɜ",
"phon_4":"ɾ",
"phon_5":"",
"phon_5X":"ɫ",
"phon_6":"ɐ",
"phon_7_rho":"ɤ˞",
"phon_7":"ɤ",
"phon_8":"ɵ",
"phon_9_maj":"ɶ",
"phon_9_nas":"œ̃",
"phon_9":"œ",
"phon_a_centr":"ä",
"phon_a_long":"",
"phon_a_maj_long":"ɑː",
"phon_a_maj_nas":"ɑ̃",
"phon_a_maj":"ɑ",
"phon_a_majr":"ɑɹ",
"phon_a_maju_maj":"",
"phon_a_rho":"",
"phon_a":"a",
"phon_ai_maj":"",
"phon_ai_majarobase":"aɪə",
"phon_arobase_rho":"ɚ",
"phon_arobase_slash":"ɘ",
"phon_arobase":"ə",
"phon_arobasel":"əl",
"phon_arobasem":"əm",
"phon_arobasen":"ən",
"phon_arobaseu_maj":"əʊ",
"phon_au_maj":"",
"phon_au_majwarobase":"aʊwə",
"phon_b_chev":"ɓ",
"phon_b_emph":"",
"phon_b_maj_slash":"ʙ",
"phon_b_maj":"β",
"phon_b":"b",
"phon_bb_maj":"",
"phon_bv":"bv",
"phon_c_maj":"ç",
"phon_c":"c",
"phon_cbrack":"æ",
"phon_cbrack2":"ʉ",
"phon_cc_maj":"",
"phon_chevron_slash":"ʢ",
"phon_chevron2_slash":"ʡ",
"phon_d_chev":"ɗ",
"phon_d_emph":"",
"phon_d_maj_emph":"ðˤ",
"phon_d_maj":"ð",
"phon_d_retr":"ɖ",
"phon_d_slashz_retr":"ɖʐ",
"phon_d":"d",
"phon_dd_maj":"",
"phon_dz_maj":"",
"phon_dz_retr":"",
"phon_dz_slash":"",
"phon_dz":"dz",
"phon_e_long":"",
"phon_e_maj_long":"ɛː",
"phon_e_maj_nas":"ɛ̃",
"phon_e_maj":"ɛ",
"phon_e":"e",
"phon_earobase":"",
"phon_ef":"ef",
"phon_egal_slash":"ǂ",
"phon_ei_maj":"",
"phon_er":"",
"phon_exclam_slash":"ǃ",
"phon_f_maj":"ɱ",
"phon_f":"f",
"phon_g_chev":"ɠ",
"phon_g_maj_slash_chev":"ʛ",
"phon_g_maj_slash":"ɢ",
"phon_g_maj_slashr_maj":"ɢʁ",
"phon_g_maj":"ɣ",
"phon_g_majw":"ɣw",
"phon_g_majwX":"ɣʷ",
"phon_g":"ɡ",
"phon_gb":"ɡb",
"phon_gg_maj":"ɡɣ",
"phon_glottstop_slash":"ʕ",
"phon_glottstop":"ʔ",
"phon_glottstoph":"ʔh",
"phon_gw":"ɡw",
"phon_gwX":"ɡʷ",
"phon_gz_maj":"ɡʒ",
"phon_gz":"ɡz",
"phon_h_maj_i":"ɥi",
"phon_h_maj_slash":"ʜ",
"phon_h_maj":"ɥ",
"phon_h_slash":"ɦ",
"phon_h":"h",
"phon_i_long":"",
"phon_i_maj":"ɪ",
"phon_i_majarobase":"ɪə",
"phon_i_majr":"ɪɹ",
"phon_i":"i",
"phon_ij":"ij",
"phon_int_slash":"ʕ",
"phon_j_maj_slash_chev":"ʄ",
"phon_j_maj_slash":"ɟ",
"phon_j_maj_slashj_slash":"ɟʝ",
"phon_j_maj":"ɲ",
"phon_j_majc":"ɲc",
"phon_j_majj_maj_slash":"ɲɟ",
"phon_j_slash":"ʝ",
"phon_j":"j",
"phon_j3_rho":"",
"phon_jarobase":"",
"phon_ju_long":"juː",
"phon_ju_majarobase":"jʊə",
"phon_ju_majr":"jʊɹ",
"phon_k_chev2":"",
"phon_k_h":"",
"phon_k_maj_slash":"ɮ",
"phon_k_maj":"ɬ",
"phon_k":"k",
"phon_kp":"kp",
"phon_ks_maj":"",
"phon_ks":"ks",
"phon_kv":"kv",
"phon_kw":"kw",
"phon_kwX":"",
"phon_kx":"kx",