From b9ebc6115df0fa2c42c03555b24991310fc71bfe Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 25 Jan 2021 20:37:27 +0000 Subject: [PATCH] Show version number on about screen --- daemon.py | 7 ++++--- translations/ar.json | 4 +++- translations/ca.json | 4 +++- translations/cy.json | 4 +++- translations/de.json | 4 +++- translations/en.json | 4 +++- translations/es.json | 4 +++- translations/fr.json | 4 +++- translations/ga.json | 4 +++- translations/hi.json | 4 +++- translations/it.json | 4 +++- translations/ja.json | 4 +++- translations/oc.json | 4 +++- translations/pt.json | 4 +++- translations/ru.json | 4 +++- translations/zh.json | 4 +++- webapp_about.py | 10 ++++++---- 17 files changed, 55 insertions(+), 22 deletions(-) diff --git a/daemon.py b/daemon.py index bb4235bfa..90ebc18f1 100644 --- a/daemon.py +++ b/daemon.py @@ -10440,20 +10440,21 @@ class PubServer(BaseHTTPRequestHandler): htmlAbout(self.server.cssCache, self.server.baseDir, 'http', self.server.onionDomain, - None) + None, self.server.translate) elif callingDomain.endswith('.i2p'): msg = \ htmlAbout(self.server.cssCache, self.server.baseDir, 'http', self.server.i2pDomain, - None) + None, self.server.translate) else: msg = \ htmlAbout(self.server.cssCache, self.server.baseDir, self.server.httpPrefix, self.server.domainFull, - self.server.onionDomain) + self.server.onionDomain, + self.server.translate) msg = msg.encode('utf-8') msglen = len(msg) self._login_headers('text/html', msglen, callingDomain) diff --git a/translations/ar.json b/translations/ar.json index 08839363d..14c244723 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -361,5 +361,7 @@ "Moved to new account address": "انتقل إلى عنوان الحساب الجديد", "Yet another Epicyon Instance": "مثال آخر Epicyon", "Other accounts": "حسابات أخرى", - "Pin this post to your profile.": "تثبيت هذه الوظيفة في ملف التعريف الخاص بك." + "Pin this post to your profile.": "تثبيت هذه الوظيفة في ملف التعريف الخاص بك.", + "Administered by": "تدار من قبل", + "Version": "الإصدار" } diff --git a/translations/ca.json b/translations/ca.json index 8df71695f..5eb0f01d3 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -361,5 +361,7 @@ "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", "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ó" } diff --git a/translations/cy.json b/translations/cy.json index 3a54c4961..500106838 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -361,5 +361,7 @@ "Moved to new account address": "Wedi'i symud i gyfeiriad cyfrif newydd", "Yet another Epicyon Instance": "Digwyddiad Epicyon arall", "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" } diff --git a/translations/de.json b/translations/de.json index 4f3a5128b..6da6054c0 100644 --- a/translations/de.json +++ b/translations/de.json @@ -361,5 +361,7 @@ "Moved to new account address": "An neue Kontoadresse verschoben", "Yet another Epicyon Instance": "Noch eine Epicyon-Instanz", "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" } diff --git a/translations/en.json b/translations/en.json index 3bc9c885a..58c97cf3f 100644 --- a/translations/en.json +++ b/translations/en.json @@ -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." + "Pin this post to your profile.": "Pin this post to your profile.", + "Administered by": "Administered by", + "Version": "Version" } diff --git a/translations/es.json b/translations/es.json index 523c834bf..ef064cfc4 100644 --- a/translations/es.json +++ b/translations/es.json @@ -361,5 +361,7 @@ "Moved to new account address": "Movido a la nueva dirección de la cuenta", "Yet another Epicyon Instance": "Otra instancia más de Epicyon", "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" } diff --git a/translations/fr.json b/translations/fr.json index 7697e692c..6c28048fc 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -361,5 +361,7 @@ "Moved to new account address": "Déplacé vers une nouvelle adresse de compte", "Yet another Epicyon Instance": "Encore une autre instance Epicyon", "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" } diff --git a/translations/ga.json b/translations/ga.json index e803f9504..187295784 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -361,5 +361,7 @@ "Moved to new account address": "Ar athraíodh a ionad go seoladh cuntas nua", "Yet another Epicyon Instance": "Institiúid Epicyon eile fós", "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" } diff --git a/translations/hi.json b/translations/hi.json index 2493caf75..0481275c3 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -361,5 +361,7 @@ "Moved to new account address": "नए खाते के पते पर ले जाया गया", "Yet another Epicyon Instance": "फिर भी एक और एपिकॉन उदाहरण", "Other accounts": "अन्य खाते", - "Pin this post to your profile.": "इस पोस्ट को अपनी प्रोफाइल पर पिन करें।" + "Pin this post to your profile.": "इस पोस्ट को अपनी प्रोफाइल पर पिन करें।", + "Administered by": "द्वारा प्रशासित", + "Version": "संस्करण" } diff --git a/translations/it.json b/translations/it.json index a009ece6b..255998ad9 100644 --- a/translations/it.json +++ b/translations/it.json @@ -361,5 +361,7 @@ "Moved to new account address": "Spostato al nuovo indirizzo dell'account", "Yet another Epicyon Instance": "Ancora un'altra istanza di Epicyon", "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" } diff --git a/translations/ja.json b/translations/ja.json index 50460c8b6..838169403 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -361,5 +361,7 @@ "Moved to new account address": "新しいアカウントアドレスに移動しました", "Yet another Epicyon Instance": "さらに別のエピキオンインスタンス", "Other accounts": "その他のアカウント", - "Pin this post to your profile.": "この投稿をプロフィールに固定します。" + "Pin this post to your profile.": "この投稿をプロフィールに固定します。", + "Administered by": "管理者", + "Version": "バージョン" } diff --git a/translations/oc.json b/translations/oc.json index f82ba1ea4..e6b8813f8 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -357,5 +357,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." + "Pin this post to your profile.": "Pin this post to your profile.", + "Administered by": "Administered by", + "Version": "Version" } diff --git a/translations/pt.json b/translations/pt.json index 8601ff19d..192d0de42 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -361,5 +361,7 @@ "Moved to new account address": "Movido para o novo endereço da conta", "Yet another Epicyon Instance": "Mais uma instância do Epicyon", "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" } diff --git a/translations/ru.json b/translations/ru.json index 89a9896cc..bec84afb1 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -361,5 +361,7 @@ "Moved to new account address": "Перемещен на новый адрес учетной записи", "Yet another Epicyon Instance": "Еще один экземпляр Эпикиона", "Other accounts": "Другие аккаунты", - "Pin this post to your profile.": "Закрепите это сообщение в своем профиле." + "Pin this post to your profile.": "Закрепите это сообщение в своем профиле.", + "Administered by": "Под управлением", + "Version": "Версия" } diff --git a/translations/zh.json b/translations/zh.json index 67e0daf4f..aa6a65f7c 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -361,5 +361,7 @@ "Moved to new account address": "移至新帐户地址", "Yet another Epicyon Instance": "另一个Epicyon实例", "Other accounts": "其他账户", - "Pin this post to your profile.": "将此帖子固定到您的个人资料。" + "Pin this post to your profile.": "将此帖子固定到您的个人资料。", + "Administered by": "由...管理", + "Version": "版" } diff --git a/webapp_about.py b/webapp_about.py index f84c31c41..600136f79 100644 --- a/webapp_about.py +++ b/webapp_about.py @@ -14,7 +14,7 @@ from webapp_utils import htmlFooter def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str, - domainFull: str, onionDomain: str) -> str: + domainFull: str, onionDomain: str, translate: {}) -> str: """Show the about screen """ adminNickname = getConfigParam(baseDir, 'admin') @@ -50,8 +50,10 @@ def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str, adminActor = '/users/' + adminNickname aboutForm += \ '
\n' + \ - '

Administered by ' + adminNickname + '

\n' + \ - '
\n' + '

' + \ + translate['Administered by'] + ' ' + adminNickname + '. ' + \ + translate['Version'] + ' ' + __version__ + \ + '

\n\n' aboutForm += htmlFooter() return aboutForm