Show version number on about screen

merge-requests/10/merge
Bob Mottram 2021-01-25 20:37:27 +00:00
parent fe2711adb8
commit b9ebc6115d
17 changed files with 55 additions and 22 deletions

View File

@ -10440,20 +10440,21 @@ class PubServer(BaseHTTPRequestHandler):
htmlAbout(self.server.cssCache, htmlAbout(self.server.cssCache,
self.server.baseDir, 'http', self.server.baseDir, 'http',
self.server.onionDomain, self.server.onionDomain,
None) None, self.server.translate)
elif callingDomain.endswith('.i2p'): elif callingDomain.endswith('.i2p'):
msg = \ msg = \
htmlAbout(self.server.cssCache, htmlAbout(self.server.cssCache,
self.server.baseDir, 'http', self.server.baseDir, 'http',
self.server.i2pDomain, self.server.i2pDomain,
None) None, self.server.translate)
else: else:
msg = \ msg = \
htmlAbout(self.server.cssCache, htmlAbout(self.server.cssCache,
self.server.baseDir, self.server.baseDir,
self.server.httpPrefix, self.server.httpPrefix,
self.server.domainFull, self.server.domainFull,
self.server.onionDomain) self.server.onionDomain,
self.server.translate)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._login_headers('text/html', msglen, callingDomain) self._login_headers('text/html', msglen, callingDomain)

View File

@ -361,5 +361,7 @@
"Moved to new account address": "انتقل إلى عنوان الحساب الجديد", "Moved to new account address": "انتقل إلى عنوان الحساب الجديد",
"Yet another Epicyon Instance": "مثال آخر Epicyon", "Yet another Epicyon Instance": "مثال آخر Epicyon",
"Other accounts": "حسابات أخرى", "Other accounts": "حسابات أخرى",
"Pin this post to your profile.": "تثبيت هذه الوظيفة في ملف التعريف الخاص بك." "Pin this post to your profile.": "تثبيت هذه الوظيفة في ملف التعريف الخاص بك.",
"Administered by": "تدار من قبل",
"Version": "الإصدار"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "S'ha mogut a l'adreça del compte nova", "Moved to new account address": "S'ha mogut a l'adreça del compte nova",
"Yet another Epicyon Instance": "Encara una altra instància Epicyon", "Yet another Epicyon Instance": "Encara una altra instància Epicyon",
"Other accounts": "Altres comptes", "Other accounts": "Altres comptes",
"Pin this post to your profile.": "Fixa aquesta publicació al teu perfil." "Pin this post to your profile.": "Fixa aquesta publicació al teu perfil.",
"Administered by": "Administrat per",
"Version": "Versió"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Wedi'i symud i gyfeiriad cyfrif newydd", "Moved to new account address": "Wedi'i symud i gyfeiriad cyfrif newydd",
"Yet another Epicyon Instance": "Digwyddiad Epicyon arall", "Yet another Epicyon Instance": "Digwyddiad Epicyon arall",
"Other accounts": "Cyfrifon eraill", "Other accounts": "Cyfrifon eraill",
"Pin this post to your profile.": "Piniwch y post hwn i'ch proffil." "Pin this post to your profile.": "Piniwch y post hwn i'ch proffil.",
"Administered by": "Gweinyddir gan",
"Version": "Fersiwn"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "An neue Kontoadresse verschoben", "Moved to new account address": "An neue Kontoadresse verschoben",
"Yet another Epicyon Instance": "Noch eine Epicyon-Instanz", "Yet another Epicyon Instance": "Noch eine Epicyon-Instanz",
"Other accounts": "Andere Konten", "Other accounts": "Andere Konten",
"Pin this post to your profile.": "Pin diesen Beitrag zu Ihrem Profil." "Pin this post to your profile.": "Pin diesen Beitrag zu Ihrem Profil.",
"Administered by": "Verwaltet von",
"Version": "Ausführung"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Moved to new account address", "Moved to new account address": "Moved to new account address",
"Yet another Epicyon Instance": "Yet another Epicyon Instance", "Yet another Epicyon Instance": "Yet another Epicyon Instance",
"Other accounts": "Other accounts", "Other accounts": "Other accounts",
"Pin this post to your profile.": "Pin this post to your profile." "Pin this post to your profile.": "Pin this post to your profile.",
"Administered by": "Administered by",
"Version": "Version"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Movido a la nueva dirección de la cuenta", "Moved to new account address": "Movido a la nueva dirección de la cuenta",
"Yet another Epicyon Instance": "Otra instancia más de Epicyon", "Yet another Epicyon Instance": "Otra instancia más de Epicyon",
"Other accounts": "Otras cuentas", "Other accounts": "Otras cuentas",
"Pin this post to your profile.": "Fija esta publicación a tu perfil." "Pin this post to your profile.": "Fija esta publicación a tu perfil.",
"Administered by": "Administrado por",
"Version": "Versión"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Déplacé vers une nouvelle adresse de compte", "Moved to new account address": "Déplacé vers une nouvelle adresse de compte",
"Yet another Epicyon Instance": "Encore une autre instance Epicyon", "Yet another Epicyon Instance": "Encore une autre instance Epicyon",
"Other accounts": "Autres comptes", "Other accounts": "Autres comptes",
"Pin this post to your profile.": "Épinglez ce message à votre profil." "Pin this post to your profile.": "Épinglez ce message à votre profil.",
"Administered by": "Administré par",
"Version": "Version"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Ar athraíodh a ionad go seoladh cuntas nua", "Moved to new account address": "Ar athraíodh a ionad go seoladh cuntas nua",
"Yet another Epicyon Instance": "Institiúid Epicyon eile fós", "Yet another Epicyon Instance": "Institiúid Epicyon eile fós",
"Other accounts": "Cuntais eile", "Other accounts": "Cuntais eile",
"Pin this post to your profile.": "Bioráin an post seo le do phróifíl." "Pin this post to your profile.": "Bioráin an post seo le do phróifíl.",
"Administered by": "Riartha ag",
"Version": "Leagan"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "नए खाते के पते पर ले जाया गया", "Moved to new account address": "नए खाते के पते पर ले जाया गया",
"Yet another Epicyon Instance": "फिर भी एक और एपिकॉन उदाहरण", "Yet another Epicyon Instance": "फिर भी एक और एपिकॉन उदाहरण",
"Other accounts": "अन्य खाते", "Other accounts": "अन्य खाते",
"Pin this post to your profile.": "इस पोस्ट को अपनी प्रोफाइल पर पिन करें।" "Pin this post to your profile.": "इस पोस्ट को अपनी प्रोफाइल पर पिन करें।",
"Administered by": "द्वारा प्रशासित",
"Version": "संस्करण"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Spostato al nuovo indirizzo dell'account", "Moved to new account address": "Spostato al nuovo indirizzo dell'account",
"Yet another Epicyon Instance": "Ancora un'altra istanza di Epicyon", "Yet another Epicyon Instance": "Ancora un'altra istanza di Epicyon",
"Other accounts": "Altri account", "Other accounts": "Altri account",
"Pin this post to your profile.": "Metti questo post sul tuo profilo." "Pin this post to your profile.": "Metti questo post sul tuo profilo.",
"Administered by": "Amministrato da",
"Version": "Versione"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "新しいアカウントアドレスに移動しました", "Moved to new account address": "新しいアカウントアドレスに移動しました",
"Yet another Epicyon Instance": "さらに別のエピキオンインスタンス", "Yet another Epicyon Instance": "さらに別のエピキオンインスタンス",
"Other accounts": "その他のアカウント", "Other accounts": "その他のアカウント",
"Pin this post to your profile.": "この投稿をプロフィールに固定します。" "Pin this post to your profile.": "この投稿をプロフィールに固定します。",
"Administered by": "管理者",
"Version": "バージョン"
} }

View File

@ -357,5 +357,7 @@
"Moved to new account address": "Moved to new account address", "Moved to new account address": "Moved to new account address",
"Yet another Epicyon Instance": "Yet another Epicyon Instance", "Yet another Epicyon Instance": "Yet another Epicyon Instance",
"Other accounts": "Other accounts", "Other accounts": "Other accounts",
"Pin this post to your profile.": "Pin this post to your profile." "Pin this post to your profile.": "Pin this post to your profile.",
"Administered by": "Administered by",
"Version": "Version"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Movido para o novo endereço da conta", "Moved to new account address": "Movido para o novo endereço da conta",
"Yet another Epicyon Instance": "Mais uma instância do Epicyon", "Yet another Epicyon Instance": "Mais uma instância do Epicyon",
"Other accounts": "Outras contas", "Other accounts": "Outras contas",
"Pin this post to your profile.": "Fixar esta postagem em seu perfil." "Pin this post to your profile.": "Fixar esta postagem em seu perfil.",
"Administered by": "Administrado por",
"Version": "Versão"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "Перемещен на новый адрес учетной записи", "Moved to new account address": "Перемещен на новый адрес учетной записи",
"Yet another Epicyon Instance": "Еще один экземпляр Эпикиона", "Yet another Epicyon Instance": "Еще один экземпляр Эпикиона",
"Other accounts": "Другие аккаунты", "Other accounts": "Другие аккаунты",
"Pin this post to your profile.": "Закрепите это сообщение в своем профиле." "Pin this post to your profile.": "Закрепите это сообщение в своем профиле.",
"Administered by": "Под управлением",
"Version": "Версия"
} }

View File

@ -361,5 +361,7 @@
"Moved to new account address": "移至新帐户地址", "Moved to new account address": "移至新帐户地址",
"Yet another Epicyon Instance": "另一个Epicyon实例", "Yet another Epicyon Instance": "另一个Epicyon实例",
"Other accounts": "其他账户", "Other accounts": "其他账户",
"Pin this post to your profile.": "将此帖子固定到您的个人资料。" "Pin this post to your profile.": "将此帖子固定到您的个人资料。",
"Administered by": "由...管理",
"Version": "版"
} }

View File

@ -14,7 +14,7 @@ from webapp_utils import htmlFooter
def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str, def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str,
domainFull: str, onionDomain: str) -> str: domainFull: str, onionDomain: str, translate: {}) -> str:
"""Show the about screen """Show the about screen
""" """
adminNickname = getConfigParam(baseDir, 'admin') adminNickname = getConfigParam(baseDir, 'admin')
@ -50,8 +50,10 @@ def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str,
adminActor = '/users/' + adminNickname adminActor = '/users/' + adminNickname
aboutForm += \ aboutForm += \
'<div class="container"><center>\n' + \ '<div class="container"><center>\n' + \
'<p class="administeredby">Administered by <a href="' + \ '<p class="administeredby">' + \
adminActor + '">' + adminNickname + '</a></p>\n' + \ translate['Administered by'] + ' <a href="' + \
'</center></div>\n' adminActor + '">' + adminNickname + '</a>. ' + \
translate['Version'] + ' ' + __version__ + \
'</p>\n</center></div>\n'
aboutForm += htmlFooter() aboutForm += htmlFooter()
return aboutForm return aboutForm