Commit 38b27cd7 authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

debug ajout/modif dico : suppr point syllabation dans dico en mémoire

parent 0f2da1f9
...@@ -485,11 +485,14 @@ def modifEntry(user,mot,infos,lang): ...@@ -485,11 +485,14 @@ def modifEntry(user,mot,infos,lang):
oldInfos = dico.find_one({'w':mot}) oldInfos = dico.find_one({'w':mot})
dico.update({"w":mot}, {"$set": infos}) dico.update({"w":mot}, {"$set": infos})
word2trans[mot]['t'] = infos['t']
word2trans[mot]['t'] = []
for x in infos['t']:
word2trans[mot]['t'].append({'tt':x['tt'].replace('.',''), 'tr':x['tr']})
newlog = writeLog(Type="MODIF", user=user, mot=mot, oldMot=oldInfos, newMot=infos, lang=lang) newlog = writeLog(Type="MODIF", user=user, mot=mot, oldMot=oldInfos, newMot=infos, lang=lang)
print("Modification du dictionnaire par",user,": lang =",lang,"; mot =",mot,"; oldMot =",oldInfos,"; newMot =",infos) print("Modification du dictionnaire par",user,": lang =",lang,"; mot =",mot,"; oldMot =",oldInfos,"; newMot =",infos)
print("ICIIII newlog:",newlog) print("Newlog:",newlog)
return {"msg":"Modification effectuée avec succès !", "newlog":newlog} return {"msg":"Modification effectuée avec succès !", "newlog":newlog}
def addEntry(user,mot,trans,lang): def addEntry(user,mot,trans,lang):
...@@ -518,11 +521,11 @@ def addEntry(user,mot,trans,lang): ...@@ -518,11 +521,11 @@ def addEntry(user,mot,trans,lang):
for t in transList: for t in transList:
if len(t)>0: if len(t)>0:
if lang =="fr": if lang =="fr":
newMot['t'].append({ 'tt':t, 'tr':['FR']}) newMot['t'].append({ 'tt':t.replace('.',''), 'tr':['FR']})
elif lang =="zh": elif lang =="zh":
newMot['t'].append({ 'tt':t, 'tr':['CN']}) newMot['t'].append({ 'tt':t.replace('.',''), 'tr':['CN']})
else: else:
newMot['t'].append({ 'tt':t, 'tr':[]}) newMot['t'].append({ 'tt':t.replace('.',''), 'tr':[]})
if len(newMot['t'])>0: if len(newMot['t'])>0:
word2trans[mot] = newMot word2trans[mot] = newMot
......
...@@ -23,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...@@ -23,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'l3(pm0grf6(99ggn$187q@i(or#9j^q@*#g#mf^d0^z^ul7#-&' SECRET_KEY = 'l3(pm0grf6(99ggn$187q@i(or#9j^q@*#g#mf^d0^z^ul7#-&'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = False
ALLOWED_HOSTS = ['127.0.0.1','wikicolor-preprod.alem-app.fr','wikicolor.alem-app.fr'] ALLOWED_HOSTS = ['127.0.0.1','wikicolor-preprod.alem-app.fr','wikicolor.alem-app.fr']
......
...@@ -423,6 +423,8 @@ function toMonochrome() { ...@@ -423,6 +423,8 @@ function toMonochrome() {
// document.getElementById('output').classList.toggle('graphContours'); // document.getElementById('output').classList.toggle('graphContours');
// }; // };
var defaultBg = "black"; var defaultBg = "black";
var phonA = getComputedStyle(document.documentElement).getPropertyValue('--phon_a')
function bg2white() { function bg2white() {
if (defaultBg == 'black') { if (defaultBg == 'black') {
defaultBg = 'white'; defaultBg = 'white';
...@@ -439,7 +441,7 @@ function bg2white() { ...@@ -439,7 +441,7 @@ function bg2white() {
} else { } else {
defaultBg = 'black'; defaultBg = 'black';
if (thisPageLang!='zh'){ if (thisPageLang!='zh'){
document.documentElement.style.setProperty('--phon_a', 'white'); document.documentElement.style.setProperty('--phon_a', phonA);
document.documentElement.style.setProperty('--phon_monochrome', 'rgb(218, 218, 218)'); document.documentElement.style.setProperty('--phon_monochrome', 'rgb(218, 218, 218)');
} else { } else {
document.documentElement.style.setProperty('--sinosvgneutrecolor','white'); document.documentElement.style.setProperty('--sinosvgneutrecolor','white');
......
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