從原始碼中安裝

  1. Please follow the installation instructions for your system first up to installing Weblate:

  2. 使用 Git 來抓取最新的 Weblate 資源 (或下載 tarball 包並將其解壓):

    git clone https://github.com/WeblateOrg/weblate.git weblate-src
    

    另外,您可以發佈檔案。從可以從我們的網站 <https://weblate.org/> 來下載。下載是加密簽名的,參閱 驗證發行簽名

  3. 安裝目前的 Weblate 程式碼到 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 Weblate 的本地測試.

  4. 複製 weblate/settings_example.pyweblate/settings.py

  5. Adjust the values in the new settings.py file to your liking. You will need to provide at least the database credentials and Django secret key, but you will want more changes for production setup, see 調整配置.

  6. 新增 Weblate 使用的資料庫,參閱 適用於 Weblate 的資料庫設定

  7. 建立 Django 資料表、靜態檔案和初始資料 (請參閱 Filling up the database提供靜態檔案 ):

    weblate migrate
    weblate collectstatic
    weblate compress
    

    備註

    無論任何時候更新儲存庫時,都應該重複這一步驟。

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.

也參考

See Weblate 的本地測試 for test setup and 發佈週期 for Weblate's release cadence.