1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00
This commit is contained in:
Kay0u 2021-08-27 00:07:28 +02:00
parent 1250619e9b
commit 2daaef0381
No known key found for this signature in database
GPG key ID: AE1DCADB6415A156
3 changed files with 20 additions and 12 deletions

View file

@ -35,6 +35,15 @@ import os
import platform import platform
from logging.handlers import SysLogHandler from logging.handlers import SysLogHandler
# Title of site to use
SITE_TITLE = "Weblate"
# Site domain
SITE_DOMAIN = "__DOMAIN__"
# Whether site uses https
ENABLE_HTTPS = True
# #
# Django settings for Weblate project. # Django settings for Weblate project.
# #
@ -135,6 +144,7 @@ LANGUAGES = (
("sr", "Српски"), ("sr", "Српски"),
("sr-latn", "Srpski"), ("sr-latn", "Srpski"),
("sv", "Svenska"), ("sv", "Svenska"),
("th", "ไทย"),
("tr", "Türkçe"), ("tr", "Türkçe"),
("uk", "Українська"), ("uk", "Українська"),
("zh-hans", "简体字"), ("zh-hans", "简体字"),
@ -365,6 +375,7 @@ MIDDLEWARE = [
"weblate.accounts.middleware.RequireLoginMiddleware", "weblate.accounts.middleware.RequireLoginMiddleware",
"weblate.api.middleware.ThrottlingMiddleware", "weblate.api.middleware.ThrottlingMiddleware",
"weblate.middleware.SecurityMiddleware", "weblate.middleware.SecurityMiddleware",
"weblate.wladmin.middleware.ManageMiddleware",
] ]
ROOT_URLCONF = "weblate.urls" ROOT_URLCONF = "weblate.urls"
@ -529,6 +540,7 @@ MT_SERVICES = (
# "weblate.machinery.glosbe.GlosbeTranslation", # "weblate.machinery.glosbe.GlosbeTranslation",
# "weblate.machinery.google.GoogleTranslation", # "weblate.machinery.google.GoogleTranslation",
# "weblate.machinery.googlev3.GoogleV3Translation", # "weblate.machinery.googlev3.GoogleV3Translation",
# "weblate.machinery.libretranslate.LibreTranslateTranslation",
# "weblate.machinery.microsoft.MicrosoftCognitiveTranslation", # "weblate.machinery.microsoft.MicrosoftCognitiveTranslation",
# "weblate.machinery.microsoftterminology.MicrosoftTerminologyService", # "weblate.machinery.microsoftterminology.MicrosoftTerminologyService",
# "weblate.machinery.modernmt.ModernMTTranslation", # "weblate.machinery.modernmt.ModernMTTranslation",
@ -551,6 +563,10 @@ MT_APERTIUM_APY = None
# DeepL API key # DeepL API key
MT_DEEPL_KEY = None MT_DEEPL_KEY = None
# LibreTranslate
MT_LIBRETRANSLATE_API_URL = None
MT_LIBRETRANSLATE_KEY = None
# Microsoft Cognitive Services Translator API, register at # Microsoft Cognitive Services Translator API, register at
# https://portal.azure.com/ # https://portal.azure.com/
MT_MICROSOFT_COGNITIVE_KEY = None MT_MICROSOFT_COGNITIVE_KEY = None
@ -599,15 +615,6 @@ MT_SAP_USERNAME = None
MT_SAP_PASSWORD = None MT_SAP_PASSWORD = None
MT_SAP_USE_MT = True MT_SAP_USE_MT = True
# Title of site to use
SITE_TITLE = "Weblate"
# Site domain
SITE_DOMAIN = "__DOMAIN__"
# Whether site uses https
ENABLE_HTTPS = True
# Use HTTPS when creating redirect URLs for social authentication, see # Use HTTPS when creating redirect URLs for social authentication, see
# documentation for more details: # documentation for more details:
# https://python-social-auth-docs.readthedocs.io/en/latest/configuration/settings.html#processing-redirects-and-urlopen # https://python-social-auth-docs.readthedocs.io/en/latest/configuration/settings.html#processing-redirects-and-urlopen
@ -716,6 +723,7 @@ CRISPY_TEMPLATE_PACK = "bootstrap3"
# "weblate.checks.format.PerlFormatCheck", # "weblate.checks.format.PerlFormatCheck",
# "weblate.checks.format.JavaScriptFormatCheck", # "weblate.checks.format.JavaScriptFormatCheck",
# "weblate.checks.format.LuaFormatCheck", # "weblate.checks.format.LuaFormatCheck",
# "weblate.checks.format.ObjectPascalFormatCheck",
# "weblate.checks.format.SchemeFormatCheck", # "weblate.checks.format.SchemeFormatCheck",
# "weblate.checks.format.CSharpFormatCheck", # "weblate.checks.format.CSharpFormatCheck",
# "weblate.checks.format.JavaFormatCheck", # "weblate.checks.format.JavaFormatCheck",
@ -931,7 +939,7 @@ MATOMO_SITE_ID = None
MATOMO_URL = None MATOMO_URL = None
GOOGLE_ANALYTICS_ID = None GOOGLE_ANALYTICS_ID = None
SENTRY_DSN = None SENTRY_DSN = None
SENTRY_ENVIRONMENT = None SENTRY_ENVIRONMENT = SITE_DOMAIN
AKISMET_API_KEY = None AKISMET_API_KEY = None
try: try:

View file

@ -6,7 +6,7 @@
"en": "Translation platform using Git and Python", "en": "Translation platform using Git and Python",
"fr": "Plateforme de traduction utilisant Git et Python" "fr": "Plateforme de traduction utilisant Git et Python"
}, },
"version": "4.7~ynh2", "version": "4.8~ynh1",
"url": "https://weblate.org", "url": "https://weblate.org",
"upstream": { "upstream": {
"license": "AGPL-3.0", "license": "AGPL-3.0",

View file

@ -12,7 +12,7 @@ pkg_dependencies="libxml2-dev libxslt-dev libfreetype6-dev libjpeg-dev libz-dev
libpq-dev libglib2.0-dev mailutils python-celery-common hub" libpq-dev libglib2.0-dev mailutils python-celery-common hub"
# Weblate's version for PIP and settings file # Weblate's version for PIP and settings file
weblate_version="4.7" weblate_version="4.8"
debian_maj_version=$(sed 's/\..*//' /etc/debian_version) debian_maj_version=$(sed 's/\..*//' /etc/debian_version)