Memasang dari sumber¶
Silakan ikuti petunjuk pemasangan untuk sistem Anda terlebih dahulu hingga pemasangan Weblate:
Ambil sumber Weblate terbaru menggunakan Git (atau unduh tarball dan ekstrak):
git clone https://github.com/WeblateOrg/weblate.git weblate-src
Alternatifnya, Anda dapat menggunakan arsip yang telah dirilis. Anda dapat mengunduhnya dari situs web kami <https://weblate.org/>. Unduhan tersebut ditandatangani secara kriptografis, silakan lihat Memverifikasikan tanda tangan rilis.
Pasang kode Weblate saat ini ke dalam lingkungan Python:
. ~/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 Pengujian lokal Weblate.
Salin
weblate/settings_example.pykeweblate/settings.py.Sesuaikan nilai dalam berkas
settings.pyyang baru sesuai keinginan Anda. Anda perlu memberikan setidaknya kredensial basis data dan kunci rahasia Django, tetapi Anda akan memerlukan lebih banyak perubahan untuk pengaturan produksi, lihat Menyesuaikan konfigurasi.Buat basis data yang digunakan oleh Weblate, lihat Pengaturan basis data untuk Weblate.
Bangun tabel Django, berkas statis dan data awal (lihat Mengisi basis data dan Menyajikan berkas statis):
weblate migrate weblate collectstatic weblate compress
Catatan
Langkah ini harus diulang jika Anda memperbarui repositori.
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.
Lihat juga
See Pengujian lokal Weblate for test setup and Siklus rilis for Weblate's release cadence.