Configuración

Todos los ajustes se almacenan en settings.py (como es habitual en Django).

Nota

Después de cambiar cualquiera de estos ajustes, es necesario reiniciar Weblate - ambos procesos WSGI y Celery.

En caso de que se ejecute como mod_wsgi, es necesario reiniciar Apache para recargar la configuración.

Ver también

Por favor, consulta también La documentación de Django para conocer los parámetros de configuración del propio Django.

ADMINS_CONTACT

Configura donde el formulario de contacto envía correos electrónicos. Si no está configurado, se utilizan las direcciones de correo electrónico de ADMINS.

Configúrelo como una lista de direcciones de correo electrónico:

ADMINS_CONTACT = ["admin@example.com", "support@example.com"]

Ver también

CONTACT_FORM, ADMINS

AKISMET_API_KEY

Weblate puede utilizar Akismet para comprobar las sugerencias anónimas entrantes en busca de spam. Visita akismet.com para comprar una clave API y asociarla a un sitio.

ALTCHA_MAX_NUMBER

Added in version 5.9.

Configures a maximal number for ALTCHA proof-of-work mechanism.

ANONYMOUS_USER_NAME

El nombre de usuario de los usuarios sin cuenta.

Ver también

Control de acceso

AUDITLOG_EXPIRY

The maximum number of days Weblate will keep audit logs containing information about the account activity.

El valor predeterminado es de 180 días.

AUTH_LOCK_ATTEMPTS

Número máximo de intentos de autenticación fallidos antes de que se aplique la limitación de velocidad.

Actualmente se aplica en los siguientes lugares:

  • Iniciar sesión. Elimina la contraseña de la cuenta, impidiendo que el usuario se registre sin solicitar una nueva contraseña.

  • Restablecimiento de la contraseña. Evita que se envíen nuevos correos electrónicos, evitando el spam de los usuarios con demasiados intentos de restablecimiento de contraseña.

El valor predeterminado es de 10.

Ver también

Rate limiting

AUTO_UPDATE

Actualiza todos los repositorios diariamente.

Consejo

Útil si no está utilizando Actuadores de notificación para actualizar los repositorios de Weblate automáticamente.

Nota

Existen opciones de activación/desactivación además de la selección de cadenas para la compatibilidad con versiones anteriores.

Las opciones son:

"none"

No hay actualizaciones diarias.

"remote" también False

Actualiza los remotos solamente.

"full" también True

Actualiza los remotos y fusiona la copia de trabajo.

Nota

Esto requiere que Tareas en segundo plano con Celery esté funcionando, y tendrá efecto después de que se reinicie.

AVATAR_URL_PREFIX

Prefijo para construir las URL de los avatares como: ${AVATAR_URL_PREFIX}/avatar/${MAIL_HASH}?${PARAMS}. Se sabe que los siguientes servicios funcionan:

Gravatar (por defecto), según https://gravatar.com/

AVATAR_URL_PREFIX = 'https://www.gravatar.com/'

Libravatar, según https://www.libravatar.org/

AVATAR_URL_PREFIX = 'https://www.libravatar.org/'

AUTH_TOKEN_VALID

El tiempo de validez del token de autenticación y la contraseña temporal de los correos electrónicos de restablecimiento de contraseña. Se establece en número de segundos, por defecto 172800 (2 días).

AUTH_PASSWORD_DAYS

Cuántos días Weblate rechaza reutilizar una contraseña usada previamente para un usuario.

La comprobación se basa en el registro de auditoría, AUDITLOG_EXPIRY necesita ser al menos igual que esto.

Nota

Los cambios de contraseña realizados antes de Weblate 2.15 no se tendrán en cuenta en esta política.

El valor predeterminado es de 180 días.

AUTOFIX_LIST

Lista de correcciones automáticas que aplicar al guardar una cadena.

Nota

Proporcione una ruta completa a la clase Python que implementa la interfaz autofixer.

Available fixes are described at Correcciones automáticas.

Puede seleccionar cuáles utilizar:

AUTOFIX_LIST = (
    "weblate.trans.autofixes.whitespace.SameBookendingWhitespace",
    "weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis",
)

BACKGROUND_TASKS

Added in version 4.5.2.

Define la frecuencia con la que deben activarse las tareas de mantenimiento prolongadas para un componente.

En este momento esto controla:

Elecciones posibles:

  • monthly (valor predeterminado)

  • weekly

  • daily

  • never

Nota

No es recomendable aumentar la frecuencia cuando Weblate contiene miles de componentes.

BASIC_LANGUAGES

Added in version 4.4.

Lista de idiomas que se ofrecen a los usuarios para iniciar una nueva traducción. Si no se especifica, se utiliza una lista incorporada (que incluye todos los idiomas de uso común, pero sin variantes específicas de cada país).

Esto solo limita a los usuarios sin privilegios a añadir idiomas no deseados. A los administradores de proyectos se les sigue presentando la selección completa de idiomas definida en Weblate.

Nota

Esto no define nuevos lenguajes para Weblate - solo filtra los existentes en la base de datos.

Ejemplo:

BASIC_LANGUAGES = {"cs", "it", "ja", "en"}

Ver también

Definiciones de idioma

BORG_EXTRA_ARGS

Added in version 4.9.

Puedes pasar argumentos adicionales a borg create cuando se activan las copias de seguridad integradas.

Ejemplo:

BORG_EXTRA_ARGS = ["--exclude", "vcs/"]

CACHE_DIR

Added in version 4.16.

Directorio donde Weblate almacena los archivos caché. Por defecto es la subcarpeta cache de DATA_DIR.

Cámbielo a sistema de archivos local o temporal si DATA_DIR está en un sistema de archivos de red.

El contenedor Docker utiliza un volumen separado para esto, ver Volúmenes de contenedores Docker.

A menudo existen los subdirectorios siguientes:

fonts

Caché font-config para Gestionar tipos de letra.

avatar

Avatares de usuario en caché, véase Avatars.

static

Ubicación por defecto para los archivos estáticos de Django, especificada por STATIC_ROOT. Ver Serving static files.

tesseract

Datos entrenados por OCR para Contexto visual para cadenas.

CSP_SCRIPT_SRC, CSP_IMG_SRC, CSP_CONNECT_SRC, CSP_STYLE_SRC, CSP_FONT_SRC, CSP_FORM_SRC

Personalice el encabezado Content-Security-Policy para Weblate. El encabezado se genera automáticamente en función de las integraciones habilitadas con servicios de terceros (Matomo, Google Analytics, Sentry, etc.).

Todo esto es una lista vacía por defecto.

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

Proporcione una ruta completa a la clase de Python que implementa la interfaz para la comprobación.

Ajuste la lista de comprobaciones para incluir aquellas que le sean relevantes.

Todos los Comprobaciones de calidad incorporados están activados por defecto, desde donde se puede cambiar esta configuración. Por defecto se comentan en Configuración de muestra para que se utilicen los valores por defecto. Las nuevas comprobaciones se llevan a cabo con cada nueva versión de Weblate.

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 configuración solo afecta a las traducciones modificadas recientemente . Las comprobaciones existentes seguirán almacenándose en la base de datos. Para aplicar también los cambios a las traducciones almacenadas , ejecute updatechecks.

COMMENT_CLEANUP_DAYS

Eliminar los comentarios después de un número determinado de días. El valor predeterminado es None, lo que significa que no se borra nada.

COMMIT_PENDING_HOURS

Número de horas entre la confirmación de los cambios pendientes mediante la tarea en segundo plano.

CONTACT_FORM

Added in version 4.6.

Configura cómo se envía el correo electrónico del formulario de contacto. Elija una configuración que coincida con la configuración de su servidor de correo.

"reply-to"

El remitente se utiliza como Reply-To, este es el comportamiento por defecto.

"from"

El remitente se utiliza como From. Su servidor de correo debe permitir el envío de este tipo de correos.

Ver también

ADMINS_CONTACT

DATA_DIR

La carpeta en la que Weblate almacena todos los datos. Contiene enlaces a los repositorios VCS, un índice de texto completo y varios archivos de la configuración para herramientas externas.

A menudo existen los subdirectorios siguientes:

home

Directorio de inicio utilizado para invocar secuencias de órdenes.

ssh

Claves SSH y su configuración.

media

Ubicación por defecto para los archivos multimedia de Django, especificada por MEDIA_ROOT. Contiene las capturas de pantalla subidas, véase Contexto visual para cadenas.

vcs

Repositorios de control de versiones para traducciones.

backups

Los datos de la copia de seguridad diaria. Por favor, consulte Datos volcados para las copias de respaldo para más detalles.

fonts:

Fuentes cargadas por el usuario, véase Gestionar tipos de letra.

cache

Varias cachés. Puede colocarse en otro lugar utilizando CACHE_DIR.

El contenedor Docker utiliza un volumen separado para esto, ver Volúmenes de contenedores Docker.

Nota

This directory has to be writable by Weblate. Running it as WSGI means the www-data user should have write access to it.

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

Por defecto es /home/weblate/data, pero se espera que esté configurado.

DATABASE_BACKUP

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"

DEFAULT_ACCESS_CONTROL

La configuración de control de acceso por defecto para los nuevos proyectos:

0

Público

1

Protegido

100

Privado

200

Personalizado

Utilice Personalizado si está gestionando ACL manualmente, lo que significa no depender de la gestión interna de Weblate.

DEFAULT_AUTO_WATCH

Added in version 4.5.

Configura si la etiqueta Ver automáticamente los proyectos en los que colabora debe ser activada para los nuevos usuarios. Por defecto es True.

Ver también

Notificaciones

DEFAULT_RESTRICTED_COMPONENT

Added in version 4.1.

El valor predeterminado para la restricción de componentes.

DEFAULT_ADD_MESSAGE, DEFAULT_ADDON_MESSAGE, DEFAULT_COMMIT_MESSAGE, DEFAULT_DELETE_MESSAGE, DEFAULT_MERGE_MESSAGE

Mensajes de confirmación por defecto para diferentes operaciones, por favor revise Configuración de componentes para más detalles.

DEFAULT_ADDONS

Complementos por defecto para instalar en cada componente creado.

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",
    },
}

DEFAULT_COMMITER_EMAIL

Dirección de correo electrónico del colaborador, el valor predeterminado es noreply@weblate.org.

Ver también

DEFAULT_COMMITER_NAME

DEFAULT_COMMITER_NAME

Nombre del autor, por defecto Weblate.

Ver también

DEFAULT_COMMITER_EMAIL

DEFAULT_LANGUAGE

Added in version 4.3.2.

Idioma del código fuente para cualquier componente nuevo.

El valor predeterminado es en. El objeto de lenguaje correspondiente debe existir en la base de datos.

DEFAULT_MERGE_STYLE

Estilo de fusión para cualquier componente nuevo.

  • rebase - por defecto

  • merge

DEFAULT_SHARED_TM

Configura el valor por defecto de Utilizar memoria de traducción compartida y Contribuir a la memoria de traducción compartida.

DEFAULT_TRANSLATION_PROPAGATION

Configuración por defecto para la propagación de la traducción, por defecto es True.

DEFAULT_PULL_MESSAGE

Configura el título y el mensaje predeterminados para las solicitudes de extracción.

ENABLE_AVATARS

Si se activan los avatares basados en Gravatar para los usuarios. Por defecto está activado.

Los avatares se obtienen y se almacenan en caché en el servidor, lo que reduce el riesgo de que se filtre información privada y acelera la experiencia del usuario.

ENABLE_HOOKS

Si desea activar los enlaces remotos anónimos.

ENABLE_HTTPS

Distinto en la versión 5.7: Weblate ahora requiere https para el soporte de WebAuthn.

Si se envían los enlaces a Weblate como HTTPS o HTTP. Esta configuración afecta a los correos electrónicos enviados y a las URL absolutas generadas.

En la configuración por defecto esto también se usa para varias configuraciones de Django relacionadas con HTTPS - habilita cookies seguras, alterna HSTS o habilita redirección a una URL HTTPS.

The HTTPS redirection might be problematic in some cases and you might hit an issue with infinite redirection in case you are using a reverse proxy doing an SSL termination which does not correctly pass protocol headers to Django. Please tweak your reverse proxy configuration to emit X-Forwarded-Proto or Forwarded headers or configure SECURE_PROXY_SSL_HEADER to let Django correctly detect the SSL status.

En caso de que esta opción esté deshabilitada, Weblate no podrá iniciarse y aparecerá un error otp_webauthn.E031. Puede silenciar este error agregándolo a SILENCED_SYSTEM_CHECKS, pero aún así WebAuthn no funcionará para páginas sin HTTPS.

ENABLE_SHARING

Activa/desactiva el menú Compartir para que los usuarios puedan compartir el progreso de la traducción en las redes sociales.

EXTRA_HTML_HEAD

Added in version 4.15.

Insertar un marcado adicional en el encabezado HTML. Puede ser usado para verificar la propiedad de la página, por ejemplo:

EXTRA_HTML_HEAD = '<link href="https://fosstodon.org/@weblate" rel="me">'

Advertencia

No sanitization is performed on the string. It is inserted as-is into the HTML header.

GET_HELP_URL

Added in version 4.5.2.

URL en el que pueden encontrarse recursos de ayuda para su instalación de Weblate.

GITEA_CREDENTIALS

Added in version 4.12.

Lista de credenciales para los servidores de Gitea.

GITEA_CREDENTIALS = {
    "try.gitea.io": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.

GITLAB_CREDENTIALS

Added in version 4.3.

Lista de credenciales para los servidores de GitLab.

GITLAB_CREDENTIALS = {
    "gitlab.com": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.

GITHUB_CREDENTIALS

Added in version 4.3.

Lista de credenciales para los servidores de GitHub.

GITHUB_CREDENTIALS = {
    "api.github.com": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

Nota

When creating a fine-grained personal access token, grant read and write access to Contents and Pull requests.

Administration might also be necessary for forking a repository if you intend to use forking and the original repository is not public.

Consejo

Use api.github.com as a API host for https://github.com/.

The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.

BITBUCKETSERVER_CREDENTIALS

Added in version 4.16.

List for credentials for Bitbucket Data Center.

BITBUCKETSERVER_CREDENTIALS = {
    "git.self-hosted.com": {
        "username": "weblate",
        "token": "http-access-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.

BITBUCKETCLOUD_CREDENTIALS

Added in version 5.8.

List for credentials for Bitbucket Cloud servers.

BITBUCKETCLOUD_CREDENTIALS = {
    "bitbucket.org": {
        "username": "your-username",
        "workspace": "your-workspace-slug",
        "token": "your-app-password",
    },
}

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The following configuration is available for each host:

username

API user.

workspace

The user workspace slug.

token

The App password with pullrequest:write permission.

Se pueden encontrar configuraciones adicionales no descritas aquí en Configuring version control credentials .

AZURE_DEVOPS_CREDENTIALS

Added in version 5.2.

List for credentials for Azure DevOps servers.

AZURE_DEVOPS_CREDENTIALS = {
    "dev.azure.com": {
        "username": "project-name",
        "token": "your-api-token",
        "organization": "organization-name",
    },
}

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The following configuration is available for each host:

username

The name of the Azure DevOps project. This is not the repository name.

organization

The name of the organization of the project.

workItemIds

An optional list of work items IDs from your organization. When provided new pull requests will have these attached.

token

API token for the API user, required.

Se pueden encontrar configuraciones adicionales no descritas aquí en Configuring version control credentials .

GOOGLE_ANALYTICS_ID

Google Analytics ID to turn on monitoring of Weblate using Google Universal Analytics.

Nota

Google Analytics 4 integration is currently not available for Weblate, please see https://github.com/WeblateOrg/weblate/issues/14015.

HIDE_REPO_CREDENTIALS

Ocultar las credenciales del repositorio en la interfaz web. En caso de tener la URL del repositorio con el usuario y la contraseña, Weblate la ocultará cuando se muestre la información relacionada a los usuarios.

Por ejemplo, en lugar de https://user:password@git.example.com/repo.git mostrará sólo https://git.example.com/repo.git. También intenta limpiar los mensajes de los errores de VCS de forma similar.

Nota

Activo por defecto.

HIDE_VERSION

Added in version 4.3.1.

Hides version info from unauthenticated users. This also makes all documentation links point to the latest version instead of the documentation matching the currently installed version.

Hiding the version is a recommended security practice in some corporations, does not prevent an attacker from figuring out version by probing behavior.

Nota

Está desactivado por defecto.

INTERLEDGER_PAYMENT_POINTERS

Added in version 4.12.1.

Lista de indicadores de pago interledger (ILP) para a monetización web.

Si se especifican varios, el reparto probabilístico de los ingresos se consigue seleccionando uno al azar.

Consulte <https://webmonetization.org/> para obtener más detalles.

Consejo

The default value lets users fund Weblate itself.

IP_BEHIND_REVERSE_PROXY

Indica si Debiste se está ejecutando detrás de un proxy reverso.

Si se establece en «True», Weblate obtiene la dirección IP de un encabezado definido por 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

No está activado por defecto.

IP_PROXY_HEADER

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

Distinto en la versión 5.0.1: El valor por defecto ha cambiado de 1 a -1.

Indicates which part of IP_PROXY_HEADER is used as client IP address.

Depending on your setup, this header might consist of several IP addresses, (for example X-Forwarded-For: client-ip, proxy-a, proxy-b) and you can configure which address from the header is used as client IP address here.

Advertencia

Setting this affects the security of your installation. You should only configure it to use trusted proxies for determining the IP address. Please check <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#security_and_privacy_concerns> for more details.

Defaults to -1.

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()

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

Si se debe limitar la longitud de una traducción determinada. La restricción es la longitud de la cadena de origen × 10 caracteres.

Consejo

Establézcalo en False para permitir traducciones más largas (hasta 10.000 caracteres) independientemente de la longitud de la cadena de origen.

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/.

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

REQUIRE_LOGIN

LOGIN_REQUIRED_URLS_EXCEPTIONS

List of exceptions for LOGIN_REQUIRED_URLS. If not specified, users are allowed to access the sign-in page.

See the Configuración de muestra for recommended configuration of this setting.

MATOMO_SITE_ID

ID of the site in Matomo (formerly Piwik) you want to use for tracking Weblate.

Nota

Esta integración no admite el gestor de etiquetas de Matomo.

Ver también

MATOMO_URL

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

MATOMO_SITE_ID

NEARBY_MESSAGES

Cantidad de cadenas cercanas que mostrar en ambas direcciones en el editor completo.

This is just a default value, users can adjust this in Perfil de usuario.

DEFAULT_PAGE_LIMIT

Added in version 4.7.

Default number of elements to display when pagination is active.

PAGURE_CREDENTIALS

Added in version 4.3.2.

List for credentials for Pagure servers.

PAGURE_CREDENTIALS = {
    "pagure.io": {
        "username": "weblate",
        "token": "your-api-token",
    },
}

The configuration dictionary consists of credentials defined for each API host. The layout is same for almost all version control integrations and is described at Configuring version control credentials.

PASSWORD_MINIMAL_STRENGTH

Added in version 5.10.2.

Minimal password score as evaluated by the zxcvbn password strength estimator.

Defaults to 0, which means strength checking is disabled.

PRIVACY_URL

Added in version 4.8.1.

La url donde su instancia de Weblate muestra su política de privacidad.

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

LEGAL_URL

PRIVATE_COMMIT_EMAIL_OPT_IN

Added in version 4.15.

Configures whether the private commit e-mail is opt-in or opt-out (by default it is opt-in).

Consejo

This setting only applies to users which have not explicitly chosen a commit e-mail.

PRIVATE_COMMIT_EMAIL_TEMPLATE

Added in version 4.15.

Template to generate private commit e-mail for an user. Defaults to "{username}@users.noreply.{site_domain}".

Establecer como una cadena en blanco para desactivar.

Nota

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 Perfil.

PROJECT_BACKUP_KEEP_COUNT

Added in version 4.14.

Defines how many backups per project are kept on the server. Defaults to 3.

PROJECT_BACKUP_KEEP_DAYS

Added in version 4.14.

Defines how long the project backups will be kept on the server. Defaults to 30 days.

PROJECT_NAME_RESTRICT_RE

Added in version 4.15.

Defines a regular expression to restrict project naming. Any matching names will be rejected.

Ver también

Nombre del proyecto

PROJECT_WEB_RESTRICT_HOST

Added in version 4.16.2.

Reject using certain hosts in project website. Any subdomain is matched, so including example.com will block test.example.com as well. The list should contain lower case strings only, the parsed domain is lower cased before matching.

Configuración por defecto:

PROJECT_WEB_RESTRICT_HOST = {"localhost"}

PROJECT_WEB_RESTRICT_NUMERIC

Added in version 4.16.2.

Reject using numeric IP address in project website. On by default.

PROJECT_WEB_RESTRICT_RE

Added in version 4.15.

Defines a regular expression to limit what can be entered as Sitio web del proyecto. Any matching URLs will be rejected.

RATELIMIT_ATTEMPTS

Maximum number of authentication attempts before rate limiting is applied.

Defaults to 5.

RATELIMIT_WINDOW

How long authentication is accepted after rate limiting applies.

An amount of seconds, defaulting to 300 (5 minutes).

RATELIMIT_LOCKOUT

How long authentication is locked after rate limiting applies.

An amount of seconds defaulting to 600 (10 minutes).

REGISTRATION_ALLOW_BACKENDS

Added 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 on 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 the URL for authentication.

REGISTRATION_CAPTCHA

Whether registration of new accounts is protected by a CAPTCHA. Defaults to enabled.

If turned on, a CAPTCHA is added to all pages where a users enters their e-mail address:

  • 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.

The protection currently consists of following steps:

  • Mathematical captcha to be solved by the user.

  • Proof of work challenge calculated by the browser. The difficulty can be adjusted using ALTCHA_MAX_NUMBER.

REGISTRATION_EMAIL_MATCH

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. Defaults to enabled.

This setting affects built-in authentication by e-mail address or through the Python Social Auth (you can allow certain back-ends using REGISTRATION_ALLOW_BACKENDS).

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.

REGISTRATION_REBIND

Added in version 4.16.

Allow rebinding authentication backends for existing users. Turn this on when migrating between authentication providers.

Nota

Off by default to not allow adding other authentication backends to an existing account. Rebinding can lead to account compromise when using more third-party authentication backends.

REPOSITORY_ALERT_THRESHOLD

Added in version 4.0.2.

Umbral para activar una alerta en el caso de repositorios obsoletos o que contengan demasiados cambios. El valor predeterminado es 25.

REQUIRE_LOGIN

Added in version 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

Sentry DSN to use for Collecting error reports and monitoring performance.

SENTRY_ENVIRONMENT

Configura el entorno para Sentry. Por defecto es devel.

SENTRY_PROFILES_SAMPLE_RATE

Configure sampling rate for performance monitoring. Set to 1 to trace all events, 0 (the default) disables tracing.

SENTRY_SEND_PII

Allow Sentry to collect certain personally identifiable information. Turned off by default.

Distinto en la versión 5.7: This is turned off by default now, used to be turned on by default.

SENTRY_TRACES_SAMPLE_RATE

Configure sampling rate for profiling monitoring. Set to 1 to trace all events, 0 (the default) disables tracing.

Ver también

Sentry Profiling

SIMPLIFY_LANGUAGES

Use simple language codes for default language/country combinations. For example an fr_FR translation will use the fr language code. This is usually the desired behavior, as it simplifies listing languages for these default combinations.

Turn this off if you want to different translations for each variant.

SITE_DOMAIN

Configures site domain. Necessary to produce correct absolute links in many scopes (for example activation e-mails, notifications or RSS feeds).

If Weblate is running on a non-standard port, include it here as well.

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

This setting should only contain the domain name. For configuring protocol, (turning on and enforcing HTTPS) use ENABLE_HTTPS and for changing the URL, use URL_PREFIX.

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

Redirects users directly to a project or component instead of showing the dashboard. You can either set it to True so it only works if there is actually only single project in Weblate. Alternatively, set the project slug, and it will redirect unconditionally to this project.

Ejemplo:

SINGLE_PROJECT = "test"

SSH_EXTRA_ARGS

Added in version 4.9.

Allows adding custom parameters when Weblate is invoking SSH. Useful when connecting to servers using legacy encryption or other non-standard features.

For example when SSH connection in Weblate fails with Unable to negotiate with legacyhost: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1, you can turn that on using:

SSH_EXTRA_ARGS = "-oKexAlgorithms=+diffie-hellman-group1-sha1"

Consejo

The string is evaluated by the shell, so ensure any whitespace and special characters is quoted.

Ver también

OpenSSH Legacy Options

STATUS_URL

The URL where your Weblate instance reports its status.

SUGGESTION_CLEANUP_DAYS

Automatically deletes suggestions after a given number of days. Defaults to None, meaning no deletions.

SUPPORT_STATUS_CHECK

Added in version 5.5.

Disables semiannual support status check and redirecting superusers upon login to the donation page in case there is no active support subscription.

Consejo

Improve your Weblate experience by purchasing a support subscription and boosting Weblate progress instead of turning this off.

UNUSED_ALERT_DAYS

Added in version 4.17.

Determina cuando se activa la advertencia El componente no parece estar en uso.

Defaults to 365 days, set to 0 to turn it off.

UPDATE_LANGUAGES

Added in version 4.3.2.

Controla si la base de datos de idiomas debe actualizarse al ejecutar la migración de la base de datos y está activada de manera predeterminada. Esta configuración no tiene efecto en la invocación de setuplang.

Advertencia

De este modo, la visualización de los idiomas puede resultar incoherente. Las definiciones de idiomas de Weblate se amplían con el tiempo y no mostrará el código de idioma para los idiomas definidos.

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_API_DELAY

Added in version 4.15.1.

Configures minimal delay in seconds between third-party API calls in Solicitudes de incorporación de GitHub, Solicitudes de fusión de GitLab, Solicitudes de incorporación de Gitea, Solicitudes de fusión de Pagure, and Azure DevOps pull requests.

This rate-limits API calls from Weblate to these services to avoid overloading them.

If you are being limited by secondary rate-limiter at GitHub, increasing this might help.

Por defecto, el valor es 10.

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",)

VCS_CLONE_DEPTH

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.LanguageConsistencyAddon",
    "weblate.addons.discovery.DiscoveryAddon",
    "weblate.addons.flags.SourceEditAddon",
    "weblate.addons.flags.TargetEditAddon",
    "weblate.addons.flags.SameEditAddon",
    "weblate.addons.flags.BulkEditAddon",
    "weblate.addons.generate.GenerateFileAddon",
    "weblate.addons.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",
)

Nota

Removing the add-on from the list does not uninstall it from the components. Weblate will crash in that case. Please uninstall the add-on from all components prior to removing it from this list.

ADDON_ACTIVITY_LOG_EXPIRY

Added in version 5.6.

Configures how long activity logs for add-ons are kept. Defaults to 180 days.

WEBLATE_EXPORTERS

Added in version 4.2.

List of a available exporters offering downloading translations or glossaries in various file formats.

WEBLATE_FORMATS

List of file formats available for use.

Nota

The default list already has the common formats.

WEBLATE_MACHINERY

Added in version 4.13.

List of machinery services available for use.

WEBLATE_GPG_IDENTITY

Identity used by Weblate to sign Git commits, for example:

WEBLATE_GPG_IDENTITY = "Weblate <weblate@example.com>"

The Weblate GPG keyring is searched for a matching key (home/.gnupg under DATA_DIR). If not found, a key is generated, please check Signing Git commits with GnuPG for more details.

WEBSITE_REQUIRED

Defines whether Sitio web del proyecto has to be specified when creating a project. On by default, as that suits public server setups.

Configuring version control credentials

Consejo

This section describes VCS credential variables as GITHUB_CREDENTIALS, GITLAB_CREDENTIALS, GITEA_CREDENTIALS, PAGURE_CREDENTIALS, BITBUCKETSERVER_CREDENTIALS.

The configuration dictionary consists of credentials defined for each API host. The API host might be different from what you use in the web browser, for example GitHub API is accessed as api.github.com.

The credentials can also be overridden in URL de envío al repositorio or Repositorio de código fuente (if push URL is not configured), these take precedence over the ones specified in the configuration file.

The following configuration is available for each host:

username

API user, required.

token

API token for the API user, required.

scheme

Added in version 4.18.

Scheme override. Weblate attempts to parse scheme from the repository URL and falls backs to https. If you are running the API server internally, you might want to use http instead, but consider security.

Consejo

In the Docker container, the credentials can be configured using environment variables, see Code hosting sites credentials.