From 6da2facebe38b480078fab614641b91f7deb4e97 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Dec 2022 06:12:50 +0000 Subject: [PATCH 1/4] Upgrade to v4.15 --- manifest.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 18bdda3..4fd4864 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.14.2~ynh1", + "version": "4.15~ynh1", "url": "https://weblate.org", "upstream": { "license": "AGPL-3.0", @@ -63,10 +63,13 @@ "name": "used_forge", "type": "string", "ask": { - "en":"Choose the forge you use", - "fr":"Choisissez la forge que vous utilisez" + "en": "Choose the forge you use", + "fr": "Choisissez la forge que vous utilisez" }, - "choices": ["GitHub", "GitLab"], + "choices": [ + "GitHub", + "GitLab" + ], "default": "GitHub" }, { From 794ceef05f8e7acf9a86fdc00efa9503c73d7812 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Dec 2022 06:12:56 +0000 Subject: [PATCH 2/4] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3eaec0e..b7dd50c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Weblate is a libre web-based translation tool with tight version control integration. It provides two user interfaces, propagation of translations across components, quality checks and automatic linking to source files. -**Shipped version:** 4.14.2~ynh1 +**Shipped version:** 4.15~ynh1 **Demo:** https://hosted.weblate.org/ diff --git a/README_fr.md b/README_fr.md index cf74e34..f165d5f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Weblate est un outil de traduction libre avec une intégration étroite du contrôle de version. Il fournit deux interfaces utilisateur, la propagation des traductions entre les composants, les contrôles de qualité et la liaison automatique aux fichiers source. -**Version incluse :** 4.14.2~ynh1 +**Version incluse :** 4.15~ynh1 **Démo :** https://hosted.weblate.org/ From b4917608861aa56ebefb93790b9dce8b73c796bf Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 9 Jan 2023 11:28:38 +0100 Subject: [PATCH 3/4] Update settings --- conf/settings.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/conf/settings.py b/conf/settings.py index 232ba72..4c5f7b4 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -92,10 +92,9 @@ DATABASES = { } } -BASE_DIR = "__FINALPATH__" - -# Data directory -DATA_DIR = os.path.join(BASE_DIR, "data") +# Data directory, you can use following for the development purposes: +# os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data") +DATA_DIR = os.path.join("__FINALPATH__", "data") # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name @@ -205,7 +204,7 @@ STATICFILES_FINDERS = ( ) # Make this unique, and don't share it with anybody. -# You can generate it using weblate/examples/generate-secret-key +# You can generate it using weblate-generate-secret-key SECRET_KEY = "__KEY__" TEMPLATES = [ @@ -229,13 +228,21 @@ TEMPLATES = [ # GitHub username and token for sending pull requests. # Please see the documentation for more details. -GITHUB_USERNAME = __GITHUB_USERNAME__ -GITHUB_TOKEN = __GITHUB_TOKEN__ +GITHUB_CREDENTIALS = { + "api.github.com": { + "username": "__GITHUB_USERNAME__", + "token": "__GITHUB_TOKEN__", + } +} # GitLab username and token for sending merge requests. # Please see the documentation for more details. -GITLAB_USERNAME = __GITLAB_USERNAME__ -GITLAB_TOKEN = __GITLAB_TOKEN__ +GITLAB_CREDENTIALS = { + "gitlab.com": { + "username": "__GITLAB_USERNAME__", + "token": "__GITLAB_TOKEN__", + } +} # Authentication configuration AUTHENTICATION_BACKENDS = ( @@ -638,6 +645,7 @@ SESSION_COOKIE_SECURE = ENABLE_HTTPS SESSION_COOKIE_HTTPONLY = True # SSL redirect SECURE_SSL_REDIRECT = ENABLE_HTTPS +SECURE_SSL_HOST = SITE_DOMAIN # Sent referrrer only for same origin links SECURE_REFERRER_POLICY = "same-origin" # SSL redirect URL exemption list @@ -648,6 +656,8 @@ SESSION_COOKIE_AGE_AUTHENTICATED = 1209600 SESSION_COOKIE_SAMESITE = "Lax" # Increase allowed upload size DATA_UPLOAD_MAX_MEMORY_SIZE = 50000000 +# Allow more fields for case with a lot of subscriptions in profile +DATA_UPLOAD_MAX_NUMBER_FIELDS = 2000 # Apply session coookie settings to language cookie as ewll LANGUAGE_COOKIE_SECURE = SESSION_COOKIE_SECURE @@ -800,6 +810,7 @@ CRISPY_TEMPLATE_PACK = "bootstrap3" # "weblate.addons.generate.PseudolocaleAddon", # "weblate.addons.generate.PrefillAddon", # "weblate.addons.json.JSONCustomizeAddon", +# "weblate.addons.xml.XMLCustomizeAddon", # "weblate.addons.properties.PropertiesSortAddon", # "weblate.addons.git.GitSquashAddon", # "weblate.addons.removal.RemoveComments", @@ -835,6 +846,7 @@ CACHES = { "CONNECTION_POOL_KWARGS": {}, }, "KEY_PREFIX": "weblate", + "TIMEOUT": 3600, }, "avatar": { "BACKEND": "django.core.cache.backends.filebased.FileBasedCache", From f7be16401b8802dd7ed4c3f247636498722b3e08 Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 12 Jan 2023 10:23:56 +0100 Subject: [PATCH 4/4] fix forge settings --- scripts/_common.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index bcf0711..85a0b0d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -33,15 +33,15 @@ fi set_forge_variables() { if [ $used_forge = "GitHub" ] ; then - github_username="\"$forge_username\"" - github_token="\"$forge_token\"" + github_username="$forge_username" + github_token="$forge_token" gitlab_username="None" gitlab_token="None" else github_username="None" github_token="None" - gitlab_username="\"$forge_username\"" - gitlab_token="\"$forge_token\"" + gitlab_username="$forge_username" + gitlab_token="$forge_token" fi }