From 3a57a76703837301ace710b144a0e36c9eba51cf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 18 Feb 2020 17:09:07 +0000 Subject: [PATCH] add a generic summary if none is provided --- translations/ar.json | 3 ++- translations/ca.json | 3 ++- translations/cy.json | 3 ++- translations/de.json | 3 ++- translations/en.json | 3 ++- translations/es.json | 3 ++- translations/fr.json | 3 ++- translations/ga.json | 3 ++- translations/hi.json | 3 ++- translations/it.json | 3 ++- translations/ja.json | 3 ++- translations/oc.json | 3 ++- translations/pt.json | 3 ++- translations/ru.json | 3 ++- translations/zh.json | 3 ++- webinterface.py | 5 ++++- 16 files changed, 34 insertions(+), 16 deletions(-) diff --git a/translations/ar.json b/translations/ar.json index 25502ed7..7592497f 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "هذا هو المقرر المقرر.", "Remove scheduled posts": "إزالة المشاركات المجدولة", - "Remove Twitter posts": "إزالة مشاركات Twitter" + "Remove Twitter posts": "إزالة مشاركات Twitter", + "Sensitive": "حساس" } diff --git a/translations/ca.json b/translations/ca.json index 8f2c12ba..1e83ba7b 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Aquesta és una publicació programada.", "Remove scheduled posts": "Elimineu les publicacions programades", - "Remove Twitter posts": "Elimina les publicacions de Twitter" + "Remove Twitter posts": "Elimina les publicacions de Twitter", + "Sensitive": "Sensible" } diff --git a/translations/cy.json b/translations/cy.json index d35dcf03..2ee7d3c0 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Mae hon yn swydd wedi'i hamserlennu.", "Remove scheduled posts": "Tynnwch y swyddi a drefnwyd", - "Remove Twitter posts": "Dileu postiadau Twitter" + "Remove Twitter posts": "Dileu postiadau Twitter", + "Sensitive": "Sensitif" } diff --git a/translations/de.json b/translations/de.json index 59ee5e14..5175ab64 100644 --- a/translations/de.json +++ b/translations/de.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Dies ist ein geplanter Beitrag.", "Remove scheduled posts": "Geplante Posts entfernen", - "Remove Twitter posts": "Entfernen Sie Twitter-Posts" + "Remove Twitter posts": "Entfernen Sie Twitter-Posts", + "Sensitive": "Empfindlich" } diff --git a/translations/en.json b/translations/en.json index 3951814c..4d414907 100644 --- a/translations/en.json +++ b/translations/en.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "This is a scheduled post.", "Remove scheduled posts": "Remove scheduled posts", - "Remove Twitter posts": "Remove Twitter posts" + "Remove Twitter posts": "Remove Twitter posts", + "Sensitive": "Sensitive" } diff --git a/translations/es.json b/translations/es.json index 997e8760..56afedfd 100644 --- a/translations/es.json +++ b/translations/es.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Esta es una publicación programada.", "Remove scheduled posts": "Eliminar publicaciones programadas", - "Remove Twitter posts": "Eliminar publicaciones de Twitter" + "Remove Twitter posts": "Eliminar publicaciones de Twitter", + "Sensitive": "Sensible" } diff --git a/translations/fr.json b/translations/fr.json index 8d295707..d50a469c 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Il s'agit d'un article programmé.", "Remove scheduled posts": "Supprimer les messages planifiés", - "Remove Twitter posts": "Supprimer les messages Twitter" + "Remove Twitter posts": "Supprimer les messages Twitter", + "Sensitive": "Sensible" } diff --git a/translations/ga.json b/translations/ga.json index 422528f2..ea76c6c0 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Is post sceidealta é seo.", "Remove scheduled posts": "Bain na poist sceidealta", - "Remove Twitter posts": "Bain poist Twitter" + "Remove Twitter posts": "Bain poist Twitter", + "Sensitive": "Íogair" } diff --git a/translations/hi.json b/translations/hi.json index fedf96b2..5eeeaf53 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "यह एक अनुसूचित पद है।", "Remove scheduled posts": "अनुसूचित पदों को हटा दें", - "Remove Twitter posts": "ट्विटर पोस्ट हटाएं" + "Remove Twitter posts": "ट्विटर पोस्ट हटाएं", + "Sensitive": "संवेदनशील" } diff --git a/translations/it.json b/translations/it.json index 9c48c063..7c8c2451 100644 --- a/translations/it.json +++ b/translations/it.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Questo è un post programmato", "Remove scheduled posts": "Rimuovi i post programmati", - "Remove Twitter posts": "Rimuovi i post di Twitter" + "Remove Twitter posts": "Rimuovi i post di Twitter", + "Sensitive": "Sensibile" } diff --git a/translations/ja.json b/translations/ja.json index 2f25e618..7028110c 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "これはスケジュールされた投稿です。", "Remove scheduled posts": "スケジュールされた投稿を削除する", - "Remove Twitter posts": "Twitterの投稿を削除する" + "Remove Twitter posts": "Twitterの投稿を削除する", + "Sensitive": "敏感" } diff --git a/translations/oc.json b/translations/oc.json index 038035d2..a9fbc05e 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -203,5 +203,6 @@ "PGP": "PGP", "This is a scheduled post.": "This is a scheduled post.", "Remove scheduled posts": "Remove scheduled posts", - "Remove Twitter posts": "Remove Twitter posts" + "Remove Twitter posts": "Remove Twitter posts", + "Sensitive": "Sensitive" } diff --git a/translations/pt.json b/translations/pt.json index 9f54f794..4b7f0534 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Esta é uma postagem agendada.", "Remove scheduled posts": "Remover postagens agendadas", - "Remove Twitter posts": "Remover postagens do Twitter" + "Remove Twitter posts": "Remover postagens do Twitter", + "Sensitive": "Sensível" } diff --git a/translations/ru.json b/translations/ru.json index 775b32a6..fec06a36 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "Это запланированный пост.", "Remove scheduled posts": "Удалить запланированные сообщения", - "Remove Twitter posts": "Удалить сообщения из Твиттера" + "Remove Twitter posts": "Удалить сообщения из Твиттера", + "Sensitive": "чувствительный" } diff --git a/translations/zh.json b/translations/zh.json index 4be8bf9b..681d2bd2 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -207,5 +207,6 @@ "PGP": "PGP", "This is a scheduled post.": "这是预定的帖子。", "Remove scheduled posts": "删除预定的帖子", - "Remove Twitter posts": "删除Twitter帖子" + "Remove Twitter posts": "删除Twitter帖子", + "Sensitive": "敏感" } diff --git a/webinterface.py b/webinterface.py index c6670c8f..c7cf253e 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2654,7 +2654,10 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \ # sensitive posts should have a summary if postJsonObject['object'].get('summary'): postIsSensitive=postJsonObject['object']['sensitive'] - + else: + # add a generic summary if none is provided + postJsonObject['object']['summary']=translate['Sensitive'] + # add an extra line if there is a content warning, for better vertical spacing on mobile if postIsSensitive: footerStr='
'+footerStr