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):
oldInfos = dico.find_one({'w':mot})
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)
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}
def addEntry(user,mot,trans,lang):
......@@ -518,11 +521,11 @@ def addEntry(user,mot,trans,lang):
for t in transList:
if len(t)>0:
if lang =="fr":
newMot['t'].append({ 'tt':t, 'tr':['FR']})
newMot['t'].append({ 'tt':t.replace('.',''), 'tr':['FR']})
elif lang =="zh":
newMot['t'].append({ 'tt':t, 'tr':['CN']})
newMot['t'].append({ 'tt':t.replace('.',''), 'tr':['CN']})
else:
newMot['t'].append({ 'tt':t, 'tr':[]})
newMot['t'].append({ 'tt':t.replace('.',''), 'tr':[]})
if len(newMot['t'])>0:
word2trans[mot] = newMot
......
......@@ -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#-&'
# 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']
......
......@@ -423,6 +423,8 @@ function toMonochrome() {
// document.getElementById('output').classList.toggle('graphContours');
// };
var defaultBg = "black";
var phonA = getComputedStyle(document.documentElement).getPropertyValue('--phon_a')
function bg2white() {
if (defaultBg == 'black') {
defaultBg = 'white';
......@@ -439,7 +441,7 @@ function bg2white() {
} else {
defaultBg = 'black';
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)');
} else {
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