forked from indymedia/epicyon
Emoji search translations
parent
8cd455d7b6
commit
c1388f7fb9
|
@ -2848,7 +2848,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchStr=searchStr.lower().strip('\n').replace(' emoji','')
|
||||
# emoji search
|
||||
emojiStr= \
|
||||
htmlSearchEmoji(self.server.baseDir,searchStr)
|
||||
htmlSearchEmoji(self.server.translate,self.server.baseDir,searchStr)
|
||||
if emojiStr:
|
||||
msg=emojiStr.encode('utf-8')
|
||||
self._login_headers('text/html',len(msg))
|
||||
|
|
|
@ -125,5 +125,8 @@
|
|||
"Moderators": "Moderators",
|
||||
"List of moderator nicknames": "List of moderator nicknames",
|
||||
"Your bio": "Your bio",
|
||||
"Skill": "Skill"
|
||||
"Skill": "Skill",
|
||||
"Copy the text then paste it into your post": "Copy the text then paste it into your post",
|
||||
"Emoji Search": "Emoji Search",
|
||||
"No results": "No results"
|
||||
}
|
||||
|
|
|
@ -125,5 +125,8 @@
|
|||
"Moderators": "Les modérateurs",
|
||||
"List of moderator nicknames": "Liste des pseudo du modérateur",
|
||||
"Your bio": "Votre biographie",
|
||||
"Skill": "Compétence"
|
||||
"Skill": "Compétence",
|
||||
"Copy the text then paste it into your post": "Copiez le texte puis collez-le dans votre message",
|
||||
"Emoji Search": "Emoji recherche",
|
||||
"No results": "Aucun résultat"
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ def getPersonAvatarUrl(baseDir: str,personUrl: str,personCache: {}) -> str:
|
|||
return personJson['icon']['url']
|
||||
return None
|
||||
|
||||
def htmlSearchEmoji(baseDir: str,searchStr: str) -> str:
|
||||
def htmlSearchEmoji(translate: {},baseDir: str,searchStr: str) -> str:
|
||||
"""Search results for emoji
|
||||
"""
|
||||
|
||||
|
@ -65,11 +65,11 @@ def htmlSearchEmoji(baseDir: str,searchStr: str) -> str:
|
|||
|
||||
# create header
|
||||
emojiForm=htmlHeader(emojiCSS)
|
||||
emojiForm+='<center><h1>Emoji Search</h1></center>'
|
||||
emojiForm+='<center><h1>'+translate['Emoji Search']+'</h1></center>'
|
||||
|
||||
# does the lookup file exist?
|
||||
if not os.path.isfile(emojiLookupFilename):
|
||||
emojiForm+='<center><h5>No results</h5></center>'
|
||||
emojiForm+='<center><h5>'+translate['No results']+'</h5></center>'
|
||||
emojiForm+=htmlFooter()
|
||||
return emojiForm
|
||||
|
||||
|
@ -87,7 +87,7 @@ def htmlSearchEmoji(baseDir: str,searchStr: str) -> str:
|
|||
for emojiName,filename in results.items():
|
||||
if os.path.isfile(baseDir+'/emoji/'+filename):
|
||||
if not headingShown:
|
||||
emojiForm+='<center><h5>Copy the text then paste it into your post</h5></center>'
|
||||
emojiForm+='<center><h5>'+translate['Copy the text then paste it into your post']+'</h5></center>'
|
||||
headingShown=True
|
||||
emojiForm+='<h3>:'+emojiName+':<img class="searchEmoji" src="/emoji/'+filename+'"/></h3>'
|
||||
emojiForm+='</center>'
|
||||
|
|
Loading…
Reference in New Issue