Projetos de tradução¶
Translation organization¶
Weblate organizes translatable VCS content of project/components into a tree-like structure.
The bottom level object is Configuração de projeto, which should hold all translations belonging together (for example translation of an application in several versions and/or accompanying documentation).
On the level above, Configuração de componente, which is actually the component to translate, you define the VCS repository to use, and the mask of files to translate.
Above Configuração de componente there are individual translations, handled automatically by Weblate as translation files (which match Máscara de arquivo defined in Configuração de componente) appear in the VCS repository.
Weblate supports a wide range of translation formats (both bilingual and monolingual ones) supported by Translate Toolkit, see Formatos de arquivos suportados.
Nota
You can share cloned VCS repositories using URLs internas do Weblate. Using this feature is highly recommended when you have many components sharing the same VCS. It improves performance and decreases required disk space.
Adicionando projetos e componentes de tradução¶
Alterado na versão 3.2: An interface for adding projects and components is included, and you no longer have to use A interface administrativa do Django.
Alterado na versão 3.4: The process of adding components is now multi staged, with automated discovery of most parameters.
Based on your permissions, new translation projects and components can be created. It is always permitted for users with the Add new projects permission, and if your instance uses billing (e.g. like https://hosted.weblate.org/ see Cobrança), you can also create those based on your plans allowance from the user account that manages billing.
You can view your current billing plan on a separate page:

The project creation can be initiated from there, or using the menu in the navigation bar, filling in basic info about the translation project to complete addition of it:

After creating the project, you are taken directly to the project page:

Creating a new translation component can be initiated via a single click there. The process of creating a component is multi-staged and automatically detects most translation parameters. There are several approaches to creating component:
- De controle de versão
Creates component from remote version control repository.
- De componente existente
Creates additional component to existing one by choosing different files.
- Ramo adicional
Creates additional component to existing one, just for different branch.
- Enviar arquivos de tradução
Upload translation files to Weblate in case you do not have version control or do not want to integrate it with Weblate. You can later update the content using the web interface or API REST do Weblate.
- Traduzir documento
Upload single document and translate that.
- Iniciar do zero
Create blank translation project and add strings manually.
Once you have existing translation components, you can also easily add new ones for additional files or branches using same repository.
First you need to fill in name and repository location:

On the next page, you are presented with a list of discovered translatable resources:

As a last step, you review the translation component info and fill in optional details:

Configuração de projeto¶
Create a translation project and then add a new component for translation in it. The project is like a shelf, in which real translations are stacked. All components in the same project share suggestions and their dictionary; the translations are also automatically propagated through all components in a single project (unless turned off in the component configuration), see Memória de tradução.
Ver também
These basic attributes set up and inform translators of a project:
Nome do projeto¶
Verbose project name, used to display the project name.
URL amigável¶
Project name suitable for URLs.
Site do projeto¶
URL where translators can find more info about the project.
This is a required parameter unless turned off by WEBSITE_REQUIRED
.
Instruções de tradução¶
URL to more site with more detailed instructions for translators.
Definir o cabeçalho do “Language-Team”¶
Whether Weblate should manage the Language-Team
header (this is a
GNU gettext only feature right now).
Controle de acesso¶
Configure per project access control, see Controle de acesso do projeto for more details.
Default value can be changed by DEFAULT_ACCESS_CONTROL
.
Habilitar revisões¶
Enable review workflow for translations, see Revisores dedicados.
Habilitar revisões de fontes¶
Enable review workflow for source strings, see Revisões de textos fonte.
Ver também
Habilitar ganchos¶
Whether unauthenticated Ganchos de notificação are to be used for this repository.
Aliases de idioma¶
Define language codes mapping when importing translations into Weblate. Use this when language codes are inconsistent in your repositories and you want to get a consistent view in Weblate or in case you want to use non-standard naming of your translation files.
The typical use case might be mapping American English to English: en_US:en
Multiple mappings to be separated by comma: en_GB:en,en_US:en
Using non standard code: ia_FOO:ia
Dica
Os códigos de idioma são mapeados ao combinar os arquivos de tradução e as correspondências diferenciam maiúsculas de minúsculas, por isso certifique-se de usar os códigos de idioma fonte na mesma forma usada nos nomes dos arquivos.
Ver também
Configuração de componente¶
A component is a grouping of something for translation. You enter a VCS repository location and file mask for which files you want translated, and Weblate automatically fetches from this VCS, and finds all matching translatable files.
Ver também
You can find some examples of typical configurations in the Formatos de arquivos suportados.
Nota
It is recommended to keep translation components to a reasonable size - split the translation by anything that makes sense in your case (individual apps or addons, book chapters or websites).
Weblate easily handles translations with 10000s of strings, but it is harder to split work and coordinate among translators with such large translation components.
Should the language definition for a translation be missing, an empty definition is created and named as “cs_CZ (generated)”. You should adjust the definition and report this back to the Weblate authors, so that the missing languages can be included in next release.
The component contains all important parameters for working with the VCS, and for getting translations out of it:
Nome do componente¶
Verbose component name, used to display the component name.
URL amigável do componente¶
Component name suitable for URLs.
Component project¶
Configuração de projeto where the component belongs.
Sistema de controle de versão¶
VCS to use, see Integração com controle de versão for details.
Ver também
Repositório do código-fonte¶
VCS repository used to pull changes.
Ver também
See Acessando repositórios for more details on specifying URLs.
Dica
This can either be a real VCS URL or weblate://project/component
indicating that the repository should be shared with another component.
See URLs internas do Weblate for more details.
URL de push do repositório¶
Repository URL used for pushing. This setting is used only for Git and Mercurial and push support is turned off for these when this is empty.
Ver também
See Acessando repositórios for more details on how to specify a repository URL and Fazendo push das alterações do Weblate for more details on pushing changes from Weblate.
Navegador do repositório¶
URL of repository browser used to display source files (location of used messages). When empty, no such links will be generated. You can use Template markup.
For example on GitHub, use something like:
https://github.com/WeblateOrg/hello/blob/{{branch}}/{{filename}}#L{{line}}
In case your paths are relative to different folder, you might want to strip leading
directory by parentdir
filter (see Template markup):
https://github.com/WeblateOrg/hello/blob/{{branch}}/{{filename|parentdir}}#L{{line}}
URL do repositório exportado¶
URL where changes made by Weblate are exported. This is important when Localização contínua is not used, or when there is a need to manually merge changes. You can use Exportador git to automate this for Git repositories.
Ramo do repositório¶
Which branch to checkout from the VCS, and where to look for translations.
Ramo do push¶
Branch for pushing changes, leave empty to use Ramo do repositório.
Nota
This is currently only supported for Git, GitLab and GitHub, it is ignored for other VCS integrations.
Ver também
Máscara de arquivo¶
Mask of files to translate, including path. It should include one “*” replacing language code (see Definições de idioma for info on how this is processed). In case your repository contains more than one translation file (e.g. more gettext domains), you need to create a component for each of them.
For example po/*.po
or locale/*/LC_MESSAGES/django.po
.
In case your filename contains special characters such as [
, ]
, these need
to be escaped as [[]
or []]
.
Arquivo de idioma da base monolíngue¶
Base file containing string definitions for Componentes monolíngues.
Editar o arquivo base¶
Whether to allow editing the base file for Componentes monolíngues.
Arquivo de idioma intermediário¶
Intermediate language file for Componentes monolíngues. In most cases this is a translation file provided by developers and is used when creating actual source strings.
When set, the source strings are based on this file, but all other languages are based on Arquivo de idioma da base monolíngue. In case the string is not translated into the source langugage, translating to other languages is prohibited. This provides Rota de qualidade para os textos fonte.
Modelo para novas traduções¶
Base file used to generate new translations, e.g. .pot
file with gettext.
Dica
In many monolingual formats Weblate starts with blank file by default. Use this in case you want to have all strings present with empty value when creating new translation.
Formato de arquivo¶
Translation file format, see also Formatos de arquivos suportados.
Endereço do relatório de erros do texto fonte¶
Email address used for reporting upstream bugs. This address will also receive notification about any source string comments made in Weblate.
Permitir propagação de tradução¶
You can turn off propagation of translations to this component from other components within same project. This really depends on what you are translating, sometimes it’s desirable to have make use of a translation more than once.
It’s usually a good idea to turn this off for monolingual translations, unless you are using the same IDs across the whole project.
Default value can be changed by DEFAULT_TRANSLATION_PROPAGATION
.
Habilitar sugestões¶
Whether translation suggestions are accepted for this component.
Votação de sugestões¶
Turns on vote casting for suggestions, see Votação de sugestões.
Aceitar sugestões automaticamente¶
Automatically accept voted suggestions, see Votação de sugestões.
Marcadores de tradução¶
Customization of quality checks and other Weblate behavior, see Personalizando comportamento usando marcadores.
Verificações forçadas¶
List of checks which can not be ignored, see Forçando verificações.
Nota
Enforcing the check does not automatically enable it, you still should enabled it using Personalizando comportamento usando marcadores in Marcadores de tradução or Informações adicionais sobre textos fonte.
Licença da tradução¶
License of the translation (does not need to be the same as the source code license).
Acordo de colaborador¶
Acordo de usuário que precisa ser aprovado antes de um usuário poder traduzir este componente.
Adicionando nova tradução¶
How to handle requests for creation of new languages. Available options:
- Contatar os mantenedores
User can select desired language and the project maintainers will receive a notification about this. It is up to them to add (or not) the language to the repository.
- Apontar para a URL de instruções de tradução
User is presented a link to page which describes process of starting new translations. Use this in case more formal process is desired (for example forming a team of people before starting actual translation).
- Criar novo arquivo de idioma
User can select language and Weblate automatically creates the file for it and translation can begin.
- Desabilitar adição de novas traduções
There will be no option for user to start new translation.
Dica
The project admins can add new translations even if it is disabled here when it is possible (either Modelo para novas traduções or the file format supports starting from an empty file).
Gerenciar textos¶
Novo na versão 4.5.
Configures whether users in Weblate will be allowed to add new strings and remove existing ones. Adjust this to match your localization workflow - how the new strings are supposed to be introduced.
For bilingual formats, the strings are typically extracted from the source code (for example by using xgettext) and adding new strings in Weblate should be disabled (they would be discarded next time you update the translation files). In Weblate you can manage strings for every translation and it does not enforce the strings in all translations to be consistent.
Para formatos monolíngues, os textos são gerenciados apenas no idioma fonte e são automaticamente adicionados ou removidos nas traduções. Os textos aparecem nos arquivos de tradução assim que são traduzidos.
Estilo de código de idioma¶
Personalize o código de idioma usado para gerar o nome do arquivo para traduções criado por Weblate.
Estilo de mesclagem¶
You can configure how updates from the upstream repository are handled. This might not be supported for some VCSs. See Merge ou rebase for more details.
Default value can be changed by DEFAULT_MERGE_STYLE
.
Mensagens de commit, add, merge e extensão¶
Message used when committing a translation, see Template markup.
Default value can be changed by DEFAULT_ADD_MESSAGE
,
DEFAULT_ADDON_MESSAGE
, DEFAULT_COMMIT_MESSAGE
,
DEFAULT_DELETE_MESSAGE
, DEFAULT_MERGE_MESSAGE
.
Push ao fazer commit¶
Whether committed changes should be automatically pushed to the upstream repository. When enabled, the push is initiated once Weblate commits changes to its underlying repository (see Commits adiados). To actually enable pushing Repository push URL has to be configured as well.
Idade das alterações para fazer commit¶
Sets how old (in hours) changes have to be before they are committed by
background task or the commit_pending
management command. All
changes in a component are committed once there is at least one change
older than this period.
Default value can be changed by COMMIT_PENDING_HOURS
.
Dica
There are other situations where pending changes might be committed, see Commits adiados.
Bloquear em erro¶
Locks the component (and linked components, see URLs internas do Weblate) upon the first failed push or merge into its upstream repository, or pull from it. This avoids adding another conflicts, which would have to be resolved manually.
The component will be automatically unlocked once there are no repository errors left.
Idioma fonte¶
Language used for source strings. Change this if you are translating from something else than English.
Dica
In case you are translating bilingual files from English, but want to be able to do fixes in the English translation as well, choose English (Developer) as a source language to avoid conflict between the name of the source language and the existing translation.
For monolingual translations, you can use intermediate translation in this case, see Arquivo de idioma intermediário.
Filtro de idioma¶
Regular expression used to filter the translation when scanning for filemask. It can be used to limit the list of languages managed by Weblate.
Nota
You need to list language codes as they appear in the filename.
Some examples of filtering:
Filter description |
Expressão regular |
---|---|
Selected languages only |
|
Exclude languages |
|
Filter two letter codes only |
|
Exclude non language files |
|
Include all files (default) |
|
Expressão regular de variantes¶
Regular expression used to determine the variants of a string, see Variantes de textos.
Nota
Most of the fields can be edited by project owners or managers, in the Weblate interface.
Prioridade¶
Componentes com prioridade mais alta são oferecidos primeiro para os tradutores.
Acesso restrito¶
By default the component is visible to anybody who has access to the project, even if the person can not perform any changes in the component. This makes it easier to keep translation consistency within the project.
Restricting access at a component, or component-list level takes over access permission to a component, regardless of project-level permissions. You will have to grant access to it explicitly. This can be done through granting access to a new user group and putting users in it, or using the default custom or private access control groups.
The default value can be changed in DEFAULT_RESTRICTED_COMPONENT
.
Dica
This applies to project admins as well — please make sure you will not loose access to the component after toggling the status.
Usar como um glossário¶
Novo na versão 4.5.
Allows using this component as a glossary. You can configure how it will be listed using Cor do glossário.
The glossary will be accessible in all projects defined by Compartilhar em projetos.
It is recommended to enable Gerenciar textos on glossaries in order to allow adding new words to them.
Ver também
Cor do glossário¶
Display color for a glossary used when showing word matches.
Template markup¶
Weblate uses simple markup language in several places where text rendering is needed. It is based on The Django template language, so it can be quite powerful.
Currently it is used in:
Commit message formatting, see Configuração de componente
There following variables are available in the component templates:
{{ language_code }}
Código do idioma
{{ language_name }}
Nome do idioma
{{ component_name }}
Nome do componente
{{ component_slug }}
URL amigável do componente
{{ project_name }}
Nome do projeto
{{ project_slug }}
URL amigável do projeto
{{ url }}
Translation URL
{{ filename }}
Nome do arquivo de tradução
{{ stats }}
Translation stats, this has further attributes, examples below.
{{ stats.all }}
Total strings count
{{ stats.fuzzy }}
Count of strings needing review
{{ stats.fuzzy_percent }}
Percent of strings needing review
{{ stats.translated }}
Translated strings count
{{ stats.translated_percent }}
Translated strings percent
{{ stats.allchecks }}
Number of strings with failing checks
{{ stats.allchecks_percent }}
Percent of strings with failing checks
{{ author }}
Author of current commit, available only in the commit scope.
{{ addon_name }}
Name of currently executed addon, available only in the addon commit message.
The following variables are available in the repository browser or editor templates:
{{branch}}
current branch
{{line}}
line in file
{{filename}}
filename, you can also strip leading parts using the
parentdir
filter, for example{{filename|parentdir}}
You can combine them with filters:
{{ component|title }}
You can use conditions:
{% if stats.translated_percent > 80 %}Well translated!{% endif %}
There is additional tag available for replacing characters:
{% replace component "-" " " %}
You can combine it with filters:
{% replace component|capfirst "-" " " %}
There are also additional filter to manipulate with filenames:
Directory of a file: {{ filename|dirname }}
File without extension: {{ filename|stripext }}
File in parent dir: {{ filename|parentdir }}
It can be used multiple times: {{ filename|parentdir|parentdir }}
…and other Django template features.
Importing speed¶
Fetching VCS repository and importing translations to Weblate can be a lengthy process, depending on size of your translations. Here are some tips:
Optimize configuration¶
The default configuration is useful for testing and debugging Weblate, while for a production setup, you should do some adjustments. Many of them have quite a big impact on performance. Please check Configuração de produção for more details, especially:
Configure Celery for executing background tasks (see Tarefas de fundo usando Celery)
Check resource limits¶
If you are importing huge translations or repositories, you might be hit by resource limitations of your server.
Check the amount of free memory, having translation files cached by the operating system will greatly improve performance.
Disk operations might be bottleneck if there is a lot of strings to process—the disk is pushed by both Weblate and the database.
Additional CPU cores might help improve performance of background tasks (see Tarefas de fundo usando Celery).
Disable unneeded checks¶
Some quality checks can be quite expensive, and if not needed,
can save you some time during import if omitted. See CHECK_LIST
for
info on configuration.
Automatic creation of components¶
In case your project has dozen of translation files (e.g. for different
gettext domains, or parts of Android apps), you might want to import them
automatically. This can either be achieved from the command line by using
import_project
or import_json
, or by installing the
Descoberta de componente addon.
To use the addon, you first need to create a component for one translation file (choose the one that is the least likely to be renamed or removed in future), and install the addon on this component.
For the management commands, you need to create a project which will contain all
components and then run import_project
or
import_json
.
Ver também