diff --git a/daemon.py b/daemon.py index c6b1e560..26c7358a 100644 --- a/daemon.py +++ b/daemon.py @@ -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)) diff --git a/translations/en.json b/translations/en.json index b13c8cdf..860c5b08 100644 --- a/translations/en.json +++ b/translations/en.json @@ -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" } diff --git a/translations/fr.json b/translations/fr.json index 8d2fddb0..223d8334 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -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" } diff --git a/webinterface.py b/webinterface.py index cab7bb21..7d14e32b 100644 --- a/webinterface.py +++ b/webinterface.py @@ -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+='

Emoji Search

' + emojiForm+='

'+translate['Emoji Search']+'

' # does the lookup file exist? if not os.path.isfile(emojiLookupFilename): - emojiForm+='
No results
' + emojiForm+='
'+translate['No results']+'
' 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+='
Copy the text then paste it into your post
' + emojiForm+='
'+translate['Copy the text then paste it into your post']+'
' headingShown=True emojiForm+='

:'+emojiName+':

' emojiForm+=''