From 2daaef0381aac2036ca994bfbc9b5a988a9893a7 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 27 Aug 2021 00:07:28 +0200 Subject: [PATCH] 4.8 --- conf/settings.py | 28 ++++++++++++++++++---------- manifest.json | 2 +- scripts/_common.sh | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/conf/settings.py b/conf/settings.py index b750bd9..8a56107 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -35,6 +35,15 @@ import os import platform 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. # @@ -135,6 +144,7 @@ LANGUAGES = ( ("sr", "Српски"), ("sr-latn", "Srpski"), ("sv", "Svenska"), + ("th", "ไทย"), ("tr", "Türkçe"), ("uk", "Українська"), ("zh-hans", "简体字"), @@ -365,6 +375,7 @@ MIDDLEWARE = [ "weblate.accounts.middleware.RequireLoginMiddleware", "weblate.api.middleware.ThrottlingMiddleware", "weblate.middleware.SecurityMiddleware", + "weblate.wladmin.middleware.ManageMiddleware", ] ROOT_URLCONF = "weblate.urls" @@ -529,6 +540,7 @@ MT_SERVICES = ( # "weblate.machinery.glosbe.GlosbeTranslation", # "weblate.machinery.google.GoogleTranslation", # "weblate.machinery.googlev3.GoogleV3Translation", + # "weblate.machinery.libretranslate.LibreTranslateTranslation", # "weblate.machinery.microsoft.MicrosoftCognitiveTranslation", # "weblate.machinery.microsoftterminology.MicrosoftTerminologyService", # "weblate.machinery.modernmt.ModernMTTranslation", @@ -551,6 +563,10 @@ MT_APERTIUM_APY = None # DeepL API key MT_DEEPL_KEY = None +# LibreTranslate +MT_LIBRETRANSLATE_API_URL = None +MT_LIBRETRANSLATE_KEY = None + # Microsoft Cognitive Services Translator API, register at # https://portal.azure.com/ MT_MICROSOFT_COGNITIVE_KEY = None @@ -599,15 +615,6 @@ MT_SAP_USERNAME = None MT_SAP_PASSWORD = None 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 # documentation for more details: # 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.JavaScriptFormatCheck", # "weblate.checks.format.LuaFormatCheck", +# "weblate.checks.format.ObjectPascalFormatCheck", # "weblate.checks.format.SchemeFormatCheck", # "weblate.checks.format.CSharpFormatCheck", # "weblate.checks.format.JavaFormatCheck", @@ -931,7 +939,7 @@ MATOMO_SITE_ID = None MATOMO_URL = None GOOGLE_ANALYTICS_ID = None SENTRY_DSN = None -SENTRY_ENVIRONMENT = None +SENTRY_ENVIRONMENT = SITE_DOMAIN AKISMET_API_KEY = None try: diff --git a/manifest.json b/manifest.json index 620e651..fb00494 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Translation platform using Git and Python", "fr": "Plateforme de traduction utilisant Git et Python" }, - "version": "4.7~ynh2", + "version": "4.8~ynh1", "url": "https://weblate.org", "upstream": { "license": "AGPL-3.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index 16256ea..bf0aa38 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -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" # Weblate's version for PIP and settings file -weblate_version="4.7" +weblate_version="4.8" debian_maj_version=$(sed 's/\..*//' /etc/debian_version)