Instalar en SUSE y openSUSE¶
Requisitos de hardware¶
Weblate should run on any contemporary hardware without problems, the following is the minimal configuration required to run Weblate on a single host (Weblate, database and web server):
3 GB of RAM
2 núcleos de CPU
1 GB de espacio de almacenamiento
Nota
Actual requirements for your installation of Weblate vary heavily based on the size of the translations managed in it.
Consumo de memoria¶
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.
Consejo
For systems with less memory than recommended, Single-process Celery setup is recommended.
CPU usage¶
Many concurrent users increase the amount of needed CPU cores.
Storage usage¶
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.
Nodes¶
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 Configuración de base de datos para Weblate).
Instalación¶
Requisitos del sistema¶
Install the dependencies needed to build the Python modules (see Requisitos de software):
zypper install \
libxslt-devel libxml2-devel freetype-devel libjpeg-devel zlib-devel \
libyaml-devel libffi-devel cairo-devel pango-devel \
gobject-introspection-devel libacl-devel liblz4-devel libzstd-devel libxxhash-devel \
python3-devel git
Install wanted optional dependencies depending on features you intend to use (see Dependencias de Python):
zypper install libldap2-devel libsasl2-devel
zypper install libxmlsec1-devel
Optionally install software for running production server, see Running server, Configuración de base de datos para Weblate, Tareas en segundo plano con Celery. Depending on size of your installation you might want to run these components on dedicated servers.
Las instrucciones de instalación local:
# Web server option 1: NGINX and uWSGI
zypper install nginx uwsgi uwsgi-plugin-python3
# Web server option 2: Apache with ``mod_wsgi``
zypper install apache2 apache2-mod_wsgi
# Caching backend: Redis
zypper install redis-server
# Database server: PostgreSQL
zypper install postgresql postgresql-contrib
# SMTP server
zypper install postfix
# Gettext for the msgmerge add-on
zypper install gettext
uv package manager¶
Consejo
We’re using uv package manager to install Weblate.
curl -LsSf https://astral.sh/uv/install.sh | sh
Ver también
Módulos de Python¶
Consejo
We’re using virtualenv to install Weblate in a separate environment from your system. If you are not familiar with it, check virtualenv User Guide.
Cree el entorno virtual para Weblate:
uv venv ~/weblate-env
Active el entorno virtual para Weblate:
. ~/weblate-env/bin/activate
Instale Weblate incluyendo todas las dependencias opcionales:
# Install Weblate with all optional dependencies uv pip install "weblate[all]"
Please check Dependencias de Python for fine-tuning of optional dependencies.
Nota
On some Linux distributions running Weblate fails with libffi error:
ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' file seen at compile-time)
This is caused by incompatibility of binary packages distributed via PyPI with the distribution. To address this, you need to rebuild the package on your system:
uv pip install --force-reinstall --no-binary :all: cffi
Configurar Weblate¶
Nota
The following assumes the virtualenv 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
.
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
.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 Adjusting configuration.Create the database and its structure for Weblate (the example settings use PostgreSQL, check Configuración de base de datos para Weblate for a production-ready setup):
weblate migrate
Ver también
Create an administrator user account
admin
, generate its password, and copy it to the clipboard; remember to save it for later use:weblate createadmin
Consejo
If you previously missed/lost the admin password, you can generate a new one with the following command:
weblate createadmin --update
Ver también
Collect the static files for your web server (see Running server and Serving static files):
weblate collectstatic
Compress the JavaScript and CSS files (optional, see Compressing client assets):
weblate compress
Start the Celery workers. This is not necessary for development purposes, but strongly recommended otherwise. Tareas en segundo plano con Celery has more info:
~/weblate-env/lib/python3.9/site-packages/weblate/examples/celery start
Start the development server (Running server details a production setup):
weblate runserver
After installation¶
Congratulations, your Weblate server is now running and you can start using it.
You can now access Weblate on
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 virtualenv is active, see Órdenes de gestión.
You can stop the test server with Ctrl+C.
Review potential issues with your installation either on
/manage/performance/
URL (see Reporte de rendimiento) or using weblate check --deploy, see Puesta en marcha de entorno de producción.
Adding translation¶
Abrir la interfaz de administración (
http://localhost:8000/create/project/
) y crea el proyecto que deseas traducir. Ver Configuración de proyectos para más detalles.All you need to specify here is the project name and its website.
Crea un componente que es el objeto real para la traducción - apunta al repositorio VCS, y selecciona qué ficheros traducir. Véase Configuración de componentes para más detalles.
Los campos importantes aquí son: Nombre de componente, Repositorio de código fuente y Máscara de archivos para encontrar archivos traducibles. Weblate admite una amplia gama de formatos, incluidos GNU gettext PO (Portable Object), Recursos de cadenas de Android, Cadenas de iOS de Apple, Propiedades de Java, Formato Stringsdict o Formato fluido. Consulte Localization file formats para obtener más detalles.
Una vez completado lo anterior (puede ser un proceso largo dependiendo del tamaño de tu repositorio VCS, y del número de mensajes a traducir), puedes empezar a traducir.