Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pédagogies Multimodales
wikicolor
Commits
38b27cd7
Commit
38b27cd7
authored
Aug 06, 2022
by
Sylvain Coulange
Browse files
debug ajout/modif dico : suppr point syllabation dans dico en mémoire
parent
0f2da1f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
colorapp/textPhonographer.py
View file @
38b27cd7
...
...
@@ -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 n
ewlog:"
,
newlog
)
print
(
"
N
ewlog:"
,
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
...
...
coloriseur/settings.py
View file @
38b27cd7
...
...
@@ -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
=
Tru
e
DEBUG
=
Fals
e
ALLOWED_HOSTS
=
[
'127.0.0.1'
,
'wikicolor-preprod.alem-app.fr'
,
'wikicolor.alem-app.fr'
]
...
...
static/scripts/main.js
View file @
38b27cd7
...
...
@@ -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
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment