Instalar a partir do código fonte¶
Siga as instruções de instalação para o seu sistema primeiro até instalar o weblate:
Obtenha o código fonte mais recente do Weblate utilizando o Git (ou transfira um «tarball» e descompacte-o):
git clone https://github.com/WeblateOrg/weblate.git weblate-src
Alternativamente, pode utilizar arquivos lançados. Pode transferí-los do nosso “”site”” da Web <https://weblate.org/>. Esstas transferências são assinadas criptograficamente, consulte Verificar assinaturas de lançamento.
Install current Weblate code into the Python environment:
. ~/weblate-env/bin/activate uv pip install -e 'weblate-src[all]'
If you intend to run the testsuite from the source checkout, install the development dependencies as described in Local testing of Weblate.
Copie
weblate/settings_example.pyparaweblate/settings.py.Ajuste os valores no novo ficheiro
settings.pyde acordo com a sua preferência. Terá de fornecer pelo menos as credenciais da base de dados e o código secreto do Django, mas irá querer efetuar mais alterações para a configuração de produção, consulte Ajustar a configuração.Crie a base de dados utilziada pelo Weblate, consulte Configuração da base de dados para o Weblate.
Crie tabelas Django, ficheiros estáticos e dados iniciais (consulte Preencher a base de dados e Servir ficheiros estáticos):
weblate migrate weblate collectstatic weblate compress
Nota
Esta etapa deve ser repetida sempre que atualizar o repositório.
Packaging Weblate for distributions¶
The dependency versions in pyproject.toml describe the runtime
environment tested by the Weblate project. They are intentionally strict for
installs from PyPI and for the Weblate release process, because Weblate cannot
validate every dependency-version combination covered by wider version ranges.
Distribution packages can replace those Python packages with versions from the distribution package set. When doing so, run Weblate’s test suite against the packaged dependency set and treat passing tests as the compatibility signal for the distribution package.
Keep Weblate’s tightly coupled companion packages in sync with the Weblate release:
Mismatched versions of these packages are more likely to break at runtime or during tests than other Python dependency substitutions.
Veja também
See Local testing of Weblate for test setup and Release cycle for Weblate’s release cadence.