Konfiguration
Alle Einstellungen werden in settings.py
gespeichert (wie bei Django üblich).
Bemerkung
Nachdem Sie eine dieser Einstellungen geändert haben, müssen Sie Weblate neu starten - sowohl den WSGI- als auch den Celery-Prozess.
Wenn es als mod_wsgi
ausgeführt wird, müssen Sie Apache neu starten, um die Konfiguration neu zu laden.
Siehe auch
Bitte lesen Sie auch Djangos Dokumentation für Parameter zur Konfiguration von Django selbst.
ANONYMOUS_USER_NAME
Benutzername von Benutzern, die nicht angemeldet sind.
Siehe auch
AUDITLOG_EXPIRY
Neu in Version 3.6.
Wie viele Tage Weblate Audit-Protokolle aufbewahren soll, die Informationen über Kontoaktivitäten enthalten.
Der Standardwert ist 180 Tage.
AUTH_LOCK_ATTEMPTS
Neu in Version 2.14.
Maximale Anzahl der fehlgeschlagenen Authentifizierungsversuche, bevor die Ratenbegrenzung angewendet wird.
Dies wird derzeit an den folgenden Standorten angewandt:
Anmelden. Löscht das Kennwort des Kontos und verhindert, dass sich der Benutzer anmelden kann, ohne ein neues Kennwort anzufordern.
Passwort zurücksetzen. Verhindert, dass neue E-Mails gesendet werden, damit die Benutzer nicht mit zu vielen Versuchen, ihr Passwort zurückzusetzen, belästigt werden.
Der Standardwert ist 10.
Siehe auch
AUTO_UPDATE
Neu in Version 3.2.
Geändert in Version 3.11: Die ursprüngliche Option „Ein/Aus“ wurde geändert, um zu unterscheiden, welche Zeichenfolgen akzeptiert werden.
Aktualisiert täglich alle Repositories.
Hinweis
Nützlich, wenn Sie Benachrichtigungs-Hooks nicht verwenden, um Weblate-Repositories automatisch zu aktualisieren.
Bemerkung
Aus Gründen der Abwärtskompatibilität gibt es neben der Auswahl der Zeichenkette auch Ein/Aus-Optionen.
Die Optionen sind:
- „none“
Keine täglichen Aktualisierungen.
- „remote“` auch ` ` False
Aktualisieren Sie nur Remotes.
- „full“` auch ` ` True
Aktualisieren Sie Remotes und führen Sie Arbeitskopien zusammen.
Bemerkung
Dies setzt voraus, dass Background tasks using Celery funktioniert, und wird nach einem Neustart wirksam.
AVATAR_URL_PREFIX
Präfix für den Aufbau von Avatar-URLs als: „${AVATAR_URL_PREFIX}/avatar/${MAIL_HASH}?${PARAMS}“. Die folgenden Dienste sind dafür bekannt, dass sie funktionieren:
- Gravatar (Standard), wie unter https://gravatar.com/
AVATAR_URL_PREFIX = ‚https://www.gravatar.com/‘
- Libravatar, wie unter https://www.libravatar.org/
AVATAR_URL_PREFIX = 'https://www.libravatar.org/'
Siehe auch
AUTH_TOKEN_VALID
Neu in Version 2.14.
Dauer der Gültigkeit des Authentifizierungstokens und des temporären Kennworts aus E-Mails zum Zurücksetzen des Kennworts. Wird in Sekunden angegeben, Standardwert ist 172800 (2 Tage).
AUTH_PASSWORD_DAYS
Neu in Version 2.15.
Wie viele Tage mit demselben Passwort erlaubt sein sollten.
Bemerkung
Passwortänderungen, die vor Weblate 2.15 vorgenommen wurden, werden in dieser Richtlinie nicht berücksichtigt.
Der Standardwert ist 180 Tage.
AUTOFIX_LIST
Liste der automatischen Korrekturen, die beim Speichern einer Zeichenkette anzuwenden sind.
Bemerkung
Geben Sie einen vollqualifizierten Pfad zu der Python-Klasse an, die die Autofixer-Schnittstelle implementiert.
Verfügbare Korrekturen:
weblate.trans.autofixes.whitespace.SameBookendingWhitespace
Passt Leerzeichen am Anfang und Ende der Zeichenkette an die Ausgangszeichenkette an.
weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis
Ersetzt nachgestellte Punkte (…), wenn die Ausgangszeichenkette entsprechende Auslassungspunkte (…) enthält.
weblate.trans.autofixes.chars.RemoveZeroSpace
Entfernt Leerzeichen ohne Breite, wenn die Ausgangszeichenkette keine enthält.
weblate.trans.autofixes.chars.RemoveControlChars
Entfernt Steuerzeichen, wenn die Ausgangszeichenkette keine enthält.
weblate.trans.autofixes.html.BleachHTML
Entfernt unsichere HTML-Auszeichnungen aus Zeichenketten, die als
safe-html
gekennzeichnet sind (siehe Unsicheres HTML).
Sie können auswählen, welche verwendet werden sollen:
AUTOFIX_LIST = (
"weblate.trans.autofixes.whitespace.SameBookendingWhitespace",
"weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis",
)
BACKGROUND_TASKS
Neu in Version 4.5.2.
Legt fest, wie oft langwierige Wartungsmaßnahmen für eine Komponente ausgelöst werden sollen.
Right now this controls:
Automatische Übersetzung Erweiterung
Überprüfungen und Korrekturen recalculation
Mögliche Auswahlmöglichkeiten:
monthly“ (dies ist die Standardeinstellung)
weekly
daily
never
Bemerkung
Es wird nicht empfohlen, die Häufigkeit zu erhöhen, wenn Weblate Tausende von Komponenten enthält.
BASIC_LANGUAGES
Neu in Version 4.4.
Liste der Sprachen, die dem Benutzer zum Starten einer neuen Übersetzung angeboten wird. Wenn nicht angegeben, wird die integrierte Liste mit allen häufig verwendeten Sprachen verwendet, jedoch ohne länderspezifische Varianten.
Dies schränkt nur nicht privilegierte Benutzer ein, unerwünschte Sprachen hinzuzufügen. Den Projektadministratoren steht nach wie vor die volle Auswahl der in Weblate definierten Sprachen zur Verfügung.
Bemerkung
Damit werden keine neuen Sprachen für Weblate definiert, sondern nur die in der Datenbank vorhandenen gefiltert.
Beispiel:
BASIC_LANGUAGES = {"cs", "it", "ja", "en"}
Siehe auch
BORG_EXTRA_ARGS
Neu in Version 4.9.
Sie können zusätzliche Argumente an borg create übergeben, wenn integrierte Backups ausgelöst werden.
Beispiel:
BORG_EXTRA_ARGS = ["--exclude", "vcs/"]
Siehe auch
CSP_SCRIPT_SRC, CSP_IMG_SRC, CSP_CONNECT_SRC, CSP_STYLE_SRC, CSP_FONT_SRC
Passen Sie den Header Content-Security-Policy
für Weblate an. Die Kopfzeile wird automatisch auf der Grundlage der aktivierten Integrationen mit Diensten von Drittanbietern (Matomo, Google Analytics, Sentry, …) generiert.
Alle diese Listen sind standardmäßig leer.
Beispiel:
# Enable Cloudflare Javascript optimizations
CSP_SCRIPT_SRC = ["ajax.cloudflare.com"]
Siehe auch
CHECK_LIST
Liste der an einer Übersetzung durchzuführenden Qualitätsprüfungen.
Bemerkung
Geben Sie einen vollqualifizierten Pfad zu der Python-Klasse an, die die Prüfschnittstelle implementiert.
Passen Sie die Liste der Qualitätsprüfungen an die für Sie relevanten Prüfungen an.
Alle integrierten Qualitätsprüfungen sind standardmäßig aktiviert, von wo aus Sie diese Einstellungen ändern können. Standardmäßig sind sie in Muster-Konfiguration auskommentiert, sodass Standardwerte verwendet werden. Für jede neue Weblate-Version werden dann neue Qualitätsprüfungen durchgeführt.
Sie können alle Qualitätsprüfungen deaktivieren:
CHECK_LIST = ()
Sie können nur ein paar einschalten:
CHECK_LIST = (
"weblate.checks.chars.BeginNewlineCheck",
"weblate.checks.chars.EndNewlineCheck",
"weblate.checks.chars.MaxLengthCheck",
)
Bemerkung
Eine Änderung dieser Einstellung wirkt sich nur auf neu geänderte Übersetzungen aus, bestehende Qualitätsprüfungen werden weiterhin in der Datenbank gespeichert. Um auch Änderungen an den gespeicherten Übersetzungen vorzunehmen, führen Sie updatechecks
aus.
COMMIT_PENDING_HOURS
Neu in Version 2.10.
Anzahl der Stunden zwischen Commits von ausstehenden Änderungen durch die Hintergrundaufgabe.
CONTACT_FORM
Neu in Version 4.6.
Legt fest, wie E-Mails aus dem Kontaktformular gesendet werden. Wählen Sie eine Konfiguration, die Ihrer Mail-Server-Konfiguration entspricht.
"reply-to"
Der Absender wird in Reply-To verwendet, dies ist das Standardverhalten.
"from"
Der Absender wird in From verwendet. Ihr Mail-Server muss den Versand solcher E-Mails erlauben.
DATA_DIR
Der Ordner, in dem Weblate alle Daten speichert. Er enthält Links zu VCS-Repositorys, einen Volltextindex und verschiedene Konfigurationsdateien für externe Tools.
Üblicherweise existieren folgende Unterverzeichnisse:
home
Basisverzeichnis, das zum Aufrufen von Skripts verwendet wird.
ssh
SSH-Schlüssel und Konfiguration.
static
Standardspeicherort für statische Django-Dateien, angegeben durch :setting:‘django:STATIC_ROOT‘. Siehe :ref:‘static-files‘.
Der Docker-Container verwendet dafür ein eigenes Volume, siehe Docker-Container-Volumes.
media
Standardspeicherort für Django-Mediendateien, angegeben durch
MEDIA_ROOT
. Enthält hochgeladene Bildschirmfotos, siehe Bildschirmfotos.vcs
Versionsverwaltung-Repositorys für Übersetzungen.
backups
Tägliche Backup-Daten, für Details prüfen Sie bitte :ref:‘backup-dumps‘.
celery
Celery Scheduler-Daten, siehe Background tasks using Celery.
fonts
:Vom Benutzer hochgeladene Schriftarten, siehe Schriftarten verwalten.
Bemerkung
Dieses Verzeichnis muss von Weblate beschreibbar sein. Die Ausführung als uWSGI bedeutet, dass der Benutzer www-data
Schreibzugriff darauf haben sollte.
Der einfachste Weg, dies zu erreichen, ist, den Benutzer zum Eigentümer des Verzeichnisses zu machen:
sudo chown www-data:www-data -R $DATA_DIR
Die Standardeinstellung ist /home/weblate/data
, aber es wird erwartet, dass sie konfiguriert wird.
DATABASE_BACKUP
Neu in Version 3.1.
Ob die Datenbank-Backups als reiner Text oder komprimiert gespeichert oder übersprungen werden sollen, die zulässigen Werte sind:
"plain"
"komprimiert"
„none“
Siehe auch
DEFAULT_ACCESS_CONTROL
Neu in Version 3.3.
Die Standardeinstellung der Zugriffssteuerung für neue Projekte:
0
Öffentlich
1
Geschützt
100
Privat
200
Benutzerdefiniert
Verwenden Sie Benutzerdefiniert, wenn Sie die ACL manuell verwalten, d.h. sich nicht auf die interne Weblate-Verwaltung verlassen.
Siehe auch
DEFAULT_AUTO_WATCH
Neu in Version 4.5.
Konfiguriert, ob Projekte nach Beitrag automatisch beobachten für neue Benutzer aktiviert werden soll. Der Standardwert ist True
.
Siehe auch
DEFAULT_RESTRICTED_COMPONENT
Neu in Version 4.1.
Der Standardwert für die Komponenteneinschränkung.
Siehe auch
DEFAULT_ADD_MESSAGE, DEFAULT_ADDON_MESSAGE, DEFAULT_COMMIT_MESSAGE, DEFAULT_DELETE_MESSAGE, DEFAULT_MERGE_MESSAGE
Voreingestellte Commit-Meldungen für verschiedene Operationen, siehe Komponente für Details.
DEFAULT_ADDONS
Standard-Add-ons, die für jede erstellte Komponente installiert werden.
Bemerkung
Diese Einstellung wirkt sich nur auf neu erstellte Komponenten aus.
Beispiel:
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",
},
}
Siehe auch
DEFAULT_COMMITER_EMAIL
Neu in Version 2.4.
Die E-Mail-Adresse des Committers ist standardmäßig auf noreply@weblate.org
eingestellt.
Siehe auch
DEFAULT_COMMITER_NAME
Neu in Version 2.4.
Der Name des Committers ist standardmäßig Weblate
.
Siehe auch
DEFAULT_LANGUAGE
Neu in Version 4.3.2.
Default source language to use for example in Ausgangssprache.
Der Standardwert ist „en“. Das entsprechende Sprachobjekt muss in der Datenbank vorhanden sein.
Siehe auch
DEFAULT_MERGE_STYLE
Neu in Version 3.4.
Merge-Stil für alle neuen Komponenten.
rebase - Standard
merge
Siehe auch
DEFAULT_TRANSLATION_PROPAGATION
Neu in Version 2.5.
Standardeinstellung für die Übersetzungsweitergabe, ist standardmäßig ‚‘True‘‘.
DEFAULT_PULL_MESSAGE
Konfiguriert den Standardtitel und die Standardnachricht für Pull-Anforderungen.
ENABLE_AVATARS
Ob Gravatar-basierte Avatare für Benutzer aktiviert werden sollen. Standardmäßig ist dies aktiviert.
Avatare werden abgerufen und auf dem Server zwischengespeichert, wodurch das Risiko des Durchsickerns privater Informationen verringert und das Benutzererlebnis beschleunigt wird.
Siehe auch
ENABLE_HOOKS
Ob anonyme Remote-Hooks aktiviert werden sollen.
Siehe auch
ENABLE_HTTPS
Ob Links per HTTPS oder HTTP an Weblate gesendet werden sollen. Diese Einstellung wirkt sich auf gesendete E-Mails und generierte absolute URLs aus.
In der Grundeinstellung wird dies auch für viele Django-Einstellungen im Rahmen von HTTPS verwendet - es aktiviert sichere Cookies, schaltet HSTS um oder aktiviert die Weiterleitung zu einer HTTPS-URL.
The HTTPS redirection might be problematic in some cases and you might hit
issue with infinite redirection in case you are using a reverse proxy doing 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.
ENABLE_SHARING
Turn on/off the Share menu so users can share translation progress on social networks.
EXTRA_HTML_HEAD
Neu in Version 4.15.
Insert additional markup into HTML header. Can be used for verification of site ownership, for example:
EXTRA_HTML_HEAD = '<link href="https://fosstodon.org/@weblate" rel="me">'
Warnung
No sanitization is performed on the string, it is inserted as is into the HTML header.
GET_HELP_URL
Neu in Version 4.5.2.
URL where support for your Weblate instance can be found.
GITEA_CREDENTIALS
Neu in Version 4.12.
List for credentials for Gitea servers.
GITEA_CREDENTIALS = {
"try.gitea.io": {
"username": "weblate",
"token": "your-api-token",
},
"gitea.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
Siehe auch
WEBLATE_GITEA_USERNAME
,
WEBLATE_GITEA_TOKEN
,
WEBLATE_GITEA_HOST
GITEA_USERNAME
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to GITEA_CREDENTIALS
.
Neu in Version 4.12.
Gitea username used to send pull requests for translation updates.
Siehe auch
GITEA_TOKEN
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to GITEA_CREDENTIALS
.
Neu in Version 4.12.
Gitea personal access token used to make API calls to send pull requests for translation updates.
GITLAB_CREDENTIALS
Neu in Version 4.3.
List for credentials for GitLab servers.
GITLAB_CREDENTIALS = {
"gitlab.com": {
"username": "weblate",
"token": "your-api-token",
},
"gitlab.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
GITLAB_USERNAME
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to GITLAB_CREDENTIALS
.
GitLab username used to send merge requests for translation updates.
Siehe auch
GITLAB_TOKEN
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to GITLAB_CREDENTIALS
.
Neu in Version 4.3.
GitLab personal access token used to make API calls to send merge requests for translation updates.
GITHUB_CREDENTIALS
Neu in Version 4.3.
List for credentials for GitHub servers.
GITHUB_CREDENTIALS = {
"api.github.com": {
"username": "weblate",
"token": "your-api-token",
},
"github.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
GITHUB_USERNAME
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to GITHUB_CREDENTIALS
.
GitHub username used to send pull requests for translation updates.
Siehe auch
GITHUB_TOKEN
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to GITHUB_CREDENTIALS
.
Neu in Version 4.3.
GitHub personal access token used to make API calls to send pull requests for translation updates.
GOOGLE_ANALYTICS_ID
Google Analytics ID to turn on monitoring of Weblate using Google Analytics.
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.
Bemerkung
This is turned on by default.
HIDE_VERSION
Neu in Version 4.3.1.
Hides version information from unauthenticated users. This also makes all documentation links point to latest version instead of the documentation matching currently installed version.
Hiding version is recommended security practice in some corporations, but it doesn’t prevent attacker to figure out version by probing the behavior.
Bemerkung
Diese Funktion ist standardmäßig ausgeschaltet.
INTERLEDGER_PAYMENT_POINTERS
Neu in Version 4.12.1.
List of Interledger Payment Pointers (ILPs) for Web Monetization.
If multiple are specified, probabilistic revenue sharing is achieved by selecting one randomly.
Please check <https://webmonetization.org/> for more details.
Hinweis
The default value lets users fund Weblate itself.
IP_BEHIND_REVERSE_PROXY
Neu in Version 2.14.
Indicates whether Weblate is running behind a reverse proxy.
If set to True
, Weblate gets IP address from a header defined by
IP_PROXY_HEADER
.
Warnung
Ensure you are actually using a reverse proxy and that it sets this header, otherwise users will be able to fake the IP address.
Bemerkung
This is not on by default.
IP_PROXY_HEADER
Neu in Version 2.14.
Indicates which header Weblate should obtain the IP address from when
IP_BEHIND_REVERSE_PROXY
is turned on.
Defaults to HTTP_X_FORWARDED_FOR
.
IP_PROXY_OFFSET
Neu in Version 2.14.
Indicates which part of IP_PROXY_HEADER
is used as client IP
address.
Abhängig von Ihrer Einrichtung kann dieser Header aus mehreren IP-Adressen bestehen (z.B. X-Forwarded-For: a, b, client-ip
) und Sie können hier konfigurieren, welche Adresse aus dem Header als Client-IP-Adresse verwendet wird.
Warnung
Setting this affects the security of your installation, you should only configure it to use trusted proxies for determining IP address.
Defaults to 0.
LEGAL_TOS_DATE
Neu in Version 4.15.
Bemerkung
You need Rechtliche Grundlagen installed to make this work.
Date of last update of terms of service documents. Whenever the date changes, users are required to agree with the terms of service.
from datetime import date
LEGAL_TOS_DATE = date(2022, 2, 2)
LEGAL_URL
Neu in Version 3.5.
URL where your Weblate instance shows its legal documents.
Hinweis
Useful if you host your legal documents outside Weblate for embedding them inside Weblate, please check Rechtliche Grundlagen for details.
Beispiel:
LEGAL_URL = "https://weblate.org/terms/"
Siehe auch
LICENSE_EXTRA
Additional licenses to include in the license choices.
Bemerkung
Each license definition should be tuple of its short name, a long name and an URL.
For example:
LICENSE_EXTRA = [
(
"AGPL-3.0",
"GNU Affero General Public License v3.0",
"https://www.gnu.org/licenses/agpl-3.0-standalone.html",
),
]
LICENSE_FILTER
Geändert in Version 4.3: Setting this to blank value now disables license alert.
Filter list of licenses to show. This also disables the license alert when set to empty.
Bemerkung
This filter uses the short license names.
For example:
LICENSE_FILTER = {"AGPL-3.0", "GPL-3.0-or-later"}
Following disables the license alert:
LICENSE_FILTER = set()
Siehe auch
LICENSE_REQUIRED
Defines whether the license attribute in Component configuration is required.
Bemerkung
This is off by default.
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.
Hinweis
Set this to False
to allow longer translations (up to 10,000 characters) irrespective of source string length.
Bemerkung
Defaults to True
.
LOCALIZE_CDN_URL und LOCALIZE_CDN_PATH
These settings configure the JavaScript-Lokalisierung 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
.
Hinweis
On Hosted Weblate, this uses https://weblate-cdn.com/
.
Siehe auch
LOGIN_REQUIRED_URLS
A list of URLs you want to require signing in. (Besides the standard rules built into Weblate).
Hinweis
This allows you to password protect a whole installation using:
LOGIN_REQUIRED_URLS = (r"/(.*)$",)
REST_FRAMEWORK["DEFAULT_PERMISSION_CLASSES"] = [
"rest_framework.permissions.IsAuthenticated"
]
Hinweis
It is desirable to lock down API access as well, as shown in the above example.
Siehe auch
LOGIN_REQUIRED_URLS_EXCEPTIONS
List of exceptions for LOGIN_REQUIRED_URLS
.
If not specified, users are allowed to access the sign in page.
Some of exceptions you might want to include:
LOGIN_REQUIRED_URLS_EXCEPTIONS = (
r"/accounts/(.*)$", # Required for sign in
r"/static/(.*)$", # Required for development mode
r"/widgets/(.*)$", # Allowing public access to widgets
r"/data/(.*)$", # Allowing public access to data exports
r"/hooks/(.*)$", # Allowing public access to notification hooks
r"/api/(.*)$", # Allowing access to API
r"/js/i18n/$", # JavaScript localization
)
MATOMO_SITE_ID
ID of a site in Matomo (formerly Piwik) you want to track.
Bemerkung
This integration does not support the Matomo Tag Manager.
Siehe auch
MATOMO_URL
Full URL (including trailing slash) of a Matomo (formerly Piwik) installation you want to use to track Weblate use. Please check <https://matomo.org/> for more details.
Hinweis
This integration does not support the Matomo Tag Manager.
For example:
MATOMO_SITE_ID = 1
MATOMO_URL = "https://example.matomo.cloud/"
Siehe auch
NEARBY_MESSAGES
How many strings to show around the currently translated string. This is just a default value, users can adjust this in Benutzerprofil.
DEFAULT_PAGE_LIMIT
Neu in Version 4.7.
Standardanzahl der Elemente, die bei aktivem Seitenumbruch angezeigt werden.
PAGURE_CREDENTIALS
Neu in Version 4.3.2.
List for credentials for Pagure servers.
PAGURE_CREDENTIALS = {
"pagure.io": {
"username": "weblate",
"token": "your-api-token",
},
"pagure.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
PAGURE_USERNAME
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to PAGURE_CREDENTIALS
.
Neu in Version 4.3.2.
Pagure-Benutzername, der verwendet wird, um Merge Requests für Übersetzungsaktualisierungen zu senden.
Siehe auch
PAGURE_TOKEN
Veraltet ab Version 4.14.2: This configuration is insecure, it is recommended to switch to PAGURE_CREDENTIALS
.
Neu in Version 4.3.2.
Pagure personal access token used to make API calls to send merge requests for translation updates.
Siehe auch
PRIVACY_URL
Neu in Version 4.8.1.
URL, unter der Ihre Weblate-Instanz ihre Datenschutzrichtlinie anzeigt.
Hinweis
Useful if you host your legal documents outside Weblate for embedding them inside Weblate, please check Rechtliche Grundlagen for details.
Beispiel:
PRIVACY_URL = "https://weblate.org/terms/"
Siehe auch
PRIVATE_COMMIT_EMAIL_OPT_IN
Neu in Version 4.15.
Configures whether the private commit e-mail is opt-in or opt-out (by default it is opt-out).
Siehe auch
PRIVATE_COMMIT_EMAIL_TEMPLATE
Neu in Version 4.15.
Template to generate private commit e-mail for an user. Defaults to "{username}@users.noreply.{site_domain}"
.
Set to blank string to disable.
Bemerkung
Using different commit e-mail is opt-in for users unless configured by
PRIVATE_COMMIT_EMAIL_OPT_IN
. Users can configure commit e-mail in
the Benutzerprofil.
PROJECT_BACKUP_KEEP_COUNT
Neu in Version 4.14.
Defines how many backups per project are kept on the server. It defaults to 3.
Siehe auch
PROJECT_BACKUP_KEEP_DAYS
Neu in Version 4.14.
Defines how long the project backups will be kept on the server. Defaults to 30 days.
Siehe auch
PROJECT_NAME_RESTRICT_RE
Neu in Version 4.15.
Defines a regular expression to restrict project naming. Any matching names will be rejected.
Siehe auch
PROJECT_WEB_RESTRICT_RE
Neu in Version 4.15.
Defines a regular expression to restrict project websites. Any matching URLs will be rejected.
Siehe auch
RATELIMIT_ATTEMPTS
Neu in Version 3.2.
Maximum number of authentication attempts before rate limiting is applied.
Defaults to 5.
Siehe auch
RATELIMIT_WINDOW
Neu in Version 3.2.
How long authentication is accepted after rate limiting applies.
An amount of seconds defaulting to 300 (5 minutes).
Siehe auch
RATELIMIT_LOCKOUT
Neu in Version 3.2.
How long authentication is locked after rate limiting applies.
An amount of seconds defaulting to 600 (10 minutes).
Siehe auch
REGISTRATION_ALLOW_BACKENDS
Neu in 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
enabled while limiting
registration backends, otherwise users will be able to register, but Weblate
will not show links to register in the user interface.
Beispiel:
REGISTRATION_ALLOW_BACKENDS = ["azuread-oauth2", "azuread-tenant-oauth2"]
Hinweis
The backend names match names used in URL for authentication.
Siehe auch
REGISTRATION_CAPTCHA
A value of either True
or False
indicating whether registration of new
accounts is protected by CAPTCHA. This setting is optional, and a default of
True
will be assumed if it is not supplied.
If turned on, a CAPTCHA is added to all pages where a users enters their e-mail address:
New account registration.
Password recovery.
Adding e-mail to an account.
Contact form for users that are not signed in.
REGISTRATION_EMAIL_MATCH
Neu in Version 2.17.
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_OPEN
Whether registration of new accounts is currently permitted.
This optional setting can remain the default True
, or changed to False
.
This setting affects built-in authentication by e-mail address or through the
Python Social Auth (you can whitelist certain back-ends using
REGISTRATION_ALLOW_BACKENDS
).
Bemerkung
If using third-party authentication methods such as LDAP-Authentifizierung, it just hides the registration form, but new users might still be able to sign in and create accounts.
REPOSITORY_ALERT_THRESHOLD
Neu in Version 4.0.2.
Threshold for triggering an alert for outdated repositories, or ones that contain too many changes. Defaults to 25.
Siehe auch
REQUIRE_LOGIN
Neu in Version 4.1.
This enables LOGIN_REQUIRED_URLS
and configures REST framework to
require authentication for all API endpoints.
Bemerkung
This is implemented in the Sample configuration. For Docker, use
WEBLATE_REQUIRE_LOGIN
.
SENTRY_DSN
Neu in Version 3.9.
Sentry DSN to use for Collecting error reports.
Siehe auch
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. This is necessary to produce correct absolute links in many scopes (for example activation e-mails, notifications or RSS feeds).
In case Weblate is running on non-standard port, include it here as well.
Beispiele:
# Production site with domain name
SITE_DOMAIN = "weblate.example.com"
# Local development with IP address and port
SITE_DOMAIN = "127.0.0.1:8000"
Bemerkung
This setting should only contain the domain name. For configuring protocol,
(enabling and enforcing HTTPS) use ENABLE_HTTPS
and for changing
URL, use URL_PREFIX
.
Hinweis
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, Visual keyboard.
The default value is:
SPECIAL_CHARS = ("\t", "\n", "\u00a0", "…")
SINGLE_PROJECT
Neu in Version 3.8.
Redirects users directly to a project or component instead of showing
the dashboard. You can either set it to True
and in this case it only works in
case there is actually only single project in Weblate. Alternatively set
the project slug, and it will redirect unconditionally to this project.
Geändert in Version 3.11: The setting now also accepts a project slug, to force displaying that single project.
Beispiel:
SINGLE_PROJECT = "test"
SSH_EXTRA_ARGS
Neu in Version 4.9.
Allows to add custom parameters when Weblate is invoking SSH. This is 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 enable that using:
SSH_EXTRA_ARGS = "-oKexAlgorithms=+diffie-hellman-group1-sha1"
Hinweis
The string is evaluated by shell, so make sure to quote any whitespace and special characters.
Siehe auch
STATUS_URL
The URL where your Weblate instance reports its status.
SUGGESTION_CLEANUP_DAYS
Neu in Version 3.2.1.
Automatically deletes suggestions after a given number of days.
Defaults to None
, meaning no deletions.
UPDATE_LANGUAGES
Neu in Version 4.3.2.
Controls whether languages database should be updated when running database
migration and is enabled by default. This setting has no effect on invocation
of setuplang
.
Warnung
The languages display might become inconsistent with this. Weblate language definitions extend over time and it will not display language code for the defined languages.
Siehe auch
URL_PREFIX
This setting allows you to run Weblate under some path (otherwise it relies on being run from the webserver root).
Bemerkung
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
.
Hinweis
The prefix should start with a /
.
Beispiel:
URL_PREFIX = "/translations"
Bemerkung
This setting does not work with Django’s built-in server, you would have to
adjust urls.py
to contain this prefix.
VCS_BACKENDS
Configuration of available VCS backends.
Bemerkung
Weblate tries to use all supported back-ends you have the tools for.
Hinweis
You can limit choices or add custom VCS back-ends by using this.
VCS_BACKENDS = ("weblate.vcs.git.GitRepository",)
Siehe auch
VCS_CLONE_DEPTH
Neu in Version 3.10.2.
Configures how deep cloning of repositories Weblate should do.
Bemerkung
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 Erweiterungen), you might want to increase the depth or turn off shallow clones completely by setting this to 0.
Hinweis
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.GettextCustomizeAddon",
"weblate.addons.gettext.GettextAuthorComments",
"weblate.addons.cleanup.CleanupAddon",
"weblate.addons.consistency.LangaugeConsistencyAddon",
"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.json.JSONCustomizeAddon",
"weblate.addons.xml.XMLCustomizeAddon",
"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.yaml.YAMLCustomizeAddon",
"weblate.addons.cdn.CDNJSAddon",
# Add-on you want to include
"weblate.addons.example.ExampleAddon",
)
Bemerkung
Removing the add-on from the list does not uninstall it from the components. Weblate will crash in that case. Please uninstall add-on from all components prior to removing it from this list.
Siehe auch
WEBLATE_EXPORTERS
Neu in Version 4.2.
List of a available exporters offering downloading translations or glossaries in various file formats.
Siehe auch
WEBLATE_FORMATS
Neu in Version 3.0.
List of file formats available for use.
Bemerkung
The default list already has the common formats.
Siehe auch
WEBLATE_MACHINERY
Neu in Version 4.13.
List of machinery services available for use.
Siehe auch
WEBLATE_GPG_IDENTITY
Neu in Version 3.1.
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.
Siehe auch
WEBSITE_REQUIRED
Defines whether Projektseite has to be specified when creating a project. Turned on by default as that suits public server setups.
COMMENT_CLEANUP_DAYS
Neu in Version 3.6.
Löscht Kommentare nach einer bestimmten Anzahl von Tagen. Der Standardwert ist
None
, was bedeutet, dass überhaupt nicht gelöscht wird.