1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

Merge pull request #52 from YunoHost-Apps/testing

Testing
This commit is contained in:
Kayou 2022-03-11 17:39:08 +01:00 committed by GitHub
commit 46ffb4b399
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 26 deletions

View file

@ -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. 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.9~ynh1 **Shipped version:** 4.11.2~ynh1
**Demo:** https://hosted.weblate.org/ **Demo:** https://hosted.weblate.org/

View file

@ -13,7 +13,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. 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.9~ynh1 **Version incluse :** 4.11.2~ynh1
**Démo :** https://hosted.weblate.org/ **Démo :** https://hosted.weblate.org/

View file

@ -15,8 +15,8 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
#4.6.1 # 4.9~ynh1
upgrade=1 from_commit=3f8363cdc588e609a775cb8b78b9d080f96405d9 upgrade=1 from_commit=7fec5a47a80e00458a31f1270c4ace822961e7bf
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
port_already_use=0 port_already_use=0

View file

@ -12,7 +12,7 @@
################################################################################ ################################################################################
################################################################################ ################################################################################
# #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # Copyright © 20122022 Michal Čihař <michal@cihar.com>
# #
# This file is part of Weblate <https://weblate.org/> # This file is part of Weblate <https://weblate.org/>
# #
@ -87,6 +87,8 @@ DATABASES = {
}, },
# Persistent connections # Persistent connections
"CONN_MAX_AGE": 0, "CONN_MAX_AGE": 0,
# Disable server-side cursors, might be needed with pgbouncer
"DISABLE_SERVER_SIDE_CURSORS": False,
} }
} }
@ -206,12 +208,6 @@ STATICFILES_FINDERS = (
# You can generate it using weblate/examples/generate-secret-key # You can generate it using weblate/examples/generate-secret-key
SECRET_KEY = "__KEY__" SECRET_KEY = "__KEY__"
_TEMPLATE_LOADERS = [
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
]
if not DEBUG:
_TEMPLATE_LOADERS = [("django.template.loaders.cached.Loader", _TEMPLATE_LOADERS)]
TEMPLATES = [ TEMPLATES = [
{ {
"BACKEND": "django.template.backends.django.DjangoTemplates", "BACKEND": "django.template.backends.django.DjangoTemplates",
@ -225,8 +221,8 @@ TEMPLATES = [
"django.contrib.messages.context_processors.messages", "django.contrib.messages.context_processors.messages",
"weblate.trans.context_processors.weblate_context", "weblate.trans.context_processors.weblate_context",
], ],
"loaders": _TEMPLATE_LOADERS,
}, },
"APP_DIRS": True,
} }
] ]
@ -262,6 +258,14 @@ SOCIAL_AUTH_GITHUB_KEY = ""
SOCIAL_AUTH_GITHUB_SECRET = "" SOCIAL_AUTH_GITHUB_SECRET = ""
SOCIAL_AUTH_GITHUB_SCOPE = ["user:email"] SOCIAL_AUTH_GITHUB_SCOPE = ["user:email"]
SOCIAL_AUTH_GITHUB_ORG_KEY = ""
SOCIAL_AUTH_GITHUB_ORG_SECRET = ""
SOCIAL_AUTH_GITHUB_ORG_NAME = ""
SOCIAL_AUTH_GITHUB_TEAM_KEY = ""
SOCIAL_AUTH_GITHUB_TEAM_SECRET = ""
SOCIAL_AUTH_GITHUB_TEAM_ID = ""
SOCIAL_AUTH_BITBUCKET_KEY = "" SOCIAL_AUTH_BITBUCKET_KEY = ""
SOCIAL_AUTH_BITBUCKET_SECRET = "" SOCIAL_AUTH_BITBUCKET_SECRET = ""
SOCIAL_AUTH_BITBUCKET_VERIFIED_EMAILS_ONLY = True SOCIAL_AUTH_BITBUCKET_VERIFIED_EMAILS_ONLY = True
@ -794,6 +798,7 @@ CRISPY_TEMPLATE_PACK = "bootstrap3"
# "weblate.addons.flags.BulkEditAddon", # "weblate.addons.flags.BulkEditAddon",
# "weblate.addons.generate.GenerateFileAddon", # "weblate.addons.generate.GenerateFileAddon",
# "weblate.addons.generate.PseudolocaleAddon", # "weblate.addons.generate.PseudolocaleAddon",
# "weblate.addons.generate.PrefillAddon",
# "weblate.addons.json.JSONCustomizeAddon", # "weblate.addons.json.JSONCustomizeAddon",
# "weblate.addons.properties.PropertiesSortAddon", # "weblate.addons.properties.PropertiesSortAddon",
# "weblate.addons.git.GitSquashAddon", # "weblate.addons.git.GitSquashAddon",

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.9~ynh1", "version": "4.11.2~ynh1",
"url": "https://weblate.org", "url": "https://weblate.org",
"upstream": { "upstream": {
"license": "AGPL-3.0", "license": "AGPL-3.0",

View file

@ -5,14 +5,20 @@
#================================================= #=================================================
# dependencies used by the app # dependencies used by the app
pkg_dependencies="libxml2-dev libxslt-dev libfreetype6-dev libjpeg-dev libz-dev libyaml-dev \ weblate_dependencies="libxml2-dev libxslt-dev libfreetype6-dev libjpeg-dev libz-dev libyaml-dev \
libcairo-dev gir1.2-pango-1.0 libgirepository1.0-dev libacl1-dev libssl-dev \ libffi-dev libcairo-dev gir1.2-pango-1.0 libgirepository1.0-dev \
build-essential python3-gdbm python3-enchant python3-dev python3-pip python3-virtualenv virtualenv git \ libacl1-dev libssl-dev libpq-dev libjpeg62-turbo-dev build-essential \
uwsgi uwsgi-plugin-python3 redis-server postgresql postgresql-contrib \ python3-gdbm python3-dev python3-pip python3-virtualenv virtualenv git \
libpq-dev libglib2.0-dev mailutils python-celery-common hub" uwsgi uwsgi-plugin-python3 redis-server postgresql postgresql-contrib hub"
# because weblate install borgbackup
borgbackup_dependencies="libacl1-dev libacl1 libssl-dev liblz4-dev libzstd-dev libxxhash-dev \
build-essential pkg-config python3-pkgconfig"
pkg_dependencies="$weblate_dependencies $borgbackup_dependencies"
# Weblate's version for PIP and settings file # Weblate's version for PIP and settings file
weblate_version="4.9" weblate_version="4.11.2"
debian_maj_version=$(sed 's/\..*//' /etc/debian_version) debian_maj_version=$(sed 's/\..*//' /etc/debian_version)

View file

@ -125,9 +125,10 @@ chown -R "$app": "$final_path"
set -o nounset set -o nounset
cd "${final_path}" cd "${final_path}"
sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig
# Tmp fix
sudo --user=$app $final_path/venv/bin/pip install --upgrade cffi==1.14 # Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules
sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi
# Still needed with latest version of weblate? # Still needed with latest version of weblate?
sudo --user=$app $final_path/venv/bin/pip install Weblate=="$weblate_version" sudo --user=$app $final_path/venv/bin/pip install Weblate=="$weblate_version"
sudo --user=$app $final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply sudo --user=$app $final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply

View file

@ -159,8 +159,9 @@ upgrade() {
ynh_systemd_action --service_name="$app-celery" --action="stop" ynh_systemd_action --service_name="$app-celery" --action="stop"
ynh_secure_remove --file="${final_path}/venv"
virtualenv --python=python3 "${final_path}/venv" virtualenv --python=python3 "${final_path}/venv"
chown -R "$app": "$final_path" chown -R $app: "$final_path"
#run source in a 'sub shell' #run source in a 'sub shell'
( (
@ -169,9 +170,10 @@ upgrade() {
set -o nounset set -o nounset
cd "${final_path}" cd "${final_path}"
sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig
# Tmp fix
sudo --user=$app $final_path/venv/bin/pip install --upgrade cffi==1.14 # Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules
sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi
# Still needed with latest version of weblate? # Still needed with latest version of weblate?
sudo --user=$app $final_path/venv/bin/pip install --upgrade Weblate=="$new_version" sudo --user=$app $final_path/venv/bin/pip install --upgrade Weblate=="$new_version"
sudo --user=$app $final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply sudo --user=$app $final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply