Installation sur RedHat, Fedora et CentOS

Exigences matérielles

Weblate devrait fonctionner sur n’importe quel matériel moderne sans problème, ce qui suit est la configuration minimale requise pour faire fonctionner Weblate sur un seul hôte (Weblate, base de données et serveur Web) :

  • 3 Go de RAM

  • processeur à deux coeurs

  • 1 Go d’espace de stockage

Note

Les exigences réelles pour votre installation de Weblate varient fortement en fonction de la taille des traductions qui y seront gérées.

Utilisation de la mémoire

The more memory the better - it is used for caching on all levels (file system, database and Weblate). For hundreds of translation components, at least 4 GB of RAM is recommended.

Indication

For systems with less memory than recommended, Single-process Celery setup is recommended.

Utilisation du processeur

Beaucoup d’utilisateurs concurrents augmentent le nombre nécessaire de coeurs du processeur.

Utilisation du stockage

The typical database storage usage is around 300 MB per 1 million hosted words.

Storage space needed for cloned repositories varies, but Weblate tries to keep their size minimal by doing shallow clones.

Noeuds

For small and medium-sized sites (millions of hosted words), all Weblate components (see Architecture overview) can be run on a single node.

When you grow to hundreds of millions of hosted words, it is recommended to have a dedicated node for database (see Configuration de la base de données pour Weblate).

Installation

Exigences du système

Installez les dépendances nécessaires à la construction des modules Python (voir Exigences logicielles) :

dnf install \
   libxslt-devel libxml2-devel freetype-devel libjpeg-devel zlib-devel \
   libyaml-devel libffi-devel cairo-devel cairo-gobject-devel pango-devel \
   gobject-introspection-devel libacl-devel lz4-devel libzstd-devel xxhash-devel \
   libtool-ltdl-devel python3-devel git

Installez les dépendances facultatives souhaitées en fonction des fonctionnalités que vous souhaitez utiliser (voir Dépendances python) :

dnf install openldap-devel cyrus-sasl-devel
dnf install xmlsec1-devel

Optionally install software for running production server, see Exécuter un serveur, Configuration de la base de données pour Weblate, Tâches en arrière-plan utilisant Celery. Depending on size of your installation you might want to run these components on dedicated servers.

The local installation instructions:

# Web server option 1: NGINX and uWSGI
dnf install nginx uwsgi uwsgi-plugin-python3

# Web server option 2: Apache with ``mod_wsgi``
dnf install httpd python3-mod_wsgi

# Caching backend: Valkey
dnf install valkey

# Database server: PostgreSQL
dnf install postgresql postgresql-contrib

# SMTP server
dnf install postfix

# Gettext for the msgmerge add-on
dnf install gettext

uv package manager

Indication

Nous utilisons le gestionnaire de paquets uv pour installer Weblate.

curl -LsSf https://astral.sh/uv/install.sh | sh

Voir aussi

Installing uv

Modules Python

Indication

We’re installing Weblate in a separate Python environment.

  1. Create the Python environment for Weblate:

    uv venv ~/weblate-env
    
  2. Activate the Python environment for Weblate:

    . ~/weblate-env/bin/activate
    
  3. Install Weblate including all optional dependencies:

    # Install Weblate with all optional dependencies
    uv pip install "weblate[all]"
    

    Please check Dépendances python for fine-tuning of optional dependencies.

Configurer Weblate

Note

The following assumes the Python environment used by Weblate is activated (by executing . ~/weblate-env/bin/activate). If not, specify the full path to the weblate command as ~/weblate-env/bin/weblate.

  1. Copy the file ~/weblate-env/lib/python3.9/site-packages/weblate/settings_example.py to ~/weblate-env/lib/python3.9/site-packages/weblate/settings.py.

  2. 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 Ajuster la configuration.

  3. Create the database and its structure for Weblate (the example settings use PostgreSQL, check Configuration de la base de données pour Weblate for a production-ready setup):

    weblate migrate
    

    Voir aussi

    migrate

  4. Create an administrator user account admin, generate its password, and copy it to the clipboard; remember to save it for later use:

    weblate createadmin
    

    Indication

    If you previously missed/lost the admin password, you can generate a new one with the following command:

    weblate createadmin --update
    

    Voir aussi

    createadmin

  5. Collect the static files for your web server (see Exécuter un serveur and Distribution des fichiers statiques):

    weblate collectstatic
    
  6. Compress the JavaScript and CSS files (optional, see Compression des assets clients):

    weblate compress
    
  7. Start the Celery workers. This is not necessary for development purposes, but strongly recommended otherwise. Tâches en arrière-plan utilisant Celery has more info:

    celery --app=weblate.utils worker --beat --queues=celery,notify,memory,translate,backup
    
  8. Start the development server (Exécuter un serveur details a production setup):

    weblate runserver
    

Après installation

Congratulations, your Weblate server is now running and you can start using it.

  • Vous pouvez maintenant accéder à Weblate sur http://localhost:8000/.

  • Sign in with admin credentials obtained during installation or register with new users.

  • You can now run Weblate commands using weblate command when Weblate Python environment is active, see Commandes de gestion.

  • You can stop the test server with Ctrl+C.

  • Review potential issues with your installation either on /manage/performance/ URL (see Rapport de performance) or using weblate check --deploy, see Configuration de production.

Ajouter une traduction

  1. Open the admin interface (http://localhost:8000/create/project/) and create the project you want to translate. See Configuration du projet for more details.

    All you need to specify here is the project name and its website.

  2. Create a component which is the real object for translation - it points to the VCS repository, and selects which files to translate. See Configuration des composants for more details.

    The important fields here are: Nom du composant, Dépôt du code source, and Masque de fichier for finding translatable files. Weblate supports a wide range of formats including GNU gettext PO (Portable Object), Ressources de chaînes Android, Chaînes Apple iOS, Propriétés Java, Format Stringsdict or Format Fluent, see Localization file formats for more details.

  3. Once the above is completed (it can be lengthy process depending on the size of your VCS repository, and number of messages to translate), you can start translating.