Configuration¶
Tous les paramètres sont stockés dans settings.py (comme habituellement avec Django).
Note
Après avoir changé l’un de ces paramètres, vous devez redémarrer Weblate — à la fois le processus WSGI et Celery.
S’il est exécuté en tant que mod_wsgi, vous devez redémarrer Apache pour recharger la configuration.
Voir aussi
Please also check Django’s documentation for parameters configuring Django itself.
ADMINS_CONTACT¶
Configure la destination où le formulaire de contact envoie les courriels. Si non initialisé, les adresses courriel de ADMINS sont utilisées.
Configurer ceci en tant que liste d’adresses courriel :
ADMINS_CONTACT = ["admin@example.com", "support@example.com"]
Voir aussi
ALLOWED_ASSET_DOMAINS¶
Ajouté dans la version 5.14.
Configures which domains are allowed for fetching assets in Weblate.
This enhances security by preventing loading assets from untrusted sources. Assets are downloaded once by the Weblate server and stored locally, rather than being served directly from external domains to users.
It expects a list of host/domain names. You can use fully qualified names
(e.g www.example.com) or prepend with a period as a wildcard to match
all subdomains (e.g .example.com will match cdn.example.com or static.example.com).
La valeur par défaut vaut [*], ce qui autorise tous les domaines.
Example
ALLOWED_ASSET_DOMAINS = [
# Allows only cdn.anotherdomain.org
"cdn.anotherdomain.org",
# Allows example.com and all its subdomains
".example.com",
]
This is currently used in the following places:
Screenshot uploads, see Visual context for strings
Voir aussi
ALLOWED_ASSET_SIZE¶
Ajouté dans la version 5.14.
Configures size limit for fetching assets in Weblate. Defaults to 4 MB.
Voir aussi
ALTCHA_MAX_NUMBER¶
Ajouté dans la version 5.9.
Configure un nombre maximal pour le mécanisme de preuve de travail ALTCHA.
Voir aussi
ANONYMOUS_USER_NAME¶
Le nom des utilisateurs qui ne sont pas connectés.
Voir aussi
AUDITLOG_EXPIRY¶
The maximum number of days Weblate will keep audit logs containing information about the account activity.
La valeur par défaut est de 180 jours.
AUTH_LOCK_ATTEMPTS¶
Le nombre maximal de tentatives d’authentification échouées avant que la limitation de débit ne soit appliquée.
Ce paramètre est actuellement appliqué dans les emplacements suivants :
Lors de la connexion. Supprime le mot de passe du compte, empêchant l’utilisateur de se connecter sans demander un nouveau mot de passe.
Password reset. Prevents new e-mails from being sent, avoiding spamming users with too many password-reset attempts.
La valeur par défaut est 10.
Voir aussi
AUTO_UPDATE¶
Met quotidiennement à jour tous les dépôts.
Indication
Utile si vous n’utilisez pas les Déclencheurs de notification pour mettre automatiquement à jour les dépôts de Weblate.
Note
L’option on/off existe en plus de l’utilisation d’une chaîne de caractères pour la rétrocompatibilité.
The options are:
"none"Pas de mises à jour quotidiennes.
"remote"etFalseMet à jour uniquement les dépôts distants.
"full"etTrueMet à jour les dépôts distants et fusionne la copie de travail.
Note
Ce paramètre exige que Background tasks using Celery fonctionne, et prendra effet après son redémarrage.
AVATAR_URL_PREFIX¶
Préfixe pour construire les URLs des avatars telles que : ${AVATAR_URL_PREFIX}/avatar/${MAIL_HASH}?${PARAMS}. Les services suivants fonctionnent :
- Gravatar (par défaut), selon https://gravatar.com/
AVATAR_URL_PREFIX = 'https://www.gravatar.com/'- Libravatar, selon https://www.libravatar.org/
AVATAR_URL_PREFIX = 'https://www.libravatar.org/'
Voir aussi
AUTH_TOKEN_VALID¶
Période pendant laquelle le jeton d’authentification et le mot de passe temporaire sont valides suite au courriel de réinitialisation du mot de passe. La valeur est exprimée en secondes ; par défaut 172800 (2 jours).
AUTH_PASSWORD_DAYS¶
How many days Weblate rejects reusing a previously used password for a user.
La vérification est basée sur le journal d’audit, AUDITLOG_EXPIRY doit être au moins égal à celui-ci.
Note
Les modifications du mot de passe faites avant Weblate 2.15 ne sont pas soumises à cette règle.
La valeur par défaut est de 180 jours.
AUTOFIX_LIST¶
Liste des correctifs automatiques à appliquer lors de l’enregistrement d’une chaîne.
Note
Fournit le chemin complètement qualifié de la classe Python qui implémente l’interface autofixer.
Les corrections disponibles sont décrites dans Corrections automatiques.
Vous pouvez choisir ce qui doit être utilisé :
AUTOFIX_LIST = (
"weblate.trans.autofixes.whitespace.SameBookendingWhitespace",
"weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis",
)
BACKGROUND_TASKS¶
Ajouté dans la version 4.5.2.
Définit la fréquence de déclenchement des tâches longues de maintenance pour un composant.
Actuellement ceci contrôle :
Traduction automatique add-on
calcul de Contrôles de qualité et corrections à nouveau
Choix possibles :
monthly(valeur par défaut)weeklydailynever
Note
Il n’est pas recommandé d’augmenter la fréquence lorsque Weblate contient des milliers de composants.
BASIC_LANGUAGES¶
Ajouté dans la version 4.4.
Liste des langues à présenter aux utilisateurs pour commencer une nouvelle traduction. Si absente, une liste prédéfinie est utilisée (comprenant toutes les langues habituellement utilisées, mais sans les variantes spécifiques aux pays).
Le but est d’empêcher les utilisateurs non privilégiés d’ajouter des langues non souhaitées. Les administrateurs de projets voient par contre, la liste complète des langues de Weblate.
Note
Ceci ne définit pas de nouvelles langues pour Weblate — il ne filtre que celles qui existent dans la base de données.
Exemple:
BASIC_LANGUAGES = {"cs", "it", "ja", "en"}
Voir aussi
BORG_EXTRA_ARGS¶
Ajouté dans la version 4.9.
Vous pouvez passer des arguments supplémentaires à borg create quand les sauvegardes prédéfinies sont utilisées.
Exemple:
BORG_EXTRA_ARGS = ["--exclude", "vcs/"]
Voir aussi
CACHE_DIR¶
Ajouté dans la version 4.16.
Répertoire où Weblate range les fichiers de cache. Par défaut il s’agit du sous-répertoire cache de DATA_DIR.
Si DATA_DIR est sur un système de fichiers du réseau, modifiez ceci en choisissant un système de fichiers local ou temporaire.
Le conteneur Docker utilise un volume séparé pour cela, voir Docker container volumes.
Les répertoires suivants existent habituellement :
fontscache font-config pour Gestion des polices.
avatarAvatars utilisateur en cache, voir Avatars.
staticEmplacement par défaut des fichiers statiques Django, spécifié par
STATIC_ROOT. Voir Serving static files.tesseractdonnées entraînées par OCR pour Visual context for strings.
CSP_SCRIPT_SRC, CSP_IMG_SRC, CSP_CONNECT_SRC, CSP_STYLE_SRC, CSP_FONT_SRC, CSP_FORM_SRC¶
Customize the Content-Security-Policy header for Weblate. The header is automatically generated based on enabled integrations with third-party services (Matomo, Google Analytics, Sentry, …).
All these default to an empty list.
Exemple:
# Enable Cloudflare Javascript optimizations
CSP_SCRIPT_SRC = ["ajax.cloudflare.com"]
CHECK_LIST¶
Liste des vérifications de qualité à effectuer sur une traduction.
Note
Fournir un chemin complet vers la classe Python qui implémente l’interface de vérification.
Ajuster la liste des contrôles pour inclure ceux qui vous concernent.
All built-in Contrôles qualité are turned on by default, from where you can change these settings. By default they are commented out in Configuration d’exemple so that default values are used. New checks are then carried out for each new Weblate version.
Vous pouvez désactiver tous les contrôles :
CHECK_LIST = ()
Vous pouvez en activer que quelques uns :
CHECK_LIST = (
"weblate.checks.chars.BeginNewlineCheck",
"weblate.checks.chars.EndNewlineCheck",
"weblate.checks.chars.MaxLengthCheck",
)
Note
Modifier ce paramètre affecte uniquement les nouvelles traductions modifiées. Les vérifications existantes resteront stockées dans la base de données. Pour appliquer également les changements aux traductions stockées, exécuter updatechecks.
COMMIT_PENDING_HOURS¶
Nombre d’heures entre les validations des modifications en attente par la tâche de fond.
CONTACT_FORM¶
Ajouté dans la version 4.6.
Configure comment l’e-mail du formulaire de contact est envoyé. Choisir une configuration qui correspond à la configuration de votre serveur mail.
"reply-to"L’émetteur est utilisé comme Reply-To, ceci est le comportement par défaut.
"from"The sender is used in as From. Your mail server needs to allow sending such e-mails.
"disabled"Désactive entièrement le formulaire de contact.
Ajouté dans la version 5.15.
Voir aussi
DATA_DIR¶
Le répertoire Weblate stocke l’ensemble des données. Il contient les liens vers les dépôts VCS, un index au format texte et divers fichiers de configuration pour les outils externes.
Les répertoires suivants existent habituellement :
homeRépertoire racine utilisé pour appeler les scripts.
sshClés SSH et configuration.
mediaDefault location for Django media files, specified by
MEDIA_ROOT. Contains uploaded screenshots, see Visual context for strings.vcsVersion-control repositories for translations.
backupsDaily backup data. Please check Données supprimées pour les sauvegardes for details.
fonts:Polices téléversées par l’utilisateur, voir Gestion des polices.
cacheDifférents caches. Peut être placé n’importe où en utilisant
CACHE_DIR.Le conteneur Docker utilise un volume séparé pour cela, voir Docker container volumes.
Note
Ce répertoire doit être accessible en écriture par Weblate. S’il est exécuté en tant que WSGI, cela signifie que l’utilisateur www-data doit avoir un accès en écriture dessus.
Le moyen le plus facile de réaliser cela est de déclarer l’utilisateur en tant que propriétaire du répertoire :
sudo chown www-data:www-data -R $DATA_DIR
/home/weblate/data est la valeur par défaut mais il est envisagé qu’elle puisse être modifiée.
DATABASE_BACKUP¶
Indique si les sauvegardes de la base de données doivent être faites sous le format texte à plat ou compressé ou ignorées. Les valeurs permises sont :
"plain""compressed""none"
Voir aussi
DEFAULT_ACCESS_CONTROL¶
Valeur du contrôle d’accès par défaut pour les nouveaux projets :
0Public
1Protégé
100Privé
200Personnalisé
Use Custom if you are managing ACL manually, which means not relying on the internal Weblate management.
Voir aussi
DEFAULT_AUTO_WATCH¶
Ajouté dans la version 4.5.
Configures whether Automatically watch projects on contribution
should be turned on for new users. Defaults to True.
Voir aussi
DEFAULT_RESTRICTED_COMPONENT¶
Ajouté dans la version 4.1.
Valeur par défaut pour la restriction du composant.
Voir aussi
DEFAULT_ADD_MESSAGE, DEFAULT_ADDON_MESSAGE, DEFAULT_COMMIT_MESSAGE, DEFAULT_DELETE_MESSAGE, DEFAULT_MERGE_MESSAGE¶
Default commit messages for different operations, please check Configuration des composants for details.
DEFAULT_ADDONS¶
Extensions à installer par défaut pour chaque composant créé.
Note
Ce paramètre ne concerne que les composants nouvellement créés.
Exemple :
DEFAULT_ADDONS = {
# Add-on with no parameters
"weblate.flags.target_edit": {},
# Add-on with parameters
"weblate.autotranslate.autotranslate": {
"mode": "suggest",
"filter_type": "todo",
"auto_source": "mt",
"component": "",
"engines": ["weblate-translation-memory"],
"threshold": "80",
},
}
Voir aussi
DEFAULT_COMMITER_EMAIL¶
Committer e-mail address, defaulting to noreply@weblate.org.
Voir aussi
DEFAULT_COMMITER_NAME¶
Committer name, defaulting to Weblate.
Voir aussi
DEFAULT_LANGUAGE¶
Ajouté dans la version 4.3.2.
Langue source pour tout nouveau composant.
La valeur par défaut est en. L’objet correspondant à la langue doit exister dans la base de données.
Voir aussi
DEFAULT_MERGE_STYLE¶
Style de fusion pour tout nouveau composant.
rebase - par défaut
merge
Voir aussi
DEFAULT_TRANSLATION_REVIEW¶
Ajouté dans la version 5.16.
Configures the default value for Activer les révisions, turned off by default.
DEFAULT_SOURCE_REVIEW¶
Ajouté dans la version 5.16.
Configures the default value for Activer la révision des chaînes sources, turned off by default.
DEFAULT_AUTOCLEAN_TM¶
Ajouté dans la version 5.13.
Configures the default value of Auto-nettoyage du mémoire de traduction.
DEFAULT_TRANSLATION_PROPAGATION¶
Paramètre par défaut pour la propagation de la traduction, par défaut True.
DEFAULT_PULL_MESSAGE¶
Configure le titre et le message par défaut pour les demandes de tirage.
ENABLE_AVATARS¶
Activation ou non des avatars utilisateurs basés sur Gravatar. Actif par défaut.
Avatars are fetched and cached on the server, lowering the risk of leaking private info, speeding up the user experience.
Voir aussi
ENABLE_HOOKS¶
Whether to turn on anonymous remote hooks.
Voir aussi
ENABLE_HTTPS¶
Modifié dans la version 5.7: Weblate nécessite désormais https pour la prise en charge de WebAuthn.
Indique s’il faut envoyer les liens vers Weblate en HTTPS ou HTTP. Ce paramètre affecte l’envoi des courriels et des URL absolues générées.
In the default configuration this is also used for several Django settings related to HTTPS — it enables secure cookies, toggles HSTS or enables redirection to a HTTPS URL.
The HTTPS redirection might be problematic in some cases and you might hit
an issue with infinite redirection in case you are using a reverse proxy doing
an SSL termination which does not correctly pass protocol headers to Django.
Please tweak your reverse proxy configuration to emit X-Forwarded-Proto or
Forwarded headers or configure SECURE_PROXY_SSL_HEADER to
let Django correctly detect the SSL status.
In case this is disabled, Weblate will fail to start with an
otp_webauthn.E031 error. You can silence this error by adding it to
SILENCED_SYSTEM_CHECKS, but still WebAuthn will not work for
sites without HTTPS.
ENABLE_SHARING¶
Turn on/off the Community menu so users can share translation progress on social networks.
Voir aussi
EXTRA_HTML_HEAD¶
Ajouté dans la version 4.15.
Insérer un balisage complémentaire dans l’entête HTML. Peut être utilisé pour vérifier le propriétaire du site, par exemple :
EXTRA_HTML_HEAD = '<link href="https://fosstodon.org/@weblate" rel="me">'
Avertissement
No sanitization is performed on the string. It is inserted as-is into the HTML header.
GET_HELP_URL¶
Ajouté dans la version 4.5.2.
URL où demander de l’assistance pour votre instance Weblate.
GITEA_CREDENTIALS¶
Ajouté dans la version 4.12.
Liste des informations de connexion pour les serveurs Gitea.
GITEA_CREDENTIALS = {
"try.gitea.io": {
"username": "weblate",
"token": "your-api-token",
},
}
The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.
GITLAB_CREDENTIALS¶
Ajouté dans la version 4.3.
Liste des informations de connexion pour les serveurs GitLab.
GITLAB_CREDENTIALS = {
"gitlab.com": {
"username": "weblate",
"token": "your-api-token",
},
}
Note
The personal access token needs the api scope to be able to use the API.
The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.
GITHUB_CREDENTIALS¶
Ajouté dans la version 4.3.
Liste des informations de connexion pour les serveurs GitHub.
GITHUB_CREDENTIALS = {
"api.github.com": {
"username": "weblate",
"token": "your-api-token",
},
}
Note
It is possible to use both fine-grained personal access tokens and classic personal access tokens. The fine-grained tokens are limited to a single organization, so it won’t work if you want Weblate to fork a repository outside the organization (typically to the user namespace).
To clone, push and create pull requests, the read and write access to Contents and Pull requests is required.
Administration might also be necessary for forking a repository if you intend to use forking and the original repository is not public.
Indication
Utilisez api.github.com comme hôte API pour https://github.com/.
The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.
BITBUCKETSERVER_CREDENTIALS¶
Ajouté dans la version 4.16.
Liste des informations de connexion pour les serveurs Bitbucket Data Center.
BITBUCKETSERVER_CREDENTIALS = {
"git.self-hosted.com": {
"username": "weblate",
"token": "http-access-token",
},
}
The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.
BITBUCKETCLOUD_CREDENTIALS¶
Ajouté dans la version 5.8.
Liste des informations de connexion pour les serveurs Bitbucket Cloud.
BITBUCKETCLOUD_CREDENTIALS = {
"bitbucket.org": {
"username": "your-email",
"workspace": "your-workspace-slug",
"token": "your-api-token",
},
}
The configuration dictionary consists of credentials defined for each API host.
The API host might be different from what you use in the web browser, for
example GitHub API is accessed as api.github.com.
The following configuration is available for each host:
usernameAPI user.
workspaceThe user workspace slug.
tokenThe API token with pullrequest:write permission.
Additional settings not described here can be found at Configuring version control credentials.
AZURE_DEVOPS_CREDENTIALS¶
Ajouté dans la version 5.2.
Liste des informations de connexion pour les serveurs Azure DevOps.
AZURE_DEVOPS_CREDENTIALS = {
"dev.azure.com": {
"username": "project-name",
"token": "your-api-token",
"organization": "organization-name",
},
}
The configuration dictionary consists of credentials defined for each API host.
The API host might be different from what you use in the web browser, for
example GitHub API is accessed as api.github.com.
The following configuration is available for each host:
usernameNom du projet Azure DevOps. Il ne s’agit pas du nom du dépôt.
organizationThe name of the organization of the project.
workItemIdsAn optional list of work items IDs from your organization. When provided new pull requests will have these attached.
tokenJeton API pour l’utilisateur API, nécessaire.
Additional settings not described here can be found at Configuring version control credentials.
GOOGLE_ANALYTICS_ID¶
Google Analytics ID to turn on monitoring of Weblate using Google Universal Analytics.
Note
L’intégration de Google Analytics 4 n’est actuellement pas disponible pour Weblate, veuillez consulter https://github.com/WeblateOrg/weblate/issues/14015.
HIDE_REPO_CREDENTIALS¶
Hide repository credentials from the web interface. In case you have repository URL with user and password, Weblate will hide it when related info is shown to users.
For example instead of https://user:password@git.example.com/repo.git it
will show just https://git.example.com/repo.git. It tries to clean up VCS
error messages too in a similar manner.
Note
Activé par défaut.
HIDE_VERSION¶
Ajouté dans la version 4.3.1.
Hides version info from unauthenticated users. This also makes all documentation links point to the latest version instead of the documentation matching the currently installed version.
Hiding the version is a recommended security practice in some corporations, does not prevent an attacker from figuring out version by probing behavior.
Note
Cette fonction est désactivée par défaut.
IP_BEHIND_REVERSE_PROXY¶
Indique si Weblate fonctionne derrière un reverse proxy.
If set to True, Weblate gets IP address from a header defined by
IP_PROXY_HEADER.
Avertissement
Ensure you are actually using a reverse proxy and that it sets this header, otherwise users will be able to fake the IP address.
Note
Cela n’est pas activé par défaut.
IP_PROXY_HEADER¶
Indicates which header Weblate should obtain the IP address from when
IP_BEHIND_REVERSE_PROXY is turned on.
Valeur par défaut : HTTP_X_FORWARDED_FOR.
IP_PROXY_OFFSET¶
Modifié dans la version 5.0.1: La valeur par défaut est passée de 1 à -1.
Indicates which part of IP_PROXY_HEADER is used as client IP
address.
Depending on your setup, this header might consist of several IP addresses,
(for example X-Forwarded-For: client-ip, proxy-a, proxy-b) and you can configure
which address from the header is used as client IP address here.
Avertissement
Setting this affects the security of your installation. You should only configure it to use trusted proxies for determining the IP address. Please check <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For#security_and_privacy_concerns> for more details.
La valeur par défaut est -1.
LEGAL_TOS_DATE¶
Ajouté dans la version 4.15.
Note
Il faut que Legal module soit installé pour que ceci fonctionne.
Date de la dernière mise à jour des conditions générales d’utilisation. Chaque fois que la date est modifiée, les Utilisateurs sont tenus d’accepter les nouvelles conditions générales d’utilisation.
from datetime import date
LEGAL_TOS_DATE = date(2022, 2, 2)
LEGAL_URL¶
URL où votre instance Weblate expose ses documents juridiques.
Indication
Useful if you host your legal documents outside Weblate for embedding them inside Weblate. Please check Legal module for details.
Exemple :
LEGAL_URL = "https://weblate.org/terms/"
Voir aussi
LICENSE_EXTRA¶
Licences supplémentaires à inclure dans le choix des licences.
Note
Each license definition should be tuple of its short name, a long name, a URL and a boolean, indication with it is a libre license.
Par exemple :
LICENSE_EXTRA = [
(
"AGPL-3.0",
"GNU Affero General Public License v3.0",
"https://www.gnu.org/licenses/agpl-3.0-standalone.html",
True,
),
]
LICENSE_FILTER¶
Modifié dans la version 4.3: Désormais laisser cette valeur vide désactive l’alerte de licence.
Filter list of licenses to show. This also disables the license alert when set to empty.
Note
Ce filtre utilise le nom court des licences.
Par exemple :
LICENSE_FILTER = {"AGPL-3.0", "GPL-3.0-or-later"}
Ceci désactive l’alerte de licence :
LICENSE_FILTER = set()
Voir aussi
LICENSE_REQUIRED¶
Defines whether the license attribute in Configuration des composants is required.
Note
Désactivé par défaut.
LIMIT_TRANSLATION_LENGTH_BY_SOURCE_LENGTH¶
Whether the length of a given translation should be limited. The restriction is the length of the source string × 10 characters.
Indication
Set this to False to allow longer translations (up to 10,000 characters) irrespective of source string length.
Note
Valeur par défaut : True.
LOCALIZE_CDN_URL et LOCALIZE_CDN_PATH¶
These settings configure the JavaScript localisation CDN add-on.
LOCALIZE_CDN_URL defines root URL where the localization CDN is
available and LOCALIZE_CDN_PATH defines path where Weblate should
store generated files which will be served at the LOCALIZE_CDN_URL.
Indication
Utilise https://weblate-cdn.com/ sur Hosted Weblate .
Voir aussi
MATOMO_SITE_ID¶
ID du site dans Matomo (anciennement Piwik) que vous voulez utiliser pour le suivi de Weblate.
Note
Cette intégration ne prend pas en charge le gestionnaire de balises de Matomo.
Voir aussi
MATOMO_URL¶
URL complète (avec la barre oblique de fin) d’une installation de Matomo (anciennement Piwik) que vous voulez utiliser pour suivre l’utilisation de Weblate. Voir <https://matomo.org/> pour plus d’informations.
Indication
Cette intégration ne prend pas en charge le gestionnaire de balises de Matomo.
Par exemple :
MATOMO_SITE_ID = 1
MATOMO_URL = "https://example.matomo.cloud/"
Voir aussi
NEARBY_MESSAGES¶
Nombre de chaînes à proximité (dans chaque direction) à afficher dans l’éditeur complet.
Il ne s’agit que d’une valeur par défaut, les utilisateurs peuvent l’adapter dans Profil utilisateur.
DEFAULT_PAGE_LIMIT¶
Ajouté dans la version 4.7.
Nombre d’éléments par défaut à afficher quand la pagination est activée.
PAGURE_CREDENTIALS¶
Ajouté dans la version 4.3.2.
Liste des informations de connexion pour les serveurs Pagure.
PAGURE_CREDENTIALS = {
"pagure.io": {
"username": "weblate",
"token": "your-api-token",
},
}
The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.
Voir aussi
PASSWORD_MINIMAL_STRENGTH¶
Ajouté dans la version 5.10.2.
Minimal password score as evaluated by the zxcvbn password strength estimator.
La valeur par défaut est 0, ce qui signifie que la profondeur du contrôle est désactivée.
PRIVACY_URL¶
Ajouté dans la version 4.8.1.
URL contenant la politique de confidentialité de votre instance Weblate.
Indication
Utile si vous hébergez vos documents juridiques à l’extérieur de Weblate pour les réinclure ensuite, voir Legal module pour les détails.
Exemple :
PRIVACY_URL = "https://weblate.org/terms/"
Voir aussi
PRIVATE_COMMIT_EMAIL_OPT_IN¶
Ajouté dans la version 4.15.
Configures whether the private commit e-mail is opt-in or opt-out (by default it is opt-in).
Indication
This setting only applies to users which have not explicitly chosen a commit e-mail.
Voir aussi
PRIVATE_COMMIT_EMAIL_TEMPLATE¶
Ajouté dans la version 4.15.
Template to generate a private commit e-mail for a user. Defaults to "{username}@users.noreply.{site_domain}".
It can contain {user_id}, {username}, {site_title}, and {site_domain}.
Définir une chaîne vide pour la désactiver.
Note
Using a different commit e-mail is opt-in for users unless configured by
PRIVATE_COMMIT_EMAIL_OPT_IN. Users can configure their commit e-mail in
the Profil.
PRIVATE_COMMIT_NAME_OPT_IN¶
Ajouté dans la version 5.16.
Configures whether the private commit name is opt-in or opt-out (by default it is opt-in).
Indication
This setting only applies to users which have not explicitly chosen a commit name.
Voir aussi
PRIVATE_COMMIT_NAME_TEMPLATE¶
Ajouté dans la version 5.16.
Template to generate a private commit name for a user. Defaults to "{site_title} user {user_id}".
It can contain {user_id}, {username}, {site_title}, and {site_domain}.
Définir une chaîne vide pour la désactiver.
Note
Using a different commit name is opt-in for users unless configured by
PRIVATE_COMMIT_NAME_OPT_IN. Users can configure their commit name in
the Profil.
PROJECT_BACKUP_KEEP_COUNT¶
Ajouté dans la version 4.14.
Définit le nombre de sauvegardes par projet présentes sur le serveur. La valeur par défaut est 3.
Voir aussi
PROJECT_BACKUP_KEEP_DAYS¶
Ajouté dans la version 4.14.
Définit la durée de conservation des sauvegardes du projet sur le serveur. La valeur par défaut est de 30 jours.
Voir aussi
PROJECT_NAME_RESTRICT_RE¶
Ajouté dans la version 4.15.
Définit une expression régulière pour restreindre le nommage du projet. Si un nom la vérifie, alors il sera rejeté.
Voir aussi
PROJECT_WEB_RESTRICT_HOST¶
Ajouté dans la version 4.16.2.
Reject using certain hosts in project website. Any subdomain is matched, so
including example.com will block test.example.com as well. The list
should contain lower case strings only, the parsed domain is lower cased before
matching.
Configuration par défaut :
PROJECT_WEB_RESTRICT_HOST = {"localhost"}
PROJECT_WEB_RESTRICT_NUMERIC¶
Ajouté dans la version 4.16.2.
Reject using numeric IP address in project website. On by default.
PROJECT_WEB_RESTRICT_RE¶
Ajouté dans la version 4.15.
Defines a regular expression to limit what can be entered as Site Web du projet. Any matching URLs will be rejected.
PUBLIC_ENGAGE¶
Ajouté dans la version 5.16.2.
Allows public engage page even with REQUIRE_LOGIN.
Voir aussi
RATELIMIT_NOTIFICATION_LIMITS¶
Ajouté dans la version 5.14.
Limits how many notifications for a single user will be sent out.
The default setting is:
# Multi-level rate limiting for email notifications
# Each tuple contains (max_emails, time_window_seconds)
RATELIMIT_NOTIFICATION_LIMITS = [
# Prevent burst sends - 3 emails per 2 minutes
(3, 120),
# Equalize to avoid getting blocked for too long - 10 emails per hour
(10, 3600),
# Daily limit: 50 emails per day
(50, 86400),
]
RATELIMIT_ATTEMPTS¶
Nombre maximum de tentatives d’authentification avant que le seuil limite ne soit appliqué.
La valeur par défaut est 5.
Voir aussi
RATELIMIT_WINDOW¶
How long authentication is accepted after rate limiting applies.
Nombre de secondes (par défaut 300, soit 5 minutes).
RATELIMIT_LOCKOUT¶
How long authentication is locked after rate limiting applies.
Nombre de secondes (par défaut 600, soit 10 minutes).
Voir aussi
REGISTRATION_ALLOW_BACKENDS¶
Ajouté dans la version 4.1.
List of authentication backends to allow registration from. This only limits new registrations, users can still authenticate and add authentication using all configured authentication backends.
It is recommended to keep REGISTRATION_OPEN on while limiting
registration backends, otherwise users will be able to register, but Weblate
will not show links to register in the user interface.
Exemple :
REGISTRATION_ALLOW_BACKENDS = ["azuread-oauth2", "azuread-tenant-oauth2"]
Indication
Le nom des serveurs correspondent aux noms utilisés dans l’URL pour l’authentification.
Voir aussi
REGISTRATION_CAPTCHA¶
Whether registration of new accounts is protected by a CAPTCHA. Defaults to enabled.
If turned on, a CAPTCHA is added to all pages where a users enters their e-mail address:
New account registration.
Récupération du mot de passe.
Adding e-mail to an account.
Contact form for users that are not signed in.
The protection currently consists of following steps:
Mathematical captcha to be solved by the user.
Proof of work challenge calculated by the browser. The difficulty can be adjusted using
ALTCHA_MAX_NUMBER.
REGISTRATION_EMAIL_MATCH¶
Allows you to filter which e-mail addresses can register.
Defaults to .*, which allows any e-mail address to be registered.
You can use it to restrict registration to a single e-mail domain:
REGISTRATION_EMAIL_MATCH = r"^.*@weblate\.org$"
REGISTRATION_ALLOW_DISPOSABLE_EMAILS¶
Ajouté dans la version 5.16.1.
Allow registration with disposable e-mail domains. When enabled, the
disposable domain blocklist is bypassed. Default is False.
REGISTRATION_OPEN¶
Whether registration of new accounts is currently permitted. Defaults to enabled.
This setting affects built-in authentication by e-mail address or through the
Python Social Auth (you can allow certain back-ends using
REGISTRATION_ALLOW_BACKENDS).
Note
If using third-party authentication methods such as S’authentifier avec LDAP, it just hides the registration form, but new users might still be able to sign in and create accounts.
REGISTRATION_REBIND¶
Ajouté dans la version 4.16.
Allow rebinding authentication backends for existing users. Turn this on when migrating between authentication providers.
Note
Off by default to not allow adding other authentication backends to an existing account. Rebinding can lead to account compromise when using more third-party authentication backends.
REPOSITORY_ALERT_THRESHOLD¶
Ajouté dans la version 4.0.2.
Threshold for triggering an alert for outdated repositories, or ones that contain too many changes. Defaults to 25.
Voir aussi
REQUIRE_LOGIN¶
Ajouté dans la version 4.1.
This enables django.contrib.auth.middleware.LoginRequiredMiddleware
and configures REST framework to require authentication for all API endpoints.
Modifié dans la version 5.15: Weblate now relies on Django built-in middleware.
Note
Ceci est implémenté dans Configuration d’exemple. Pour Docker, utiliser WEBLATE_REQUIRE_LOGIN.
SENTRY_DSN¶
Sentry DSN to use for Collecting error reports and monitoring performance.
Voir aussi
SENTRY_ENVIRONMENT¶
Configure l’environment pour Sentry. Valeur par défaut devel.
SENTRY_MONITOR_BEAT_TASKS¶
Ajouté dans la version 5.13.
Configure whether to monitor Celery Beat tasks with Sentry. Defaults to True.
SENTRY_PROFILES_SAMPLE_RATE¶
Configurer le taux d’échantillonnage pour la gestion des performances. Mettre à 1 pour tracer tous les événements, 0 (valeur par défaut) désactive toutes les traces.
Voir aussi
SENTRY_SEND_PII¶
Autorise Sentry à collecter certaines informations personnelles permettant l’identification. Désactivé par défaut.
Modifié dans la version 5.7: This is turned off by default now, used to be turned on by default.
SENTRY_TRACES_SAMPLE_RATE¶
Configure sampling rate for profiling monitoring. Set to 1 to trace all events, 0 (the default) disables tracing.
Voir aussi
SIMPLIFY_LANGUAGES¶
Use simple language codes for default language/country combinations.
For example an fr_FR translation will use the fr language code.
This is usually the desired behavior, as it simplifies listing languages
for these default combinations.
Turn this off if you want to different translations for each variant.
SITE_DOMAIN¶
Configures site domain. Necessary to produce correct absolute links in many scopes (for example activation e-mails, notifications or RSS feeds).
If Weblate is running on a non-standard port, include it here as well.
Exemples :
# Production site with domain name
SITE_DOMAIN = "weblate.example.com"
# Local development with IP address and port
SITE_DOMAIN = "127.0.0.1:8000"
Note
This setting should only contain the domain name. For configuring protocol,
(turning on and enforcing HTTPS) use ENABLE_HTTPS and for changing
the URL, use URL_PREFIX.
Indication
On a Docker container, the site domain is configured through
WEBLATE_ALLOWED_HOSTS.
SITE_TITLE¶
Site title to be used for the website and sent e-mails.
SPECIAL_CHARS¶
Additional characters to include in the visual keyboard, Clavier visuel.
La valeur par défaut est :
SPECIAL_CHARS = ("\t", "\n", "\u00a0", "…")
SINGLE_PROJECT¶
Redirects users directly to a project or component instead of showing
the dashboard. You can either set it to True so it only works
if there is actually only single project in Weblate. Alternatively, set
the project slug, and it will redirect unconditionally to this project.
Exemple :
SINGLE_PROJECT = "test"
SSH_EXTRA_ARGS¶
Ajouté dans la version 4.9.
Allows adding custom parameters when Weblate is invoking SSH. Useful when connecting to servers using legacy encryption or other non-standard features.
For example when SSH connection in Weblate fails with Unable to negotiate with legacyhost: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1, you can turn that on using:
SSH_EXTRA_ARGS = "-oKexAlgorithms=+diffie-hellman-group1-sha1"
Indication
The string is evaluated by the shell, so ensure any whitespace and special characters is quoted.
Voir aussi
STATUS_URL¶
The URL where your Weblate instance reports its status.
SUGGESTION_CLEANUP_DAYS¶
Automatically deletes suggestions after a given number of days.
Defaults to None, meaning no deletions.
SUPPORT_STATUS_CHECK¶
Ajouté dans la version 5.5.
Disables semiannual support status check and redirecting superusers upon login to the donation page in case there is no active support subscription.
Indication
Improve your Weblate experience by purchasing a support subscription and boosting Weblate progress instead of turning this off.
UNUSED_ALERT_DAYS¶
Ajouté dans la version 4.17.
Configures when the Component seems unused alert is triggered.
Defaults to 365 days, set to 0 to turn it off.
UPDATE_LANGUAGES¶
Ajouté dans la version 4.3.2.
Controls whether languages database should be updated when running database
migration and is on by default. This setting has no effect on invocation
of setuplang.
Avertissement
The languages display might become inconsistent with this. Weblate language definitions expand over time and it will not display language code for the defined languages.
Voir aussi
URL_PREFIX¶
This setting allows you to run Weblate under some path (otherwise it relies on being run from the webserver root).
Note
To use this setting, you also need to configure your server to strip this prefix.
For example with WSGI, this can be achieved by setting WSGIScriptAlias.
Indication
The prefix should start with a /.
Exemple :
URL_PREFIX = "/translations"
Note
This setting does not work with Django’s built-in server, you would have to
adjust urls.py to contain this prefix.
VCS_ALLOW_HOSTS¶
Ajouté dans la version 5.15.
A set of hosts to allow when configuring VCS URL. Defaults to an empty set what does no filtering at all.
VCS_ALLOW_SCHEMES¶
Ajouté dans la version 5.15.
A set of hosts to allow when configuring VCS URL. Only https and ssh are allowed by default.
VCS_API_DELAY¶
Ajouté dans la version 4.15.1.
Configures minimal delay in seconds between third-party API calls in Requêtes de fusion GitHub, Requêtes de fusion GitLab, Tirages Gitea demandés, Requêtes de fusion Pagure, and Poussées Azure DevOps demandées.
This rate-limits API calls from Weblate to these services to avoid overloading them.
If you are being limited by secondary rate-limiter at GitHub, increasing this might help.
La valeur par défaut est 10.
VCS_API_TIMEOUT¶
Ajouté dans la version 5.15.
Configures timeout in seconds for third-party API calls such as forking or creating merge requests in Requêtes de fusion GitHub, Requêtes de fusion GitLab, Tirages Gitea demandés, Requêtes de fusion Pagure, and Poussées Azure DevOps demandées.
La valeur par défaut est 10.
VCS_BACKENDS¶
Configuration of available VCS backends.
Note
Weblate tries to use all supported back-ends you have the tools for.
Indication
You can limit choices or add custom VCS back-ends by using this.
VCS_BACKENDS = ("weblate.vcs.git.GitRepository",)
VCS_CLONE_DEPTH¶
Configures how deep cloning of repositories Weblate should do.
Note
Currently this is only supported in Git. By default Weblate does shallow clones of the repositories to make cloning faster and save disk space. Depending on your usage (for example when using custom Extensions), you might want to increase the depth or turn off shallow clones completely by setting this to 0.
Indication
In case you get fatal: protocol error: expected old/new/ref, got 'shallow
<commit hash>' error when pushing from Weblate, turn off shallow clones completely by setting:
VCS_CLONE_DEPTH = 0
WEBLATE_ADDONS¶
List of add-ons available for use. To use them, they have to be enabled for a given translation component. By default this includes all built-in add-ons, when extending the list you will probably want to keep existing ones enabled, for example:
WEBLATE_ADDONS = (
# Built-in add-ons
"weblate.addons.gettext.GenerateMoAddon",
"weblate.addons.gettext.UpdateLinguasAddon",
"weblate.addons.gettext.UpdateConfigureAddon",
"weblate.addons.gettext.MsgmergeAddon",
"weblate.addons.gettext.GettextAuthorComments",
"weblate.addons.cleanup.CleanupAddon",
"weblate.addons.consistency.LanguageConsistencyAddon",
"weblate.addons.discovery.DiscoveryAddon",
"weblate.addons.flags.SourceEditAddon",
"weblate.addons.flags.TargetEditAddon",
"weblate.addons.flags.SameEditAddon",
"weblate.addons.flags.BulkEditAddon",
"weblate.addons.generate.GenerateFileAddon",
"weblate.addons.properties.PropertiesSortAddon",
"weblate.addons.git.GitSquashAddon",
"weblate.addons.removal.RemoveComments",
"weblate.addons.removal.RemoveSuggestions",
"weblate.addons.resx.ResxUpdateAddon",
"weblate.addons.autotranslate.AutoTranslateAddon",
"weblate.addons.cdn.CDNJSAddon",
# Add-on you want to include
"weblate.addons.example.ExampleAddon",
)
Note
Removing the add-on from the list does not uninstall it from the components. Weblate will crash in that case. Please uninstall the add-on from all components prior to removing it from this list.
ADDON_ACTIVITY_LOG_EXPIRY¶
Ajouté dans la version 5.6.
Configures how long activity logs for add-ons are kept. Defaults to 180 days.
WEBLATE_EXPORTERS¶
Ajouté dans la version 4.2.
List of a available exporters offering downloading translations or glossaries in various file formats.
Voir aussi
WEBLATE_FORMATS¶
List of file formats available for use.
Note
The default list already has the common formats.
Voir aussi
WEBLATE_MACHINERY¶
Ajouté dans la version 4.13.
List of machinery services available for use.
WEBLATE_GPG_IDENTITY¶
Identity used by Weblate to sign Git commits, for example:
WEBLATE_GPG_IDENTITY = "Weblate <weblate@example.com>"
The Weblate GPG keyring is searched for a matching key (home/.gnupg under
DATA_DIR). If not found, a key is generated, please check
Signing Git commits with GnuPG for more details.
Voir aussi
WEBSITE_REQUIRED¶
Defines whether Site Web du projet has to be specified when creating a project. On by default, as that suits public server setups.
Configuring version control credentials¶
Indication
This section describes VCS credential variables as
GITHUB_CREDENTIALS, GITLAB_CREDENTIALS,
GITEA_CREDENTIALS, PAGURE_CREDENTIALS,
BITBUCKETSERVER_CREDENTIALS.
The configuration dictionary consists of credentials defined for each API host.
The API host might be different from what you use in the web browser, for
example GitHub API is accessed as api.github.com.
The credentials can also be overridden in URL pour l’envoi du dépôt or Dépôt du code source (if push URL is not configured), these take precedence over the ones specified in the configuration file.
The following configuration is available for each host:
usernameAPI user, required.
tokenJeton API pour l’utilisateur API, nécessaire.
schemeAjouté dans la version 4.18.
Scheme override. Weblate attempts to parse scheme from the repository URL and falls backs to
https. If you are running the API server internally, you might want to usehttpinstead, but consider security.
Indication
In the Docker container, the credentials can be configured using environment variables, see Code hosting sites credentials.
COMMENT_CLEANUP_DAYS¶
Supprimer les commentaires passé un certain nombre de jours. La valeur par défaut
Nonesignifie aucune suppression.