mirror of https://gitlab.com/bashrc2/epicyon
Translate profile edit screen
parent
78bacbea96
commit
1539395ae4
|
@ -1271,7 +1271,10 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
# edit profile in web interface
|
||||
if '/users/' in self.path and self.path.endswith('/editprofile'):
|
||||
msg=htmlEditProfile(self.server.baseDir,self.path,self.server.domain,self.server.port).encode()
|
||||
msg=htmlEditProfile(self.server.translate, \
|
||||
self.server.baseDir, \
|
||||
self.path,self.server.domain, \
|
||||
self.server.port).encode()
|
||||
self._set_headers('text/html',len(msg),cookie)
|
||||
self.wfile.write(msg)
|
||||
self.server.GETbusy=False
|
||||
|
|
|
@ -106,5 +106,23 @@
|
|||
"Nickname": "Nickname",
|
||||
"Enter Nickname": "Enter Nickname",
|
||||
"Password": "Password",
|
||||
"Enter Password": "Enter Password"
|
||||
"Enter Password": "Enter Password",
|
||||
"Profile for": "Profile for",
|
||||
"The files attached below should be no larger than 10MB in total uploaded at once.": "The files attached below should be no larger than 10MB in total uploaded at once.",
|
||||
"Avatar image": "Avatar image",
|
||||
"Background image": "Background image",
|
||||
"Timeline banner image": "Timeline banner image",
|
||||
"Approve follower requests": "Approve follower requests",
|
||||
"This is a bot account": "This is a bot account",
|
||||
"Filtered words": "Filtered words",
|
||||
"One per line": "One per line",
|
||||
"Blocked accounts": "Blocked accounts",
|
||||
"Blocked accounts, one per line, in the form nickname@domain or *@blockeddomain": "Blocked accounts, one per line, in the form nickname@domain or *@blockeddomain",
|
||||
"Federation list": "Federation list",
|
||||
"Federate only with a defined set of instances. One domain name per line.": "Federate only with a defined set of instances. One domain name per line.",
|
||||
"If you want to participate within organizations then you can indicate some skills that you have and approximate proficiency levels. This helps organizers to construct teams with an appropriate combination of skills.": "If you want to participate within organizations then you can indicate some skills that you have and approximate proficiency levels. This helps organizers to construct teams with an appropriate combination of skills.",
|
||||
"A list of moderator nicknames. One per line.": "A list of moderator nicknames. One per line.",
|
||||
"Moderators": "Moderators",
|
||||
"List of moderator nicknames": "List of moderator nicknames",
|
||||
"Your bio": "Your bio"
|
||||
}
|
||||
|
|
|
@ -106,5 +106,23 @@
|
|||
"Nickname": "Pseudo",
|
||||
"Enter Nickname": "Entrez le pseudo",
|
||||
"Password": "Mot de passe",
|
||||
"Enter Password": "Entrer le mot de passe"
|
||||
"Enter Password": "Entrer le mot de passe",
|
||||
"Profile for": "Profil pour",
|
||||
"The files attached below should be no larger than 10MB in total uploaded at once.": "Les fichiers joints ci-dessous ne doivent pas dépasser 10 Mo au total, téléchargés en même temps.",
|
||||
"Avatar image": "Image d'avatar",
|
||||
"Background image": "Image de fond",
|
||||
"Timeline banner image": "Image de la bannière de la timeline",
|
||||
"Approve follower requests": "Approuver les demandes de suiveurs",
|
||||
"This is a bot account": "Ceci est un compte bot",
|
||||
"Filtered words": "Mots filtrés",
|
||||
"One per line": "Un par ligne",
|
||||
"Blocked accounts": "Comptes bloqués",
|
||||
"Blocked accounts, one per line, in the form nickname@domain or *@blockeddomain": "Comptes bloqués, un par ligne, sous la forme pseudo @ domaine ou * @ domaine bloqué",
|
||||
"Federation list": "Liste de la fédération",
|
||||
"Federate only with a defined set of instances. One domain name per line.": "Fédérer uniquement avec un ensemble défini d'instances. Un nom de domaine par ligne.",
|
||||
"If you want to participate within organizations then you can indicate some skills that you have and approximate proficiency levels. This helps organizers to construct teams with an appropriate combination of skills.": "Si vous souhaitez participer au sein d'organisations, vous pouvez indiquer certaines de vos compétences et vous rapprocher des niveaux de compétence. Cela aide les organisateurs à construire des équipes avec une combinaison appropriée de compétences.",
|
||||
"A list of moderator nicknames. One per line.": "Une liste de surnoms de modérateurs. Un par ligne.",
|
||||
"Moderators": "Les modérateurs",
|
||||
"List of moderator nicknames": "Liste des pseudo du modérateur",
|
||||
"Your bio": "Votre biographie"
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ def htmlSkillsSearch(baseDir: str,skillsearch: str,instanceOnly: bool,postsPerPa
|
|||
skillSearchForm+=htmlFooter()
|
||||
return skillSearchForm
|
||||
|
||||
def htmlEditProfile(baseDir: str,path: str,domain: str,port: int) -> str:
|
||||
def htmlEditProfile(translate: {},baseDir: str,path: str,domain: str,port: int) -> str:
|
||||
"""Shows the edit profile screen
|
||||
"""
|
||||
pathOriginal=path
|
||||
|
@ -464,52 +464,52 @@ def htmlEditProfile(baseDir: str,path: str,domain: str,port: int) -> str:
|
|||
moderators = f.read()
|
||||
moderatorsStr= \
|
||||
'<div class="container">' \
|
||||
' <b>Moderators</b><br>' \
|
||||
' A list of moderator nicknames. One per line.' \
|
||||
' <textarea id="message" name="moderators" placeholder="List of moderator nicknames..." style="height:200px">'+moderators+'</textarea>' \
|
||||
' <b>'+translate['Moderators']+'</b><br>' \
|
||||
' '+translate['A list of moderator nicknames. One per line.']+ \
|
||||
' <textarea id="message" name="moderators" placeholder="'+translate['List of moderator nicknames']+'..." style="height:200px">'+moderators+'</textarea>' \
|
||||
'</div>'
|
||||
|
||||
editProfileForm=htmlHeader(editProfileCSS)
|
||||
editProfileForm+= \
|
||||
'<form enctype="multipart/form-data" method="POST" action="'+path+'/profiledata">' \
|
||||
' <div class="vertical-center">' \
|
||||
' <p class="new-post-text">Profile for '+nickname+'@'+domainFull+'</p>' \
|
||||
' <p class="new-post-text">'+translate['Profile for']+' '+nickname+'@'+domainFull+'</p>' \
|
||||
' <div class="container">' \
|
||||
' <input type="submit" name="submitProfile" value="Submit">' \
|
||||
' <a href="'+pathOriginal+'"><button class="cancelbtn">Cancel</button></a>' \
|
||||
' <input type="submit" name="submitProfile" value="'+translate['Submit']+'">' \
|
||||
' <a href="'+pathOriginal+'"><button class="cancelbtn">'+translate['Cancel']+'</button></a>' \
|
||||
' </div>'+ \
|
||||
' <div class="container">' \
|
||||
' <input type="text" placeholder="name" name="displayNickname" value="'+displayNickname+'">' \
|
||||
' <textarea id="message" name="bio" placeholder="Your bio..." style="height:200px">'+bioStr+'</textarea>' \
|
||||
' <textarea id="message" name="bio" placeholder="'+translate['Your bio']+'..." style="height:200px">'+bioStr+'</textarea>' \
|
||||
' </div>' \
|
||||
' <div class="container">' \
|
||||
' The files attached below should be no larger than 10MB in total uploaded at once.<br>' \
|
||||
' Avatar image' \
|
||||
' '+translate['The files attached below should be no larger than 10MB in total uploaded at once.']+'<br>' \
|
||||
' '+translate['Avatar image']+ \
|
||||
' <input type="file" id="avatar" name="avatar"' \
|
||||
' accept=".png">' \
|
||||
' <br>Background image' \
|
||||
' <br>'+translate['Background image']+ \
|
||||
' <input type="file" id="image" name="image"' \
|
||||
' accept=".png">' \
|
||||
' <br>Timeline banner image' \
|
||||
' <br>'+translate['Timeline banner image']+ \
|
||||
' <input type="file" id="banner" name="banner"' \
|
||||
' accept=".png">' \
|
||||
' </div>' \
|
||||
' <div class="container">' \
|
||||
' <input type="checkbox" class=profilecheckbox" name="approveFollowers" '+manuallyApprovesFollowers+'>Approve follower requests<br>' \
|
||||
' <input type="checkbox" class=profilecheckbox" name="isBot" '+isBot+'>This is a bot account<br>' \
|
||||
' <br><b>Filtered words</b>' \
|
||||
' <br>One per line' \
|
||||
' <input type="checkbox" class=profilecheckbox" name="approveFollowers" '+manuallyApprovesFollowers+'>'+translate['Approve follower requests']+'<br>' \
|
||||
' <input type="checkbox" class=profilecheckbox" name="isBot" '+isBot+'>'+translate['This is a bot account']+'<br>' \
|
||||
' <br><b>'+translate['Filtered words']+'</b>' \
|
||||
' <br>'+translate['One per line']+ \
|
||||
' <textarea id="message" name="filteredWords" placeholder="" style="height:200px">'+filterStr+'</textarea>' \
|
||||
' <br><b>Blocked accounts</b>' \
|
||||
' <br>Blocked accounts, one per line, in the form <i>nickname@domain</i> or <i>*@blockeddomain</i>' \
|
||||
' <br><b>'+translate['Blocked accounts']+'</b>' \
|
||||
' <br>'+translate['Blocked accounts, one per line, in the form nickname@domain or *@blockeddomain']+ \
|
||||
' <textarea id="message" name="blocked" placeholder="" style="height:200px">'+blockedStr+'</textarea>' \
|
||||
' <br><b>Federation list</b>' \
|
||||
' <br>Federate only with a defined set of instances. One domain name per line.' \
|
||||
' <br><b>'+translate['Federation list']+'</b>' \
|
||||
' <br>'+translate['Federate only with a defined set of instances. One domain name per line.']+ \
|
||||
' <textarea id="message" name="allowedInstances" placeholder="" style="height:200px">'+allowedInstancesStr+'</textarea>' \
|
||||
' </div>' \
|
||||
' <div class="container">' \
|
||||
' <b>Skills</b><br>' \
|
||||
' If you want to participate within organizations then you can indicate some skills that you have and approximate proficiency levels. This helps organizers to construct teams with an appropriate combination of skills.'+ \
|
||||
' <b>'+translate['Skills']+'</b><br>' \
|
||||
' '+translate['If you want to participate within organizations then you can indicate some skills that you have and approximate proficiency levels. This helps organizers to construct teams with an appropriate combination of skills.']+ \
|
||||
skillsStr+moderatorsStr+ \
|
||||
' </div>' \
|
||||
' </div>' \
|
||||
|
|
Loading…
Reference in New Issue