mirror of https://gitlab.com/bashrc2/epicyon
Set content license from admin profile
parent
8d54d4c221
commit
4f111a189a
18
daemon.py
18
daemon.py
|
@ -4903,6 +4903,24 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
setConfigParam(baseDir,
|
setConfigParam(baseDir,
|
||||||
'libretranslateApiKey', '')
|
'libretranslateApiKey', '')
|
||||||
|
|
||||||
|
# change instance short description
|
||||||
|
if fields.get('contentLicenseUrl'):
|
||||||
|
if fields['contentLicenseUrl'] != \
|
||||||
|
self.server.contentLicenseUrl:
|
||||||
|
licenseStr = fields['contentLicenseUrl']
|
||||||
|
setConfigParam(baseDir,
|
||||||
|
'contentLicenseUrl',
|
||||||
|
licenseStr)
|
||||||
|
self.server.contentLicenseUrl = \
|
||||||
|
licenseStr
|
||||||
|
else:
|
||||||
|
licenseStr = \
|
||||||
|
'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
setConfigParam(baseDir,
|
||||||
|
'contentLicenseUrl',
|
||||||
|
licenseStr)
|
||||||
|
self.server.contentLicenseUrl = licenseStr
|
||||||
|
|
||||||
# change instance short description
|
# change instance short description
|
||||||
currInstanceDescriptionShort = \
|
currInstanceDescriptionShort = \
|
||||||
getConfigParam(baseDir,
|
getConfigParam(baseDir,
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "مراقب النظام",
|
"System Monitor": "مراقب النظام",
|
||||||
"Add content warnings for the following sites": "أضف تحذيرات المحتوى للمواقع التالية",
|
"Add content warnings for the following sites": "أضف تحذيرات المحتوى للمواقع التالية",
|
||||||
"Known Web Crawlers": "برامج زحف الويب المعروفة",
|
"Known Web Crawlers": "برامج زحف الويب المعروفة",
|
||||||
"Add to the calendar": "أضف إلى التقويم"
|
"Add to the calendar": "أضف إلى التقويم",
|
||||||
|
"Content License": "ترخيص المحتوى"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Monitor del sistema",
|
"System Monitor": "Monitor del sistema",
|
||||||
"Add content warnings for the following sites": "Afegiu advertiments de contingut per als llocs següents",
|
"Add content warnings for the following sites": "Afegiu advertiments de contingut per als llocs següents",
|
||||||
"Known Web Crawlers": "Exploradors web coneguts",
|
"Known Web Crawlers": "Exploradors web coneguts",
|
||||||
"Add to the calendar": "Afegeix al calendari"
|
"Add to the calendar": "Afegeix al calendari",
|
||||||
|
"Content License": "Llicència de contingut"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Monitor System",
|
"System Monitor": "Monitor System",
|
||||||
"Add content warnings for the following sites": "Ychwanegwch rybuddion cynnwys ar gyfer y gwefannau canlynol",
|
"Add content warnings for the following sites": "Ychwanegwch rybuddion cynnwys ar gyfer y gwefannau canlynol",
|
||||||
"Known Web Crawlers": "Crawlers Gwe Hysbys",
|
"Known Web Crawlers": "Crawlers Gwe Hysbys",
|
||||||
"Add to the calendar": "Ychwanegwch at y calendr"
|
"Add to the calendar": "Ychwanegwch at y calendr",
|
||||||
|
"Content License": "Trwydded Cynnwys"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Systemmonitor",
|
"System Monitor": "Systemmonitor",
|
||||||
"Add content warnings for the following sites": "Inhaltswarnungen für die folgenden Websites hinzufügen",
|
"Add content warnings for the following sites": "Inhaltswarnungen für die folgenden Websites hinzufügen",
|
||||||
"Known Web Crawlers": "Bekannte Web-Crawler",
|
"Known Web Crawlers": "Bekannte Web-Crawler",
|
||||||
"Add to the calendar": "Zum Kalender hinzufügen"
|
"Add to the calendar": "Zum Kalender hinzufügen",
|
||||||
|
"Content License": "Inhaltslizenz"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "System Monitor",
|
"System Monitor": "System Monitor",
|
||||||
"Add content warnings for the following sites": "Add content warnings for the following sites",
|
"Add content warnings for the following sites": "Add content warnings for the following sites",
|
||||||
"Known Web Crawlers": "Known Web Crawlers",
|
"Known Web Crawlers": "Known Web Crawlers",
|
||||||
"Add to the calendar": "Add to the calendar"
|
"Add to the calendar": "Add to the calendar",
|
||||||
|
"Content License": "Content License"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Monitor del sistema",
|
"System Monitor": "Monitor del sistema",
|
||||||
"Add content warnings for the following sites": "Agregue advertencias de contenido para los siguientes sitios",
|
"Add content warnings for the following sites": "Agregue advertencias de contenido para los siguientes sitios",
|
||||||
"Known Web Crawlers": "Rastreadores web conocidos",
|
"Known Web Crawlers": "Rastreadores web conocidos",
|
||||||
"Add to the calendar": "Agregar al calendario"
|
"Add to the calendar": "Agregar al calendario",
|
||||||
|
"Content License": "Licencia de contenido"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Moniteur système",
|
"System Monitor": "Moniteur système",
|
||||||
"Add content warnings for the following sites": "Ajouter des avertissements de contenu pour les sites suivants",
|
"Add content warnings for the following sites": "Ajouter des avertissements de contenu pour les sites suivants",
|
||||||
"Known Web Crawlers": "Crawlers Web connus",
|
"Known Web Crawlers": "Crawlers Web connus",
|
||||||
"Add to the calendar": "Ajouter au calendrier"
|
"Add to the calendar": "Ajouter au calendrier",
|
||||||
|
"Content License": "Licence de contenu"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Monatóir Córais",
|
"System Monitor": "Monatóir Córais",
|
||||||
"Add content warnings for the following sites": "Cuir rabhaidh ábhair leis na suíomhanna seo a leanas",
|
"Add content warnings for the following sites": "Cuir rabhaidh ábhair leis na suíomhanna seo a leanas",
|
||||||
"Known Web Crawlers": "Crawlers Gréasáin Aitheanta",
|
"Known Web Crawlers": "Crawlers Gréasáin Aitheanta",
|
||||||
"Add to the calendar": "Cuir leis an bhféilire"
|
"Add to the calendar": "Cuir leis an bhféilire",
|
||||||
|
"Content License": "Ceadúnas Ábhar"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "सिस्टम मॉनिटर",
|
"System Monitor": "सिस्टम मॉनिटर",
|
||||||
"Add content warnings for the following sites": "निम्नलिखित साइटों के लिए सामग्री चेतावनियाँ जोड़ें",
|
"Add content warnings for the following sites": "निम्नलिखित साइटों के लिए सामग्री चेतावनियाँ जोड़ें",
|
||||||
"Known Web Crawlers": "ज्ञात वेब क्रॉलर",
|
"Known Web Crawlers": "ज्ञात वेब क्रॉलर",
|
||||||
"Add to the calendar": "कैलेंडर में जोड़ें"
|
"Add to the calendar": "कैलेंडर में जोड़ें",
|
||||||
|
"Content License": "सामग्री लाइसेंस"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Monitor di sistema",
|
"System Monitor": "Monitor di sistema",
|
||||||
"Add content warnings for the following sites": "Aggiungi avvisi sui contenuti per i seguenti siti",
|
"Add content warnings for the following sites": "Aggiungi avvisi sui contenuti per i seguenti siti",
|
||||||
"Known Web Crawlers": "Crawler Web conosciuti",
|
"Known Web Crawlers": "Crawler Web conosciuti",
|
||||||
"Add to the calendar": "Aggiungi al calendario"
|
"Add to the calendar": "Aggiungi al calendario",
|
||||||
|
"Content License": "Licenza sui contenuti"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "システムモニター",
|
"System Monitor": "システムモニター",
|
||||||
"Add content warnings for the following sites": "次のサイトのコンテンツ警告を追加します",
|
"Add content warnings for the following sites": "次のサイトのコンテンツ警告を追加します",
|
||||||
"Known Web Crawlers": "既知のWebクローラー",
|
"Known Web Crawlers": "既知のWebクローラー",
|
||||||
"Add to the calendar": "カレンダーに追加"
|
"Add to the calendar": "カレンダーに追加",
|
||||||
|
"Content License": "コンテンツライセンス"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "System Monitor",
|
"System Monitor": "System Monitor",
|
||||||
"Add content warnings for the following sites": "Ji bo malperên jêrîn hişyariyên naverokê zêde bikin",
|
"Add content warnings for the following sites": "Ji bo malperên jêrîn hişyariyên naverokê zêde bikin",
|
||||||
"Known Web Crawlers": "Crawlerên Webê yên naskirî",
|
"Known Web Crawlers": "Crawlerên Webê yên naskirî",
|
||||||
"Add to the calendar": "Di salnameyê de zêde bike"
|
"Add to the calendar": "Di salnameyê de zêde bike",
|
||||||
|
"Content License": "Naverok License de"
|
||||||
}
|
}
|
||||||
|
|
|
@ -487,5 +487,6 @@
|
||||||
"System Monitor": "System Monitor",
|
"System Monitor": "System Monitor",
|
||||||
"Add content warnings for the following sites": "Add content warnings for the following sites",
|
"Add content warnings for the following sites": "Add content warnings for the following sites",
|
||||||
"Known Web Crawlers": "Known Web Crawlers",
|
"Known Web Crawlers": "Known Web Crawlers",
|
||||||
"Add to the calendar": "Add to the calendar"
|
"Add to the calendar": "Add to the calendar",
|
||||||
|
"Content License": "Content License"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Monitor de Sistema",
|
"System Monitor": "Monitor de Sistema",
|
||||||
"Add content warnings for the following sites": "Adicione avisos de conteúdo para os seguintes sites",
|
"Add content warnings for the following sites": "Adicione avisos de conteúdo para os seguintes sites",
|
||||||
"Known Web Crawlers": "Rastreadores da Web conhecidos",
|
"Known Web Crawlers": "Rastreadores da Web conhecidos",
|
||||||
"Add to the calendar": "Adicionar ao calendário"
|
"Add to the calendar": "Adicionar ao calendário",
|
||||||
|
"Content License": "Licença de Conteúdo"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Системный монитор",
|
"System Monitor": "Системный монитор",
|
||||||
"Add content warnings for the following sites": "Добавить предупреждения о содержании для следующих сайтов",
|
"Add content warnings for the following sites": "Добавить предупреждения о содержании для следующих сайтов",
|
||||||
"Known Web Crawlers": "Известные веб-сканеры",
|
"Known Web Crawlers": "Известные веб-сканеры",
|
||||||
"Add to the calendar": "Добавить в календарь"
|
"Add to the calendar": "Добавить в календарь",
|
||||||
|
"Content License": "Лицензия на содержание"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "Ufuatiliaji wa Mfumo",
|
"System Monitor": "Ufuatiliaji wa Mfumo",
|
||||||
"Add content warnings for the following sites": "Ongeza maonyo ya yaliyomo kwa wavuti zifuatazo",
|
"Add content warnings for the following sites": "Ongeza maonyo ya yaliyomo kwa wavuti zifuatazo",
|
||||||
"Known Web Crawlers": "Watambaji Wavuti Wanaojulikana",
|
"Known Web Crawlers": "Watambaji Wavuti Wanaojulikana",
|
||||||
"Add to the calendar": "Ongeza kwenye kalenda"
|
"Add to the calendar": "Ongeza kwenye kalenda",
|
||||||
|
"Content License": "Leseni ya Maudhui"
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,5 +491,6 @@
|
||||||
"System Monitor": "系统监视器",
|
"System Monitor": "系统监视器",
|
||||||
"Add content warnings for the following sites": "为以下网站添加内容警告",
|
"Add content warnings for the following sites": "为以下网站添加内容警告",
|
||||||
"Known Web Crawlers": "已知的网络爬虫",
|
"Known Web Crawlers": "已知的网络爬虫",
|
||||||
"Add to the calendar": "添加到日历"
|
"Add to the calendar": "添加到日历",
|
||||||
|
"Content License": "内容许可"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1286,6 +1286,10 @@ def _htmlEditProfileInstance(baseDir: str, translate: {},
|
||||||
getConfigParam(baseDir, 'instanceDescriptionShort')
|
getConfigParam(baseDir, 'instanceDescriptionShort')
|
||||||
instanceTitle = \
|
instanceTitle = \
|
||||||
getConfigParam(baseDir, 'instanceTitle')
|
getConfigParam(baseDir, 'instanceTitle')
|
||||||
|
contentLicenseUrl = \
|
||||||
|
getConfigParam(baseDir, 'contentLicenseUrl')
|
||||||
|
if not contentLicenseUrl:
|
||||||
|
contentLicenseUrl = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
|
||||||
instanceStr = beginEditSection(translate['Instance Settings'])
|
instanceStr = beginEditSection(translate['Instance Settings'])
|
||||||
|
|
||||||
|
@ -1301,6 +1305,10 @@ def _htmlEditProfileInstance(baseDir: str, translate: {},
|
||||||
editTextArea(translate['Instance Description'],
|
editTextArea(translate['Instance Description'],
|
||||||
'instanceDescription', instanceDescription, 200,
|
'instanceDescription', instanceDescription, 200,
|
||||||
'', True)
|
'', True)
|
||||||
|
instanceStr += \
|
||||||
|
editTextField(translate['Content License'],
|
||||||
|
'contentLicenseUrl', contentLicenseUrl)
|
||||||
|
instanceStr += '<br>\n'
|
||||||
instanceStr += \
|
instanceStr += \
|
||||||
editTextField(translate['Custom post submit button text'],
|
editTextField(translate['Custom post submit button text'],
|
||||||
'customSubmitText', customSubmitText)
|
'customSubmitText', customSubmitText)
|
||||||
|
|
Loading…
Reference in New Issue