Citations button

main
Bob Mottram 2020-11-04 15:27:13 +00:00
parent 0986bab067
commit 4a6c2dee03
17 changed files with 59 additions and 19 deletions

View File

@ -1830,7 +1830,8 @@ class PubServer(BaseHTTPRequestHandler):
chooserNickname, chooserNickname,
domain, domain,
domainFull, domainFull,
self.server.defaultTimeline).encode('utf-8') self.server.defaultTimeline,
self.server.newswire).encode('utf-8')
self._set_headers('text/html', len(msg), self._set_headers('text/html', len(msg),
cookie, callingDomain) cookie, callingDomain)
self._write(msg) self._write(msg)
@ -1897,7 +1898,8 @@ class PubServer(BaseHTTPRequestHandler):
chooserNickname, chooserNickname,
domain, domain,
domainFull, domainFull,
self.server.defaultTimeline).encode('utf-8') self.server.defaultTimeline,
self.server.newswire).encode('utf-8')
self._set_headers('text/html', len(msg), self._set_headers('text/html', len(msg),
cookie, callingDomain) cookie, callingDomain)
self._write(msg) self._write(msg)
@ -8494,7 +8496,8 @@ class PubServer(BaseHTTPRequestHandler):
replyPageNumber, replyPageNumber,
nickname, domain, nickname, domain,
domainFull, domainFull,
self.server.defaultTimeline).encode('utf-8') self.server.defaultTimeline,
self.server.newswire).encode('utf-8')
if not msg: if not msg:
print('Error replying to ' + inReplyToUrl) print('Error replying to ' + inReplyToUrl)
self._404() self._404()

View File

@ -325,5 +325,7 @@
"Features" : "ميزات", "Features" : "ميزات",
"Article": "مقال إخباري", "Article": "مقال إخباري",
"Create an article": "قم بإنشاء مقال", "Create an article": "قم بإنشاء مقال",
"Settings": "إعدادات" "Settings": "إعدادات",
"Citations": "اقتباسات",
"Choose newswire items referenced in your article": "اختر العناصر الإخبارية المشار إليها في مقالتك"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Article", "Features" : "Article",
"Article": "Reportatge", "Article": "Reportatge",
"Create an article": "Creeu un article", "Create an article": "Creeu un article",
"Settings": "Configuració" "Settings": "Configuració",
"Citations": "Cites",
"Choose newswire items referenced in your article": "Trieu articles de newswire als quals faci referència el vostre article"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Nodweddion", "Features" : "Nodweddion",
"Article": "Erthygl", "Article": "Erthygl",
"Create an article": "Creu erthygl", "Create an article": "Creu erthygl",
"Settings": "Gosodiadau" "Settings": "Gosodiadau",
"Citations": "Dyfyniadau",
"Choose newswire items referenced in your article": "Dewiswch eitemau newyddion y cyfeirir atynt yn eich erthygl"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Eigenschaften", "Features" : "Eigenschaften",
"Article": "Artikel", "Article": "Artikel",
"Create an article": "Erstellen Sie einen Artikel", "Create an article": "Erstellen Sie einen Artikel",
"Settings": "Einstellungen" "Settings": "Einstellungen",
"Citations": "Zitate",
"Choose newswire items referenced in your article": "Wählen Sie Newswire-Artikel aus, auf die in Ihrem Artikel verwiesen wird"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Features", "Features" : "Features",
"Article": "Article", "Article": "Article",
"Create an article": "Create an article", "Create an article": "Create an article",
"Settings": "Settings" "Settings": "Settings",
"Citations": "Citations",
"Choose newswire items referenced in your article": "Choose newswire items referenced in your article"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Caracteristicas", "Features" : "Caracteristicas",
"Article": "Artículo", "Article": "Artículo",
"Create an article": "Crea un articulo", "Create an article": "Crea un articulo",
"Settings": "Configuraciones" "Settings": "Configuraciones",
"Citations": "Citas",
"Choose newswire items referenced in your article": "Elija elementos de Newswire a los que se hace referencia en su artículo"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Traits", "Features" : "Traits",
"Article": "Article", "Article": "Article",
"Create an article": "Créer un article", "Create an article": "Créer un article",
"Settings": "Réglages" "Settings": "Réglages",
"Citations": "Citations",
"Choose newswire items referenced in your article": "Choisissez les éléments de fil d'actualité référencés dans votre article"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Gnéithe", "Features" : "Gnéithe",
"Article": "Airteagal", "Article": "Airteagal",
"Create an article": "Cruthaigh alt", "Create an article": "Cruthaigh alt",
"Settings": "Socruithe" "Settings": "Socruithe",
"Citations": "Citations",
"Choose newswire items referenced in your article": "Roghnaigh míreanna sreanga nuachta dá dtagraítear i dalt"
} }

View File

@ -325,5 +325,7 @@
"Features" : "विशेषताएं", "Features" : "विशेषताएं",
"Article": "लेख", "Article": "लेख",
"Create an article": "एक लेख बनाएँ", "Create an article": "एक लेख बनाएँ",
"Settings": "समायोजन" "Settings": "समायोजन",
"Citations": "उद्धरण",
"Choose newswire items referenced in your article": "अपने लेख में संदर्भित newswire आइटम चुनें"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Caratteristiche", "Features" : "Caratteristiche",
"Article": "Articolo", "Article": "Articolo",
"Create an article": "Crea un articolo", "Create an article": "Crea un articolo",
"Settings": "impostazioni" "Settings": "impostazioni",
"Citations": "Citazioni",
"Choose newswire items referenced in your article": "Scegli gli articoli del newswire a cui fa riferimento il tuo articolo"
} }

View File

@ -325,5 +325,7 @@
"Features" : "特徴", "Features" : "特徴",
"Article": "論文", "Article": "論文",
"Create an article": "記事を作成する", "Create an article": "記事を作成する",
"Settings": "設定" "Settings": "設定",
"Citations": "引用",
"Choose newswire items referenced in your article": "あなたの記事で参照されているニュースワイヤーアイテムを選択してください"
} }

View File

@ -321,5 +321,7 @@
"Features" : "Features", "Features" : "Features",
"Article": "Article", "Article": "Article",
"Create an article": "Create an article", "Create an article": "Create an article",
"Settings": "Settings" "Settings": "Settings",
"Citations": "Citations",
"Choose newswire items referenced in your article": "Choose newswire items referenced in your article"
} }

View File

@ -325,5 +325,7 @@
"Features" : "Recursos", "Features" : "Recursos",
"Article": "Artigo", "Article": "Artigo",
"Create an article": "Crie um artigo", "Create an article": "Crie um artigo",
"Settings": "Definições" "Settings": "Definições",
"Citations": "Citações",
"Choose newswire items referenced in your article": "Escolha os itens de notícias mencionados em seu artigo"
} }

View File

@ -325,5 +325,7 @@
"Features" : "особенности", "Features" : "особенности",
"Article": "Статья", "Article": "Статья",
"Create an article": "Создать статью", "Create an article": "Создать статью",
"Settings": "Настройки" "Settings": "Настройки",
"Citations": "Цитаты",
"Choose newswire items referenced in your article": "Выберите элементы ленты новостей, на которые есть ссылки в вашей статье"
} }

View File

@ -325,5 +325,7 @@
"Features" : "特征", "Features" : "特征",
"Article": "文章", "Article": "文章",
"Create an article": "建立文章", "Create an article": "建立文章",
"Settings": "设定值" "Settings": "设定值",
"Citations": "引文",
"Choose newswire items referenced in your article": "选择文章中引用的新闻专栏文章"
} }

View File

@ -2525,7 +2525,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
reportUrl: str, pageNumber: int, reportUrl: str, pageNumber: int,
nickname: str, domain: str, nickname: str, domain: str,
domainFull: str, domainFull: str,
defaultTimeline: str) -> str: defaultTimeline: str, newswire: {}) -> str:
"""New post screen """New post screen
""" """
iconsDir = getIconsDir(baseDir) iconsDir = getIconsDir(baseDir)
@ -2996,6 +2996,13 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
newPostForm += \ newPostForm += \
' <input type="submit" name="submitPost" value="' + \ ' <input type="submit" name="submitPost" value="' + \
translate['Submit'] + '">\n' translate['Submit'] + '">\n'
# for a new blog if newswire items exist then add a citations button
if newswire and path.endswith('/newblog'):
newPostForm += \
' <input type="submit" name="submitCitations" value="' + \
translate['Citations'] + '">\n'
newPostForm += ' </center></div>\n' newPostForm += ' </center></div>\n'
newPostForm += replyStr newPostForm += replyStr