Configuración
All settings are stored in settings.py
(as is usual for Django).
Nota
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.
Ver también
Please also check Django’s documentation for parameters configuring Django itself.
ANONYMOUS_USER_NAME
El nombre de usuario de los usuarios sin cuenta.
Ver también
AUDITLOG_EXPIRY
Nuevo en la versión 3.6.
How many days Weblate should keep audit logs, which contain info about account activity.
El valor predeterminado es de 180 días.
AUTH_LOCK_ATTEMPTS
Nuevo en la versión 2.14.
Maximum number of failed authentication attempts before rate limiting is applied.
This is currently applied in the following locations:
Sign in. Deletes the account password, preventing the user from signing in without requesting a new password.
Password reset. Prevents new e-mails from being sent, avoiding spamming users with too many password reset attempts.
El valor predeterminado es de 10.
Ver también
AUTO_UPDATE
Nuevo en la versión 3.2.
Distinto en la versión 3.11: The original on/off option was changed to differentiate which strings are accepted.
Actualiza todos los repositorios diariamente.
Consejo
Useful if you are not using Actuadores de notificación to update Weblate repositories automatically.
Nota
On/off options exist in addition to string selection for backward compatibility.
Las opciones son:
"none"
No daily updates.
"remote"
alsoFalse
Actualiza los remotos solamente.
"full"
alsoTrue
Actualiza los remotos y fusiona la copia de trabajo.
Nota
This requires that Tareas en segundo plano con 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, as per https://www.libravatar.org/
AVATAR_URL_PREFIX = 'https://www.libravatar.org/'
Ver también
AUTH_TOKEN_VALID
Nuevo en la versión 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
Nuevo en la versión 2.15.
Por cuántos días debe permitirse el uso de la misma contraseña.
Nota
Password changes made prior to Weblate 2.15 will not be accounted for in this policy.
El valor predeterminado es de 180 días.
AUTOFIX_LIST
Lista de correcciones automáticas que aplicar al guardar una cadena.
Nota
Provide a fully-qualified path to the Python class that implementing the autofixer interface.
Correcciones disponibles:
weblate.trans.autofixes.whitespace.SameBookendingWhitespace
Matches whitespace at the start and end of the string to the source.
weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis
Sustituye tres puntos al final (…) si la cadena de origen incluye en su lugar puntos suspensivos (…).
weblate.trans.autofixes.chars.RemoveZeroSpace
Quita caracteres espaciadores de anchura cero si la cadena de origen no los contiene.
weblate.trans.autofixes.chars.RemoveControlChars
Quita caracteres de control si la cadena de origen no los contiene.
weblate.trans.autofixes.html.BleachHTML
Removes unsafe HTML markup from strings flagged as
safe-html
(see HTML inseguro).
Puede seleccionar cuáles utilizar:
AUTOFIX_LIST = (
"weblate.trans.autofixes.whitespace.SameBookendingWhitespace",
"weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis",
)
BACKGROUND_TASKS
Nuevo en la versión 4.5.2.
Defines how often lengthy maintenance tasks should be triggered for a component.
Right now this controls:
Traducción automática add-on
Comprobaciones y correcciones recalculation
Elecciones posibles:
monthly
(valor predeterminado)weekly
daily
never
Nota
No es recomendable aumentar la frecuencia cuando Weblate contiene miles de componentes.
BASIC_LANGUAGES
Nuevo en la versión 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.
Nota
Esto no define idiomas nuevos en Weblate, sino que se limita a filtrar los que ya existen en la base de datos.
Ejemplo:
BASIC_LANGUAGES = {"cs", "it", "ja", "en"}
Ver también
BORG_EXTRA_ARGS
Nuevo en la versión 4.9.
You can pass additional arguments to borg create when built-in backups are triggered.
Ejemplo:
BORG_EXTRA_ARGS = ["--exclude", "vcs/"]
Ver también
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.
Ejemplo:
# Enable Cloudflare Javascript optimizations
CSP_SCRIPT_SRC = ["ajax.cloudflare.com"]
CHECK_LIST
Lista de comprobaciones de calidad que ejecutar en una traducción.
Nota
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 Comprobaciones de calidad are turned on by default, from where you can change these settings. By default they are commented out in Configuración de muestra so that default values are used. New checks then carried out for each new Weblate version.
Puede desactivar todas las comprobaciones:
CHECK_LIST = ()
Puede activar solo algunas:
CHECK_LIST = (
"weblate.checks.chars.BeginNewlineCheck",
"weblate.checks.chars.EndNewlineCheck",
"weblate.checks.chars.MaxLengthCheck",
)
Nota
Cambiar esta opción afectará solo a las traducciones que se modifiquen en adelante; las existentes permanecerán almacenadas en la base de datos. Para aplicar los cambios también en las traducciones almacenadas, ejecute updatechecks
.
COMMIT_PENDING_HOURS
Nuevo en la versión 2.10.
Number of hours between committing pending changes by way of the background task.
CONTACT_FORM
Nuevo en la versión 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.
A menudo existen los subdirectorios siguientes:
home
Directorio de inicio utilizado para invocar secuencias de órdenes.
ssh
Claves SSH y su configuración.
static
Default location for static Django files, specified by
STATIC_ROOT
. See Serving static files.The Docker container uses a separate volume for this, see Volúmenes de contenedores Docker.
media
Default location for Django media files, specified by
MEDIA_ROOT
. Contains uploaded screenshots, see Contexto visual para cadenas.vcs
Version control repositories for translations.
backups
Daily backup data, please check Datos volcados para las copias de respaldo for details.
celery
Celery scheduler data, see Tareas en segundo plano con Celery.
fonts
:User-uploaded fonts, see Gestionar tipos de letra.
Nota
Weblate necesita ser capaz de escribir en este directorio. Ejecutarlo como uWSGI implica que el usuario www-data
debe tener privilegios de escritura aquí.
La manera más sencilla de lograrlo es hacer que el usuario sea propietario del directorio:
sudo chown www-data:www-data -R $DATA_DIR
Defaults to /home/weblate/data
, but it is expected to be configured.
DATABASE_BACKUP
Nuevo en la versión 3.1.
Define si las copias de respaldo de la base de datos deben almacenarse como texto sencillo, comprimidas u omitirse. Los valores autorizados son:
"plain"
"compressed"
"none"
Ver también
DEFAULT_ACCESS_CONTROL
Nuevo en la versión 3.3.
La configuración de control de acceso predeterminada para proyectos nuevos:
0
Público
1
Protegido
100
Privado
200
Personalizado
Use Custom if you are managing ACL manually, which means not relying on the internal Weblate management.
Ver también
DEFAULT_AUTO_WATCH
Nuevo en la versión 4.5.
Configures whether Automatically watch projects on contribution
should be turned on for new users. Defaults to True
.
Ver también
DEFAULT_RESTRICTED_COMPONENT
Nuevo en la versión 4.1.
El valor predeterminado para la restricción de componentes.
Ver también
DEFAULT_ADD_MESSAGE, DEFAULT_ADDON_MESSAGE, DEFAULT_COMMIT_MESSAGE, DEFAULT_DELETE_MESSAGE, DEFAULT_MERGE_MESSAGE
Default commit messages for different operations, please check Configuración de componentes for details.
DEFAULT_ADDONS
Default add-ons to install on every created component.
Nota
Esta configuración solo surte efecto en los componentes nuevos.
Ejemplo:
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",
},
}
Ver también
DEFAULT_COMMITER_EMAIL
Nuevo en la versión 2.4.
Committer e-mail address defaulting to noreply@weblate.org
.
Ver también
DEFAULT_COMMITER_NAME
Nuevo en la versión 2.4.
El nombre del consignante, cuyo valor predeterminado es Weblate
.
Ver también
DEFAULT_LANGUAGE
Nuevo en la versión 4.3.2.
Default source language to use for example in Idioma del código fuente.
Defaults to en. The matching language object needs to exist in the database.
Ver también
DEFAULT_MERGE_STYLE
Nuevo en la versión 3.4.
Estilo de fusión para cualesquier componentes nuevos.
rebase - default
merge
Ver también
DEFAULT_TRANSLATION_PROPAGATION
Nuevo en la versión 2.5.
Default setting for translation propagation, defaults to True
.
DEFAULT_PULL_MESSAGE
Configures the default title and message for pull requests.
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.
Ver también
ENABLE_HOOKS
Whether to enable anonymous remote hooks.
Ver también
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.
GET_HELP_URL
Nuevo en la versión 4.5.2.
URL en el que pueden encontrarse recursos de ayuda para su instalación de Weblate.
GITEA_CREDENTIALS
Nuevo en la versión 4.12.
List for credentials for Gitea servers.
Consejo
Use this in case you want Weblate to interact with more of them, for single
Gitea endpoint stick with GITEA_USERNAME
and GITEA_TOKEN
.
GITEA_CREDENTIALS = {
"try.gitea.io": {
"username": "weblate",
"token": "your-api-token",
},
"gitea.example.com": {
"username": "weblate",
"token": "another-api-token",
},
}
GITEA_USERNAME
Nuevo en la versión 4.12.
Gitea username used to send pull requests for translation updates.
Ver también
GITEA_TOKEN
Nuevo en la versión 4.12.
Gitea personal access token used to make API calls to send pull requests for translation updates.
GITLAB_CREDENTIALS
Nuevo en la versión 4.3.
List for credentials for GitLab servers.
Consejo
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_USERNAME
GitLab username used to send merge requests for translation updates.
Ver también
GITLAB_TOKEN
Nuevo en la versión 4.3.
GitLab personal access token used to make API calls to send merge requests for translation updates.
GITHUB_CREDENTIALS
Nuevo en la versión 4.3.
List for credentials for GitHub servers.
Consejo
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_USERNAME
GitHub username used to send pull requests for translation updates.
Ver también
GITHUB_TOKEN
Nuevo en la versión 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.
Nota
This is turned on by default.
HIDE_VERSION
Nuevo en la versión 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.
Nota
This is turned off by default.
INTERLEDGER_PAYMENT_POINTERS
Nuevo en la versión 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.
Consejo
The default value lets users fund Weblate itself.
IP_BEHIND_REVERSE_PROXY
Nuevo en la versión 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
.
Advertencia
Ensure you are actually using a reverse proxy and that it sets this header, otherwise users will be able to fake the IP address.
Nota
This is not on by default.
Ver también
Running behind reverse proxy,
Rate limiting,
IP_PROXY_HEADER
,
IP_PROXY_OFFSET
IP_PROXY_HEADER
Nuevo en la versión 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
Nuevo en la versión 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.
Advertencia
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_URL
Nuevo en la versión 3.5.
URL where your Weblate instance shows its legal documents.
Consejo
Useful if you host your legal documents outside Weblate for embedding them inside Weblate, please check Información legal for details.
Ejemplo:
LEGAL_URL = "https://weblate.org/terms/"
Ver también
LICENSE_EXTRA
Additional licenses to include in the license choices.
Nota
Each license definition should be tuple of its short name, a long name and an URL.
Por ejemplo:
LICENSE_EXTRA = [
(
"AGPL-3.0",
"GNU Affero General Public License v3.0",
"https://www.gnu.org/licenses/agpl-3.0-standalone.html",
),
]
LICENSE_FILTER
Distinto en la versión 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.
Nota
This filter uses the short license names.
Por ejemplo:
LICENSE_FILTER = {"AGPL-3.0", "GPL-3.0-or-later"}
Following disables the license alert:
LICENSE_FILTER = set()
Ver también
LICENSE_REQUIRED
Defines whether the license attribute in Configuración de componentes is required.
Nota
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.
Consejo
Set this to False
to allow longer translations (up to 10,000 characters) irrespective of source string length.
Nota
Defaults to True
.
LOCALIZE_CDN_URL y LOCALIZE_CDN_PATH
These settings configure the CDN de regionalización de JavaScript 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
.
Consejo
On Hosted Weblate, this uses https://weblate-cdn.com/
.
Ver también
LOGIN_REQUIRED_URLS
A list of URLs you want to require signing in. (Besides the standard rules built into Weblate).
Consejo
Esto le permite proteger con contraseña una instalación completa a través de:
LOGIN_REQUIRED_URLS = (r"/(.*)$",)
REST_FRAMEWORK["DEFAULT_PERMISSION_CLASSES"] = [
"rest_framework.permissions.IsAuthenticated"
]
Consejo
It is desirable to lock down API access as well, as shown in the above example.
Ver también
LOGIN_REQUIRED_URLS_EXCEPTIONS
List of exceptions for LOGIN_REQUIRED_URLS
.
If not specified, users are allowed to access the sign in page.
Algunas de las excepciones que quizá quiera incluir:
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
Identificador de un sitio en Matomo (antes Piwik) al que quiere realizar seguimiento.
Nota
Esta integración no admite el gestor de etiquetas de Matomo.
Ver también
MATOMO_URL
URL completo (incluida la barra al final) de una instalación de Matomo (antes Piwik) que quiera utilizar para hacer seguimiento del uso de Weblate. Visite <https://matomo.org/> para obtener más información.
Consejo
Esta integración no admite el gestor de etiquetas de Matomo.
Por ejemplo:
MATOMO_SITE_ID = 1
MATOMO_URL = "https://example.matomo.cloud/"
Ver también
NEARBY_MESSAGES
How many strings to show around the currently translated string. This is just a default value, users can adjust this in Perfil de usuario.
DEFAULT_PAGE_LIMIT
Nuevo en la versión 4.7.
Default number of elements to display when pagination is active.
PAGURE_CREDENTIALS
Nuevo en la versión 4.3.2.
List for credentials for Pagure servers.
Consejo
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
Nuevo en la versión 4.3.2.
Pagure username used to send merge requests for translation updates.
Ver también
PAGURE_TOKEN
Nuevo en la versión 4.3.2.
Pagure personal access token used to make API calls to send merge requests for translation updates.
Ver también
PAGURE_CREDENTIALS
,
Solicitudes de fusión de Pagure,
Pagure API
PRIVACY_URL
Nuevo en la versión 4.8.1.
URL where your Weblate instance shows its privacy policy.
Consejo
Useful if you host your legal documents outside Weblate for embedding them inside Weblate, please check Información legal for details.
Ejemplo:
PRIVACY_URL = "https://weblate.org/terms/"
Ver también
PROJECT_BACKUP_KEEP_COUNT
Nuevo en la versión 4.14.
Defines how many backups per project are kept on the server. It defaults to 3.
Ver también
PROJECT_BACKUP_KEEP_DAYS
Nuevo en la versión 4.14.
Defines how long the project backups will be kept on the server. Defaults to 30 days.
Ver también
RATELIMIT_ATTEMPTS
Nuevo en la versión 3.2.
Maximum number of authentication attempts before rate limiting is applied.
Defaults to 5.
Ver también
RATELIMIT_WINDOW
Nuevo en la versión 3.2.
How long authentication is accepted after rate limiting applies.
An amount of seconds defaulting to 300 (5 minutes).
Ver también
RATELIMIT_LOCKOUT
Nuevo en la versión 3.2.
How long authentication is locked after rate limiting applies.
An amount of seconds defaulting to 600 (10 minutes).
Ver también
REGISTRATION_ALLOW_BACKENDS
Nuevo en la versión 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.
Ejemplo:
REGISTRATION_ALLOW_BACKENDS = ["azuread-oauth2", "azuread-tenant-oauth2"]
Consejo
The backend names match names used in URL for authentication.
Ver también
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:
Registro de cuentas nuevas.
Recuperación de contraseñas.
Adding e-mail to an account.
Formulario de contacto para usuarios que no han accedido a su cuenta.
REGISTRATION_EMAIL_MATCH
Nuevo en la versión 2.17.
Le permite filtrar cuáles direcciones de correo pueden utilizarse para registrar una cuenta.
Defaults to .*
, which allows any e-mail address to be registered.
Puede utilizarlo para restringir el registro de un dominio de correo electrónico:
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
).
Nota
Si se utilizan métodos de autenticación de terceros tales como Autenticación LDAP, tan solo oculta el formulario de registro, pero usuarios nuevos podrán aún acceder y crear cuentas.
Ver también
REGISTRATION_ALLOW_BACKENDS
,
REGISTRATION_EMAIL_MATCH
,
Autenticación
REPOSITORY_ALERT_THRESHOLD
Nuevo en la versión 4.0.2.
Threshold for triggering an alert for outdated repositories, or ones that contain too many changes. Defaults to 25.
Ver también
REQUIRE_LOGIN
Nuevo en la versión 4.1.
This enables LOGIN_REQUIRED_URLS
and configures REST framework to
require authentication for all API endpoints.
Nota
This is implemented in the Configuración de muestra. For Docker, use
WEBLATE_REQUIRE_LOGIN
.
SENTRY_DSN
Nuevo en la versión 3.9.
Sentry DSN to use for Collecting error reports.
Ver también
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
Configura el dominio del sitio. Es necesario para producir los URL absolutos correctos en distintos ámbitos (por ejemplo, en los mensajes de activación, las notificaciones o los suministros RSS).
Si Weblate se está ejecutando en algún puerto no estándar, inclúyalo aquí también.
Ejemplos:
# Production site with domain name
SITE_DOMAIN = "weblate.example.com"
# Local development with IP address and port
SITE_DOMAIN = "127.0.0.1:8000"
Nota
Esta configuración debe contener solo el nombre de dominio. Para configurar el protocolo (activar y exigir HTTPS, p. ej.), utilice ENABLE_HTTPS
, y para cambiar el URL, utilice URL_PREFIX
.
Consejo
En un contenedor Docker, el dominio del sitio se configura mediante WEBLATE_ALLOWED_HOSTS
.
SITE_TITLE
El título que se utilizará en el sitio web y los mensajes de correo que se envíen.
SPECIAL_CHARS
Caracteres adicionales que incluir en el teclado visual; Visual keyboard.
El valor predeterminado es:
SPECIAL_CHARS = ("\t", "\n", "\u00a0", "…")
SINGLE_PROJECT
Nuevo en la versión 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.
Distinto en la versión 3.11: The setting now also accepts a project slug, to force displaying that single project.
Ejemplo:
SINGLE_PROJECT = "test"
SSH_EXTRA_ARGS
Nuevo en la versión 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"
Consejo
The string is evaluated by shell, so make sure to quote any whitespace and special characters.
Ver también
STATUS_URL
The URL where your Weblate instance reports its status.
SUGGESTION_CLEANUP_DAYS
Nuevo en la versión 3.2.1.
Automatically deletes suggestions after a given number of days.
Defaults to None
, meaning no deletions.
UPDATE_LANGUAGES
Nuevo en la versión 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
.
Advertencia
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.
Ver también
URL_PREFIX
This setting allows you to run Weblate under some path (otherwise it relies on being run from the webserver root).
Nota
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
.
Consejo
The prefix should start with a /
.
Ejemplo:
URL_PREFIX = "/translations"
Nota
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.
Nota
Weblate tries to use all supported back-ends you have the tools for.
Consejo
You can limit choices or add custom VCS back-ends by using this.
VCS_BACKENDS = ("weblate.vcs.git.GitRepository",)
Ver también
VCS_CLONE_DEPTH
Nuevo en la versión 3.10.2.
Configures how deep cloning of repositories Weblate should do.
Nota
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 Complementos), you might want to increase the depth or turn off shallow clones completely by setting this to 0.
Consejo
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.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",
)
Nota
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.
Ver también
WEBLATE_EXPORTERS
Nuevo en la versión 4.2.
List of a available exporters offering downloading translations or glossaries in various file formats.
Ver también
WEBLATE_FORMATS
Nuevo en la versión 3.0.
List of file formats available for use.
Nota
The default list already has the common formats.
Ver también
WEBLATE_MACHINERY
Nuevo en la versión 4.13.
List of machinery services available for use.
Ver también
WEBLATE_GPG_IDENTITY
Nuevo en la versión 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.
Ver también
WEBSITE_REQUIRED
Defines whether Sitio web del proyecto has to be specified when creating a project. Turned on by default as that suits public server setups.
COMMENT_CLEANUP_DAYS
Nuevo en la versión 3.6.
Delete comments after a given number of days. Defaults to
None
, meaning no deletion at all.