mirror of https://gitlab.com/bashrc2/epicyon
Translate shared items search
parent
0076870cf7
commit
bd0152344c
|
@ -2859,7 +2859,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
else:
|
||||
# shared items search
|
||||
sharedItemsStr= \
|
||||
htmlSearchSharedItems(self.server.baseDir, \
|
||||
htmlSearchSharedItems(self.server.translate, \
|
||||
self.server.baseDir, \
|
||||
searchStr,pageNumber, \
|
||||
maxPostsInFeed, \
|
||||
self.server.httpPrefix, \
|
||||
|
|
|
@ -129,5 +129,6 @@
|
|||
"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",
|
||||
"Skills search": "Skills search"
|
||||
"Skills search": "Skills search",
|
||||
"Shared Items Search": "Shared Items Search"
|
||||
}
|
||||
|
|
|
@ -129,5 +129,6 @@
|
|||
"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",
|
||||
"Skills search": "Recherche de compétences"
|
||||
"Skills search": "Recherche de compétences",
|
||||
"Shared Items Search": "Recherche d'articles partagés"
|
||||
}
|
||||
|
|
|
@ -95,10 +95,12 @@ def htmlSearchEmoji(translate: {},baseDir: str,searchStr: str) -> str:
|
|||
emojiForm+=htmlFooter()
|
||||
return emojiForm
|
||||
|
||||
def htmlSearchSharedItems(baseDir: str,searchStr: str, \
|
||||
def htmlSearchSharedItems(translate: {}, \
|
||||
baseDir: str,searchStr: str, \
|
||||
pageNumber: int, \
|
||||
resultsPerPage: int, \
|
||||
httpPrefix: str,domainFull: str,actor: str) -> str:
|
||||
httpPrefix: str, \
|
||||
domainFull: str,actor: str) -> str:
|
||||
"""Search results for shared items
|
||||
"""
|
||||
currPage=1
|
||||
|
@ -109,7 +111,7 @@ def htmlSearchSharedItems(baseDir: str,searchStr: str, \
|
|||
with open(baseDir+'/epicyon-profile.css', 'r') as cssFile:
|
||||
sharedItemsCSS=cssFile.read()
|
||||
sharedItemsForm=htmlHeader(sharedItemsCSS)
|
||||
sharedItemsForm+='<center><h1>Shared Items Search</h1></center>'
|
||||
sharedItemsForm+='<center><h1>'+translate['Shared Items Search']+'</h1></center>'
|
||||
resultsExist=False
|
||||
for subdir, dirs, files in os.walk(baseDir+'/accounts'):
|
||||
for handle in dirs:
|
||||
|
@ -180,7 +182,7 @@ def htmlSearchSharedItems(baseDir: str,searchStr: str, \
|
|||
break
|
||||
ctr=0
|
||||
if not resultsExist:
|
||||
sharedItemsForm+='<center><h5>No results</h5></center>'
|
||||
sharedItemsForm+='<center><h5>'+translate['No results']+'</h5></center>'
|
||||
sharedItemsForm+=htmlFooter()
|
||||
return sharedItemsForm
|
||||
|
||||
|
|
Loading…
Reference in New Issue