Konfiguracja¶
All settings are stored in settings.py
(as is usual for Django).
Informacja
After changing any of these settings, you need to restart Weblate - both WSGI and Celery processes.
In case it is run as mod_wsgi
, you need to restart Apache to reload the
configuration.
Zobacz także
Please also check Django’s documentation for parameters configuring Django itself.
AUDITLOG_EXPIRY¶
Nowe w wersji 3.6.
How many days Weblate should keep audit logs, which contain info about account activity.
Domyślnie 180 dni.
AUTH_LOCK_ATTEMPTS¶
Nowe w wersji 2.14.
Maximum number of failed authentication attempts before rate limiting is applied.
This is currently applied in the following locations:
Logins. Deletes the account password, preventing the user from signing in without requesting a new password.
Password resets. Prevents new e-mails from being sent, avoiding spamming users with too many password reset attempts.
Domyślna wartość 10.
Zobacz także
AUTO_UPDATE¶
Nowe w wersji 3.2.
Zmienione w wersji 3.11: The original on/off option was changed to differentiate which strings are accepted.
Updates all repositories on a daily basis.
Podpowiedź
Useful if you are not using Hooki powiadomień to update Weblate repositories automatically.
Informacja
On/off options exist in addition to string selection for backward compatibility.
Dostępne opcje:
"none"
Brak codziennych aktualizacji.
"zdalne"
równieżfałszywe
Tylko zdalne aktualizacje.
"pełne''
równieżPrawdziwe
Update remotes and merge working copy.
Informacja
This requires that Zadania w tle korzystające z Celery is working, and will take effect after it is restarted.
AVATAR_URL_PREFIX¶
Prefix for constructing avatar URLs as:
${AVATAR_URL_PREFIX}/avatar/${MAIL_HASH}?${PARAMS}
.
The following services are known to work:
- Gravatar (default), as per https://gravatar.com/
AVATAR_URL_PREFIX = 'https://www.gravatar.com/'
- Libravatar, zgodnie z https://www.libravatar.org/
AVATAR_URL_PREFIX = 'https://www.libravatar.org/'
Zobacz także
AUTH_TOKEN_VALID¶
Nowe w wersji 2.14.
How long the authentication token and temporary password from password reset e-mails is valid for. Set in number of seconds, defaulting to 172800 (2 days).
AUTH_PASSWORD_DAYS¶
Nowe w wersji 2.15.
How many days using the same password should be allowed.
Informacja
Password changes made prior to Weblate 2.15 will not be accounted for in this policy.
Domyślnie 180 dni.
AUTOFIX_LIST¶
List of automatic fixes to apply when saving a string.
Informacja
Provide a fully-qualified path to the Python class that implementing the autofixer interface.
Dostępne poprawki:
weblate.trans.autofixes.whitespace.SameBookendingWhitespace
Matches whitespace at the start and end of the string to the source.
weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis
Replaces trailing dots (…) if the source string has a corresponding ellipsis (…).
weblate.trans.autofixes.chars.RemoveZeroSpace
Removes zero-width space characters if the source does not contain any.
weblate.trans.autofixes.chars.RemoveControlChars
Removes control characters if the source does not contain any.
weblate.trans.autofixes.html.BleachHTML
Removes unsafe HTML markup from strings flagged as
safe-html
(see Niebezpieczny HTML).
You can select which ones to use:
AUTOFIX_LIST = (
"weblate.trans.autofixes.whitespace.SameBookendingWhitespace",
"weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis",
)
Zobacz także
BACKGROUND_TASKS¶
Nowe w wersji 4.5.2.
Defines how often lengthy maintenance tasks should be triggered for a component.
Right now this controls:
Dodatek Tłumaczenie automatyczne
Kontrole i korekty recalculation
Możliwe opcje:
monthly
(this is the default)weekly
daily
never
Informacja
Increasing the frequency is not recommended when Weblate contains thousands of components.
BASE_DIR¶
Base directory where Weblate sources are located. Used to derive several other paths by default:
Default value: Top level directory of Weblate sources.
BASIC_LANGUAGES¶
Nowe w wersji 4.4.
List of languages to offer users for starting new translation. When not specified built-in list is used which includes all commonly used languages, but without country specific variants.
This only limits non privileged users to add unwanted languages. The project admins are still presented with full selection of languages defined in Weblate.
Informacja
This does not define new languages for Weblate, it only filters existing ones in the database.
Przykład:
BASIC_LANGUAGES = {"cs", "it", "ja", "en"}
Zobacz także
CSP_SCRIPT_SRC, CSP_IMG_SRC, CSP_CONNECT_SRC, CSP_STYLE_SRC, CSP_FONT_SRC¶
Customize 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 empty list.
Przykład:
# Enable Cloudflare Javascript optimizations
CSP_SCRIPT_SRC = ["ajax.cloudflare.com"]
Zobacz także
Polityka bezpieczeństwa treści, Content Security Policy (CSP)
CHECK_LIST¶
List of quality checks to perform on a translation.
Informacja
Provide a fully-qualified path to the Python class implementing the check interface.
Adjust the list of checks to include ones relevant to you.
All built-in Kontrole jakości are turned on by default, from where you can change these settings. By default they are commented out in Przykładowa konfiguracja so that default values are used. New checks then carried out for each new Weblate version.
You can turn off all checks:
CHECK_LIST = ()
You can turn on only a few:
CHECK_LIST = (
"weblate.checks.chars.BeginNewlineCheck",
"weblate.checks.chars.EndNewlineCheck",
"weblate.checks.chars.MaxLengthCheck",
)
Informacja
Changing this setting only affects newly changed translations, existing checks
will still be stored in the database. To also apply changes to the stored translations, run
updatechecks
.
Zobacz także
COMMENT_CLEANUP_DAYS¶
Nowe w wersji 3.6.
Delete comments after a given number of days.
Defaults to None
, meaning no deletion at all.
COMMIT_PENDING_HOURS¶
Nowe w wersji 2.10.
Number of hours between committing pending changes by way of the background task.
CONTACT_FORM¶
Nowe w wersji 4.6.
Configures how e-mail from the contact form is being sent. Choose a configuration that matches your mail server configuration.
"reply-to"
The sender is used in as Reply-To, this is the default behaviour.
"from"
The sender is used in as From. Your mail server needs to allow sending such e-mails.
DATA_DIR¶
The folder Weblate stores all data in. It contains links to VCS repositories, a fulltext index and various configuration files for external tools.
Zwykle istnieją następujące podkatalogi:
home
Home directory used for invoking scripts.
ssh
Klucze SSH i konfiguracja.
static
Default location for static Django files, specified by
STATIC_ROOT
. See Obsługa plików statycznych.The Docker container uses a separate volume for this, see Woluminy kontenerów platformy Docker.
media
Default location for Django media files, specified by
MEDIA_ROOT
. Contains uploaded screenshots, see Kontekst wizualny dla ciągów.vcs
Repozytoria kontroli wersji dla tłumaczeń.
backups
Daily backup data, please check Zrzucone dane do kopii zapasowych for details.
celery
Dane harmonogramu Celery, patrz: Zadania w tle korzystające z Celery.
fonts
:User-uploaded fonts, see Zarządzanie czcionkami.
Informacja
This directory has to be writable by Weblate. Running it as uWSGI means
the www-data
user should have write access to it.
The easiest way to achieve this is to make the user the owner of the directory:
sudo chown www-data:www-data -R $DATA_DIR
Wartość domyślna to $BASE_DIR/data
.
DATABASE_BACKUP¶
Nowe w wersji 3.1.
Whether the database backups should be stored as plain text, compressed or skipped. The authorized values are:
"plain"
"compressed"
"none"
Zobacz także
DEFAULT_ACCESS_CONTROL¶
Nowe w wersji 3.3.
The default access control setting for new projects:
0
Public
1
Protected
100
Private
200
Custom
Use Custom if you are managing ACL manually, which means not relying on the internal Weblate management.
Zobacz także
DEFAULT_AUTO_WATCH¶
Nowe w wersji 4.5.
Configures whether Automatically watch projects on contribution
should be turned on for new users. Defaults to True
.
Zobacz także
DEFAULT_RESTRICTED_COMPONENT¶
Nowe w wersji 4.1.
Domyślna wartość ograniczenia komponentu.
Zobacz także
DEFAULT_ADD_MESSAGE, DEFAULT_ADDON_MESSAGE, DEFAULT_COMMIT_MESSAGE, DEFAULT_DELETE_MESSAGE, DEFAULT_MERGE_MESSAGE¶
Default commit messages for different operations, please check Konfiguracja komponentu for details.
DEFAULT_ADDONS¶
Default addons to install on every created component.
Informacja
This setting affects only newly created components.
Przykład:
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",
},
}
Zobacz także
DEFAULT_COMMITER_EMAIL¶
Nowe w wersji 2.4.
Committer e-mail address defaulting to noreply@weblate.org
.
Zobacz także
DEFAULT_LANGUAGE¶
Nowe w wersji 4.3.2.
Default source language to use for example in Język źródłowy.
Defaults to en. The matching language object needs to exist in the database.
Zobacz także
DEFAULT_MERGE_STYLE¶
Nowe w wersji 3.4.
Merge style for any new components.
rebase - domyślne
merge
Zobacz także
DEFAULT_TRANSLATION_PROPAGATION¶
Nowe w wersji 2.5.
Default setting for translation propagation, defaults to True
.
Zobacz także
DEFAULT_PULL_MESSAGE¶
Title for new pull requests,
defaulting to 'Update from Weblate'
.
ENABLE_AVATARS¶
Whether to turn on Gravatar-based avatars for users. By default this is on.
Avatars are fetched and cached on the server, lowering the risk of leaking private info, speeding up the user experience.
Zobacz także
ENABLE_HTTPS¶
Whether to send links to Weblate as HTTPS or HTTP. This setting affects sent e-mails and generated absolute URLs.
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 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.
GITLAB_CREDENTIALS¶
Nowe w wersji 4.3.
List for credentials for GitLab servers.
Podpowiedź
Use this in case you want Weblate to interact with more of them, for single
GitLab endpoint stick with GITLAB_USERNAME
and GITLAB_TOKEN
.
GITLAB_CREDENTIALS = {
"gitlab.com": {
"username": "weblate",
"token": "your-api-token",
},
"gitlab.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
GITLAB_TOKEN¶
Nowe w wersji 4.3.
Osobisty token dostępu GitLab używany do wykonywania wywołań API w celu aktualizacji tłumaczeń.
Zobacz także
GITHUB_CREDENTIALS¶
Nowe w wersji 4.3.
List for credentials for GitHub servers.
Podpowiedź
Use this in case you want Weblate to interact with more of them, for single
GitHub endpoint stick with GITHUB_USERNAME
and GITHUB_TOKEN
.
GITHUB_CREDENTIALS = {
"api.github.com": {
"username": "weblate",
"token": "your-api-token",
},
"github.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
GITHUB_TOKEN¶
Nowe w wersji 4.3.
GitHub personal access token used to make API calls to send pull requests for translation updates.
Zobacz także
GITHUB_CREDENTIALS
,
GitHub,
Creating a GitHub personal access token
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.
Informacja
This is turned on by default.
HIDE_VERSION¶
Nowe w wersji 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.
Informacja
Ta wartość jest domyślnie wyłączona.
IP_BEHIND_REVERSE_PROXY¶
Nowe w wersji 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
.
Ostrzeżenie
Ensure you are actually using a reverse proxy and that it sets this header, otherwise users will be able to fake the IP address.
Informacja
This is not on by default.
IP_PROXY_HEADER¶
Nowe w wersji 2.14.
Indicates which header Weblate should obtain the IP address from when
IP_BEHIND_REVERSE_PROXY
is turned on.
Domyślna wartość to HTTP_X_FORWARDED_FOR
.
IP_PROXY_OFFSET¶
Nowe w wersji 2.14.
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: a, b, client-ip
) and you can configure
which address from the header is used as client IP address here.
Ostrzeżenie
Setting this affects the security of your installation, you should only configure it to use trusted proxies for determining IP address.
Wartość domyślna to 0.
LEGAL_URL¶
Nowe w wersji 3.5.
URL where your Weblate instance shows its legal documents.
Podpowiedź
Useful if you host your legal documents outside Weblate for embedding them inside Weblate, please check Informacje prawne for details.
Przykład:
LEGAL_URL = "https://weblate.org/terms/"
Zobacz także
LICENSE_EXTRA¶
Additional licenses to include in the license choices.
Informacja
Each license definition should be tuple of its short name, a long name and an URL.
Na przykład:
LICENSE_EXTRA = [
(
"AGPL-3.0",
"GNU Affero General Public License v3.0",
"https://www.gnu.org/licenses/agpl-3.0-standalone.html",
),
]
LICENSE_FILTER¶
Zmienione w wersji 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.
Informacja
This filter uses the short license names.
Na przykład:
LICENSE_FILTER = {"AGPL-3.0", "GPL-3.0-or-later"}
Following disables the license alert:
LICENSE_FILTER = set()
Zobacz także
LICENSE_REQUIRED¶
Defines whether the license attribute in Konfiguracja komponentu is required.
Informacja
Ta opcja jest domyślnie wyłączona.
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.
Podpowiedź
Set this to False
to allow longer translations (up to 10.000 characters) irrespective of source string length.
Informacja
Wartość domyślna to True
.
LOCALIZE_CDN_URL i LOCALIZE_CDN_PATH¶
These settings configure the Lokalizacja JavaScript CDN addon.
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
.
Podpowiedź
On Hosted Weblate, this uses https://weblate-cdn.com/
.
Zobacz także
LOGIN_REQUIRED_URLS¶
A list of URLs you want to require logging into. (Besides the standard rules built into Weblate).
Podpowiedź
This allows you to password protect a whole installation using:
LOGIN_REQUIRED_URLS = (r"/(.*)$",)
REST_FRAMEWORK["DEFAULT_PERMISSION_CLASSES"] = [
"rest_framework.permissions.IsAuthenticated"
]
Podpowiedź
It is desirable to lock down API access as well, as shown in the above example.
Zobacz także
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.
Informacja
This integration does not support the Matomo Tag Manager.
Zobacz także
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.
Podpowiedź
This integration does not support the Matomo Tag Manager.
Na przykład:
MATOMO_SITE_ID = 1
MATOMO_URL = "https://example.matomo.cloud/"
Zobacz także
MT_SERVICES¶
Zmienione w wersji 3.0: The setting was renamed from MACHINE_TRANSLATION_SERVICES
to
MT_SERVICES
to be consistent with other machine translation settings.
List of enabled machine translation services to use.
Informacja
Many of the services need additional configuration like API keys, please check their documentation Tłumaczenie maszynowe for more details.
Podpowiedź
W przypadku korzystania z kontenera Dockera ta konfiguracja jest automatycznie generowana na podstawie dostarczonych kluczy API, patrz Ustawienia tłumaczenia maszynowego.
MT_SERVICES = (
"weblate.machinery.apertium.ApertiumAPYTranslation",
"weblate.machinery.deepl.DeepLTranslation",
"weblate.machinery.glosbe.GlosbeTranslation",
"weblate.machinery.google.GoogleTranslation",
"weblate.machinery.libretranslate.LibreTranslateTranslation",
"weblate.machinery.microsoft.MicrosoftCognitiveTranslation",
"weblate.machinery.microsoftterminology.MicrosoftTerminologyService",
"weblate.machinery.mymemory.MyMemoryTranslation",
"weblate.machinery.tmserver.AmagamaTranslation",
"weblate.machinery.tmserver.TMServerTranslation",
"weblate.machinery.yandex.YandexTranslation",
"weblate.machinery.weblatetm.WeblateTranslation",
"weblate.machinery.saptranslationhub.SAPTranslationHub",
"weblate.memory.machine.WeblateMemory",
)
Zobacz także
MT_APERTIUM_APY¶
URL of the Apertium-APy server, https://wiki.apertium.org/wiki/Apertium-apy
Zobacz także
MT_BAIDU_ID¶
Client ID for the Baidu Zhiyun API, you can register at https://api.fanyi.baidu.com/api/trans/product/index
MT_BAIDU_SECRET¶
Client secret for the Baidu Zhiyun API, you can register at https://api.fanyi.baidu.com/api/trans/product/index
MT_DEEPL_API_URL¶
Zmienione w wersji 4.7: The full API URL is now configured to allow using the free plan. Before, it was only possible to
configure the API version using MT_DEEPL_API_VERSION
.
API URL to use with the DeepL service. At the time of writing, there is the v1 API as well as a free and a paid version of the v2 API.
https://api.deepl.com/v2/
(default in Weblate)Is meant for API usage on the paid plan, and the subscription is usage-based.
https://api-free.deepl.com/v2/
Is meant for API usage on the free plan, and the subscription is usage-based.
https://api.deepl.com/v1/
Is meant for CAT tools and is usable with a per-user subscription.
Previously Weblate was classified as a CAT tool by DeepL, so it was supposed to use the v1 API, but now is supposed to use the v2 API. Therefore it defaults to v2, and you can change it to v1 in case you have an existing CAT subscription and want Weblate to use that.
The easiest way to find out which one to use is to open an URL like the following in your browser:
https://api.deepl.com/v2/translate?text=Hello&target_lang=FR&auth_key=XXX
Replace the XXX with your auth_key. If you receive a JSON object which contains „Bonjour”, you have the correct URL; if not, try the other three.
Zobacz także
MT_DEEPL_KEY¶
API key for the DeepL API, you can register at https://www.deepl.com/pro.html
Zobacz także
MT_LIBRETRANSLATE_API_URL¶
Nowe w wersji 4.7.1.
API URL for the LibreTranslate instance to use.
https://libretranslate.com/
(official public instance)Requires an API key to use outside of the website.
Mirrors are documented on the LibreTranslate GitHub repository, some of which can be used without authentication:
https://github.com/LibreTranslate/LibreTranslate#user-content-mirrors
Zobacz także
LibreTranslate, Tłumaczenie maszynowe, Automatyczne sugestie
MT_LIBRETRANSLATE_KEY¶
Nowe w wersji 4.7.1.
API key for the LibreTranslate instance specified in MT_LIBRETRANSLATE_API_URL.
Zobacz także
LibreTranslate, Tłumaczenie maszynowe, Automatyczne sugestie
MT_GOOGLE_KEY¶
API key for Google Translate API v2, you can register at https://cloud.google.com/translate/docs
Zobacz także
Google Translate, Tłumaczenie maszynowe, Automatyczne sugestie
MT_GOOGLE_CREDENTIALS¶
API v3 JSON credentials file obtained in the Google cloud console. Please provide a full OS path. Credentials are per service-account affiliated with certain project. Please check https://cloud.google.com/docs/authentication/getting-started for more details.
MT_GOOGLE_PROJECT¶
Google Cloud API v3 project id with activated translation service and billing activated. Please check https://cloud.google.com/appengine/docs/standard/nodejs/building-app/creating-project for more details
MT_GOOGLE_LOCATION¶
API v3 Google Cloud App Engine may be specific to a location.
Change accordingly if the default global
fallback does not work for you.
Please check https://cloud.google.com/appengine/docs/locations for more details
Zobacz także
MT_MICROSOFT_BASE_URL¶
Region base URL domain as defined in the „Base URLs” section.
Defaults to api.cognitive.microsofttranslator.com
for Azure Global.
For Azure China, please use api.translator.azure.cn
.
MT_MICROSOFT_COGNITIVE_KEY¶
Client key for the Microsoft Cognitive Services Translator API.
MT_MICROSOFT_REGION¶
Region prefix as defined in the „Authenticating with a Multi-service resource” section.
MT_MICROSOFT_ENDPOINT_URL¶
Region endpoint URL domain for access token as defined in the „Authenticating with an access token” section.
Defaults to api.cognitive.microsoft.com
for Azure Global.
For Azure China, please use your endpoint from the Azure Portal.
MT_MODERNMT_URL¶
URL of ModernMT. It defaults to https://api.modernmt.com/
for the cloud
service.
Zobacz także
MT_MYMEMORY_EMAIL¶
MyMemory identification e-mail address. It permits 1000 requests per day.
MT_MYMEMORY_KEY¶
MyMemory access key for private translation memory, use it with MT_MYMEMORY_USER
.
MT_MYMEMORY_USER¶
MyMemory user ID for private translation memory, use it with MT_MYMEMORY_KEY
.
MT_NETEASE_KEY¶
App key for NetEase Sight API, you can register at https://sight.youdao.com/
MT_NETEASE_SECRET¶
App secret for the NetEase Sight API, you can register at https://sight.youdao.com/
MT_TMSERVER¶
URL, pod którym działa tmserver.
Zobacz także
tmserver, Tłumaczenie maszynowe, Automatyczne sugestie, tmserver
MT_YANDEX_KEY¶
API key for the Yandex Translate API, you can register at https://yandex.com/dev/translate/
Zobacz także
Yandex Translate, Tłumaczenie maszynowe, Automatyczne sugestie
MT_YOUDAO_ID¶
Client ID for the Youdao Zhiyun API, you can register at https://ai.youdao.com/product-fanyi-text.s.
MT_YOUDAO_SECRET¶
Client secret for the Youdao Zhiyun API, you can register at https://ai.youdao.com/product-fanyi-text.s.
MT_SAP_BASE_URL¶
API URL to the SAP Translation Hub service.
Zobacz także
SAP Translation Hub, Tłumaczenie maszynowe, Automatyczne sugestie
MT_SAP_SANDBOX_APIKEY¶
API key for sandbox API usage
Zobacz także
SAP Translation Hub, Tłumaczenie maszynowe, Automatyczne sugestie
MT_SAP_USERNAME¶
Twoja nazwa użytkownika SAP
Zobacz także
SAP Translation Hub, Tłumaczenie maszynowe, Automatyczne sugestie
MT_SAP_PASSWORD¶
Twoje hasło SAP
Zobacz także
SAP Translation Hub, Tłumaczenie maszynowe, Automatyczne sugestie
MT_SAP_USE_MT¶
Whether to also use machine translation services, in addition to the term database.
Possible values: True
or False
Zobacz także
SAP Translation Hub, Tłumaczenie maszynowe, Automatyczne sugestie
NEARBY_MESSAGES¶
How many strings to show around the currently translated string. This is just a default value, users can adjust this in Profil użytkownika.
DEFAULT_PAGE_LIMIT¶
Nowe w wersji 4.7.
Default number of elements to display when pagination is active.
PAGURE_CREDENTIALS¶
Nowe w wersji 4.3.2.
List for credentials for Pagure servers.
Podpowiedź
Use this in case you want Weblate to interact with more of them, for single
Pagure endpoint stick with PAGURE_USERNAME
and PAGURE_TOKEN
.
PAGURE_CREDENTIALS = {
"pagure.io": {
"username": "weblate",
"token": "your-api-token",
},
"pagure.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
PAGURE_USERNAME¶
Nowe w wersji 4.3.2.
Nazwa użytkownika Pagure używana do wysyłania żądań scalenia w celu aktualizacji tłumaczeń.
Zobacz także
PAGURE_TOKEN¶
Nowe w wersji 4.3.2.
Osobisty token dostępu Pagure używany do wykonywania połączeń API podczas aktualizacji tłumaczeń.
Zobacz także
PRIVACY_URL¶
Nowe w wersji 4.8.1.
URL where your Weblate instance shows its privacy policy.
Podpowiedź
Useful if you host your legal documents outside Weblate for embedding them inside Weblate, please check Informacje prawne for details.
Przykład:
PRIVACY_URL = "https://weblate.org/terms/"
Zobacz także
RATELIMIT_ATTEMPTS¶
Nowe w wersji 3.2.
Maximum number of authentication attempts before rate limiting is applied.
Wartość domyślna to 5.
Zobacz także
RATELIMIT_WINDOW¶
Nowe w wersji 3.2.
How long authentication is accepted after rate limiting applies.
An amount of seconds defaulting to 300 (5 minutes).
Zobacz także
Ograniczenie szybkości,
RATELIMIT_ATTEMPTS
,
RATELIMIT_LOCKOUT
RATELIMIT_LOCKOUT¶
Nowe w wersji 3.2.
How long authentication is locked after rate limiting applies.
An amount of seconds defaulting to 600 (10 minutes).
Zobacz także
Ograniczenie szybkości,
RATELIMIT_ATTEMPTS
,
RATELIMIT_WINDOW
REGISTRATION_ALLOW_BACKENDS¶
Nowe w wersji 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.
Przykład:
REGISTRATION_ALLOW_BACKENDS = ["azuread-oauth2", "azuread-tenant-oauth2"]
Podpowiedź
The backend names match names used in URL for authentication.
Zobacz także
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:
Rejestracja nowego konta.
Odzyskanie hasła.
Dodanie e-maila do konta.
Contact form for users that are not signed in.
REGISTRATION_EMAIL_MATCH¶
Nowe w wersji 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
).
Informacja
If using third-party authentication methods such as Uwierzytelnianie LDAP, it just hides the registration form, but new users might still be able to sign in and create accounts.
Zobacz także
REGISTRATION_ALLOW_BACKENDS
,
REGISTRATION_EMAIL_MATCH
,
Uwierzytelnienie
REPOSITORY_ALERT_THRESHOLD¶
Nowe w wersji 4.0.2.
Threshold for triggering an alert for outdated repositories, or ones that contain too many changes. Defaults to 25.
Zobacz także
REQUIRE_LOGIN¶
Nowe w wersji 4.1.
This enables LOGIN_REQUIRED_URLS
and configures REST framework to
require authentication for all API endpoints.
Informacja
This is implemented in the Przykładowa konfiguracja. For Docker, use
WEBLATE_REQUIRE_LOGIN
.
SESSION_COOKIE_AGE_AUTHENTICATED¶
Nowe w wersji 4.3.
Set session expiry for authenticated users. This complements
SESSION_COOKIE_AGE
which is used for unauthenticated users.
Zobacz także
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.
Przykłady:
# Production site with domain name
SITE_DOMAIN = "weblate.example.com"
# Local development with IP address and port
SITE_DOMAIN = "127.0.0.1:8000"
Informacja
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
.
Podpowiedź
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, Klawiatura wizualna.
Wartość domyślna to:
SPECIAL_CHARS = ("\t", "\n", "\u00a0", "…")
SINGLE_PROJECT¶
Nowe w wersji 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.
Zmienione w wersji 3.11: The setting now also accepts a project slug, to force displaying that single project.
Przykład:
SINGLE_PROJECT = "test"
STATUS_URL¶
The URL where your Weblate instance reports its status.
SUGGESTION_CLEANUP_DAYS¶
Nowe w wersji 3.2.1.
Automatically deletes suggestions after a given number of days.
Defaults to None
, meaning no deletions.
UPDATE_LANGUAGES¶
Nowe w wersji 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
.
Zobacz także
URL_PREFIX¶
This setting allows you to run Weblate under some path (otherwise it relies on being run from the webserver root).
Informacja
Aby użyć tego ustawienia, musisz również skonfigurować serwer tak, aby usuwał ten prefiks. Na przykład w przypadku WSGI można to osiągnąć, ustawiając `` WSGIScriptAlias``.
Podpowiedź
Prefiks powinien zaczynać się od /
.
Przykład:
URL_PREFIX = "/translations"
Informacja
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.
Informacja
Weblate tries to use all supported back-ends you have the tools for.
Podpowiedź
You can limit choices or add custom VCS back-ends by using this.
VCS_BACKENDS = ("weblate.vcs.git.GitRepository",)
Zobacz także
VCS_CLONE_DEPTH¶
Nowe w wersji 3.10.2.
Configures how deep cloning of repositories Weblate should do.
Informacja
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 Dodatki), you might want to increase the depth or turn off shallow clones completely by setting this to 0.
Podpowiedź
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¶
Lista dodatków dostępnych do użycia. Aby z nich skorzystać, muszą być włączone dla danego komponentu tłumaczeniowego. Domyślnie obejmuje to wszystkie wbudowane dodatki, podczas rozszerzania listy prawdopodobnie będziesz chciał pozostawić włączone istniejące, na przykład:
WEBLATE_ADDONS = (
# Built-in addons
"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.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",
)
Informacja
Removing the addon from the list does not uninstall it from the components. Weblate will crash in that case. Please uninstall addon from all components prior to removing it from this list.
Zobacz także
WEBLATE_EXPORTERS¶
Nowe w wersji 4.2.
Lista istniejących eksporterów, oferujących pobieranie tłumaczeń i słowników w różnych formatach.
Zobacz także
:ref:»formaty»
WEBLATE_FORMATS¶
Nowe w wersji 3.0.
Lista formatów plików dostępnych do użycia.
Informacja
Domyślna lista ma już wspólne formaty.
Zobacz także
:ref:»formaty»
WEBLATE_GPG_IDENTITY¶
Nowe w wersji 3.1.
Tożsamość używana przez Weblate do podpisywania commitów w Git, na przykład:
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.
Zobacz także
WEBSITE_REQUIRED¶
Defines whether Strona internetowa projektu has to be specified when creating a project. Turned on by default as that suits public server setups.