Configuración

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

Nota

After changing any of these settings, you need to restart Weblate — both WSGI and Celery processes.

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

Configures where contact form sends e-mails. If not configured, e-mail addresses from ADMINS are used.

Configure this as a list of e-mail addresses:

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.

ANONYMOUS_USER_NAME

El nombre de usuario de los usuarios sin cuenta.

Ver también

Control de acceso

AUDITLOG_EXPIRY

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

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.

  • 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

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.

The options are:

"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

How many days Weblate rejects reusing a previously used password for a user.

The checking is based on the audit log, AUDITLOG_EXPIRY needs to be at least same as this.

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

Provide a fully-qualified path to the Python class that implements the autofixer interface.

Correcciones disponibles:

weblate.trans.autofixes.whitespace.SameBookendingWhitespace

Hacer coincidir los espacios en blanco al principio y al final de la cadena con la fuente.

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.chars.DevanagariDanda

Replaces sentence full stop in Bangla by the devanagari danda character.

weblate.trans.autofixes.html.BleachHTML

Elimina las marcas HTML no seguras de las cadenas marcadas como safe-html (ver HTML inseguro).

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.

List of languages to offer users for starting a new translation. When not specified, a 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. Project admins are still presented with the full selection of languages defined in Weblate.

Nota

This does not define new languages for Weblate — it only filters existing ones in the database.

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.

Directory where Weblate stores cache files. Defaults to cache subfolder in DATA_DIR.

Change this to local or temporary filesystem if DATA_DIR is on a network filesystem.

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

A menudo existen los subdirectorios siguientes:

fonts

font-config cache for Gestionar tipos de letra.

avatar

Cached user avatars, see Avatars.

static

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

tesseract

OCR trained data for Contexto visual para cadenas.

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, …).

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.

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 are 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

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.

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.

Configures how e-mail from the contact form is being sent. Choose a configuration that matches the configuration of your mail server.

"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

Version-control repositories for translations.

backups

Daily backup data. Please check Datos volcados para las copias de respaldo for details.

fonts:

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

cache

Various caches. Can be placed elsewhere using CACHE_DIR.

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

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

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

The default access-control setting for new projects:

0

Público

1

Protegido

100

Privado

200

Personalizado

Utilice Custom 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 Automatically watch projects on contribution 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 componente para más detalles.

DEFAULT_ADDONS

Default add-ons to install for 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",
    },
}

DEFAULT_COMMITER_EMAIL

Committer e-mail address, defaulting to noreply@weblate.org.

Ver también

DEFAULT_COMMITER_NAME

DEFAULT_COMMITER_NAME

Committer name, defaulting to Weblate.

Ver también

DEFAULT_COMMITER_EMAIL

DEFAULT_LANGUAGE

Added in version 4.3.2.

Idioma del código fuente for any new components.

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

DEFAULT_MERGE_STYLE

Estilo de fusión for any new components.

  • rebase - por defecto

  • merge

DEFAULT_SHARED_TM

Configures the default value of Utilizar memoria de traducción compartida and 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

Whether to turn on Gravatar-based avatars for users. On by default.

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

Whether to turn on anonymous remote hooks.

ENABLE_HTTPS

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.

In the default configuration this is also used for several Django settings related to HTTPS — it enables secure cookies, toggles HSTS or enables redirection to a HTTPS URL.

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

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.

Insert additional markup into the HTML header. Can be used for verification of site ownership, for example:

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

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

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.

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.

Additional settings not described here can be found at Configuring version control credentials.

GOOGLE_ANALYTICS_ID

ID de Google Analytics para activar el seguimiento de Weblate mediante Google Analytics.

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

On by default.

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.

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

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: The default changed from 1 to -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

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

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.

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

Set to blank string to disable.

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.

Default configuration:

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 restrict project websites. 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.

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

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.

Threshold for triggering an alert for outdated repositories, or ones that contain too many changes. Defaults to 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 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.

Controls whether languages database should be updated when running database migration and is on by default. This setting has no effect on invocation of setuplang.

Advertencia

The languages display might become inconsistent with this. Weblate language definitions expand over time and it will not display language code for the defined languages.

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.

The default value is 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.LangaugeConsistencyAddon",
    "weblate.addons.discovery.DiscoveryAddon",
    "weblate.addons.flags.SourceEditAddon",
    "weblate.addons.flags.TargetEditAddon",
    "weblate.addons.flags.SameEditAddon",
    "weblate.addons.flags.BulkEditAddon",
    "weblate.addons.generate.GenerateFileAddon",
    "weblate.addons.json.JSONCustomizeAddon",
    "weblate.addons.xml.XMLCustomizeAddon",
    "weblate.addons.properties.PropertiesSortAddon",
    "weblate.addons.git.GitSquashAddon",
    "weblate.addons.removal.RemoveComments",
    "weblate.addons.removal.RemoveSuggestions",
    "weblate.addons.resx.ResxUpdateAddon",
    "weblate.addons.autotranslate.AutoTranslateAddon",
    "weblate.addons.yaml.YAMLCustomizeAddon",
    "weblate.addons.cdn.CDNJSAddon",
    # Add-on you want to include
    "weblate.addons.example.ExampleAddon",
)

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.

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