Upgrading Weblate
Docker kalıbı güncellemeleri
The official Docker image (see Docker ile kurmak) has all Weblate upgrade steps integrated. There are typically no manual steps needed besides pulling latest version.
Ayrıca bakınız
Generic upgrade instructions
Before upgrading, please check the current Yazılım gereksinimleri as they might have
changed. Once all requirements are installed or updated, please adjust your
settings.py
to match changes in the configuration (consult
settings_example.py
for correct values).
Always check Sürüme özel yönergeler before upgrade. In case you are skipping some versions, please follow instructions for all versions you are skipping in the upgrade. Sometimes it’s better to upgrade to some intermediate version to ensure a smooth migration. Upgrading across multiple releases should work, but is not as well tested as single version upgrades.
Not
It is recommended to perform a full database backup prior to upgrade so that you can roll back the database in case upgrade fails, see Weblate yedeğini alma ve taşıma.
Stop wsgi and Celery processes. The upgrade can perform incompatible changes in the database, so it is always safer to avoid old processes running while upgrading.
Weblate kodunu yükseltin.
Pip kurulumları için şöyle yapılabilir:
pip install -U "Weblate[all]==version"
Or, if you just want to get the latest released version:
pip install -U "Weblate[all]"
If you don’t want to install all of the optional dependencies do:
pip install -U Weblate
With Git checkout you need to fetch new source code and update your installation:
cd weblate-src git pull # Update Weblate inside your virtualenv . ~/weblate-env/bin/pip install -e . # Install dependencies directly when not using virtualenv pip install --upgrade -r requirements.txt # Install optional dependencies directly when not using virtualenv pip install --upgrade -r requirements-optional.txt
New Weblate release might have new İsteğe bağlı bağımlılıklar, please check if they cover features you want.
Upgrade configuration file, refer to
settings_example.py
or Sürüme özel yönergeler for needed steps.Veri tabanı yapısını yükseltin:
weblate migrate --noinput
Collect updated static files (see Sunucuyu çalıştırmak and Durağan dosyalar sunmak):
weblate collectstatic --noinput --clear
Compress JavaScript and CSS files (optional, see İstemci varlıklarının sıkıştırılması):
weblate compress
If you are running version from Git, you should also regenerate locale files every time you are upgrading. You can do this by invoking:
weblate compilemessages
Kurulumunuzun doğru olduğunu doğrulayın (bilgi almak için: :ref:`production’):
weblate check --deploy
Celery işlemini yeniden başlatın (bilgi almak için: Celery ile arka plan görevlerini kullanmak).
Sürüme özel yönergeler
2.x sürümünden yükseltmek
2.x sürümünden yükseltiyorsanız, her zaman ilk olarak 3.0.1 sürümüne yükseltin. Ardından 3.x serisinde yükseltme işlemini sürdürün. Bu adımı atlayan yükseltme işlemleri desteklenmez ve bozulur.
3.x sürümünden yükseltmek
3.x sürümünden yükseltme yapıyorsanız, her zaman ilk olarak 4.0.4 veya 4.1.1 sürümüne yükseltin. Ardından 4.x serisinde yükseltmeyi sürdürün. Bu adımı atlayan yükseltmeler desteklenmez ve bozulur.
4.0 sürümünden 4.1 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Önemli yapılandırma veya bağımlılık değişiklikleri:
There are several changes in
settings_example.py
, most notable middleware changes, please adjust your settings accordingly.There are new file formats, you might want to include them in case you modified the
WEBLATE_FORMATS
.There are new quality checks, you might want to include them in case you modified the
CHECK_LIST
.There is change in
DEFAULT_THROTTLE_CLASSES
setting to allow reporting of rate limiting in the API.Bazı yeni ve güncellenmiş gereksinimler vardır.
INSTALLED_APPS
içinde bir değişiklik var.The
MT_DEEPL_API_VERSION
setting has been removed in Version 4.7. The DeepL machine translation now uses the newMT_DEEPL_API_URL
instead. You might need to adjustMT_DEEPL_API_URL
to match your subscription.
Ayrıca bakınız
4.1 sürümünden 4.2 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Önemli yapılandırma veya bağımlılık değişiklikleri:
Upgrade from 3.x releases is not longer supported, please upgrade to 4.0 or 4.1 first.
Bazı yeni ve güncellenmiş gereksinimler vardır.
There are several changes in
settings_example.py
, most notable new middleware and changed application ordering.The keys for JSON based formats no longer include leading dot. The strings are adjusted during the database migration, but external components might need adjustment in case you rely on keys in exports or API.
The Celery configuration was changed to no longer use
memory
queue. Please adjust your startup scripts andCELERY_TASK_ROUTES
setting.The Weblate domain is now configured in the settings, see
SITE_DOMAIN
(orWEBLATE_SITE_DOMAIN
). You will have to configure it before running Weblate.The username and email fields on user database now should be case insensitive unique. It was mistakenly not enforced with PostgreSQL.
Ayrıca bakınız
4.2 sürümünden 4.3 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Önemli yapılandırma veya bağımlılık değişiklikleri:
There are some changes in quality checks, you might want to include them in case you modified the
CHECK_LIST
.The source language attribute was moved from project to a component what is exposed in the API. You will need to update Weblate istemcisi in case you are using it.
The database migration to 4.3 might take long depending on number of strings you are translating (expect around one hour of migration time per 100,000 source strings).
INSTALLED_APPS
içinde bir değişiklik var.There is a new setting
SESSION_COOKIE_AGE_AUTHENTICATED
which complementsSESSION_COOKIE_AGE
.In case you were using hub or lab to integrate with GitHub or GitLab, you will need to reconfigure this, see
GITHUB_CREDENTIALS
andGITLAB_CREDENTIALS
.
4.3.1 sürümünde değişti:
The Celery configuration was changed to add
memory
queue. Please adjust your startup scripts andCELERY_TASK_ROUTES
setting.
4.3.2 sürümünde değişti:
The
post_update
method of add-ons now takes extraskip_push
parameter.
Ayrıca bakınız
4.3 sürümünden 4.4 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Önemli yapılandırma veya bağımlılık değişiklikleri:
There is a change in
INSTALLED_APPS
,weblate.configuration
has to be added there.Artık Django 3.1 sürümü gerekiyor.
In case you are using MySQL or MariaDB, the minimal required versions have increased, see MySQL ve MariaDB.
4.4.1 sürümünde değişti:
Tek dilli gettext now uses both
msgid
andmsgctxt
when present. This will change identification of translation strings in such files breaking links to Weblate extended data such as screenshots or review states. Please make sure you commit pending changes in such files prior upgrading and it is recommended to force loading of affected component usingloadpo
.Increased minimal required version of translate-toolkit to address several file format issues.
Ayrıca bakınız
4.4 sürümünden 4.5 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Önemli yapılandırma veya bağımlılık değişiklikleri:
The migration might take considerable time if you had big glossaries.
Sözlükler artık normal bileşenler olarak tutuluyor.
The glossary API is removed, use regular translation API to access glossaries.
There is a change in
INSTALLED_APPS
-weblate.metrics
should be added.
4.5.1 sürümünde değişti:
There is a new dependency on the pyahocorasick module.
Ayrıca bakınız
4.5 sürümünden 4.6 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Önemli yapılandırma veya bağımlılık değişiklikleri:
There are new file formats, you might want to include them in case you modified the
WEBLATE_FORMATS
.API for creating components now automatically uses İç Weblate adresleri, see
POST /api/projects/(string:project)/components/
.There is a change in dependencies and
PASSWORD_HASHERS
to prefer Argon2 for passwords hashing.
Ayrıca bakınız
4.6 sürümünden 4.7 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Önemli yapılandırma veya bağımlılık değişiklikleri:
There are several changes in
settings_example.py
, most notable middleware changes (MIDDLEWARE
), please adjust your settings accordingly.The DeepL machine translation now has a generic
MT_DEEPL_API_URL
setting to adapt to different subscription models more flexibly. TheMT_DEEPL_API_VERSION
setting is no longer used.Artık Django 3.2 sürümü gerekiyor.
Ayrıca bakınız
4.7 sürümünden 4.8 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
There are no additional upgrade steps needed in this release.
Ayrıca bakınız
4.8 sürümünden 4.9 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
There is a change in storing metrics, the upgrade can take long time on larger sites.
Ayrıca bakınız
4.9 sürümünden 4.10 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
There is a change in per-project groups, the upgrade can take long time on sites with thousands of projects.
Django 4.0 has made some incompatible changes, see Backwards incompatible changes in 4.0. Weblate still supports Django 3.2 for now, in case any of these are problematic. Most notable changes which might affect Weblate:
Dropped support for PostgreSQL 9.6, Django 4.0 supports PostgreSQL 10 and higher.
Format of
CSRF_TRUSTED_ORIGINS
was changed.
The Docker container now uses Django 4.0, see above for changes.
Ayrıca bakınız
4.10 sürümünden 4.11 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Weblate için artık Django 3.2 gerekiyor.
The implementation of Her proje için erişim denetimi yönetimi has changed, removing the project prefix from the group names. This affects API users.
Weblate now uses
charset-normalizer
instead ofchardet
module for character set detection.Changed in 4.11.1: There is a change in
REST_FRAMEWORK
setting (removal of one of the backends inDEFAULT_AUTHENTICATION_CLASSES
).
Ayrıca bakınız
4.11 sürümünden 4.12 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Herhangi bir özel adım gerekmez.
Ayrıca bakınız
4.12 sürümünden 4.13 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
The Dil tanımları are now automatically updated on upgrade, use
UPDATE_LANGUAGES
to disable that.Handling of context and location has been changed for Windows RC dosyaları, HTML dosyaları, IDML biçimi, and Metin dosyaları file formats. In most cases the context is now shown as location.
The machine translation services are now configured using the user interface, settings from the configuration file will be imported during the database migration.
Ayrıca bakınız
4.13 sürümünden 4.14 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
The Java formatting checks now match GNU gettext flags. The flags set in Weblate will be automatically migrated, but third-party scripts will need to use
java-printf-format
instead ofjava-format
andjava-format
instead ofjava-messageformat
.The jellyfish dependency has been replaced by rapidfuzz.
4.14.2 sürümünde değiştirildi: VCS hizmeti API anahtarlarının güvenli olmayan yapılandırması, _CREDENTIALS listesi yerine _TOKEN/_USERNAME/ yapılandırmasıyla kullanımdan kaldırıldı. Docker üzerinde lütfen eşleşen _HOST yönergesini ekleyin. Örneğin
WEBLATE_GITHUB_HOST
veGITHUB_CREDENTIALS
bölümlerine bakın.
Ayrıca bakınız
4.14 sürümünden 4.15 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Weblate now requires
btree_gin
extension in PostgreSQL. The migration process will install it if it has sufficient privileges. See PostgreSQL üzerinde bir veri tabanı oluşturmak for manual setup.The Docker image no longer enables debug mode by default. In case you want it, enable it in the environment using
WEBLATE_DEBUG
.The database migration make take hours on larger instances due to recreating some of the indexes.
Changed in 4.15.1: The default value for
DEFAULT_PAGINATION_CLASS
in rest framework settings was changed.
Ayrıca bakınız
4.15 sürümünden 4.16 sürümüne yükseltmek
Güncellemek için Generic upgrade instructions adımlarını izleyin.
Celery beat is now storing the tasks schedule in the database,
CELERY_BEAT_SCHEDULER
andINSTALLED_APPS
need to be changed for that.The deprecated VCS setting for credentials is no longer supported, see 4.13 sürümünden 4.14 sürümüne yükseltmek.
django-crispy-forms yükseltmesi için
INSTALLED_APPS
içinde değişiklikler yapılmalıdır.Integration of django-cors-headers requires changes in
INSTALLED_APPS
andMIDDLEWARE
.
Ayrıca bakınız
Python 2 sürümünden Python 3 sürümüne yükseltmek
Weblate no longer supports Python older than 3.6. In case you are still running on older version, please perform migration to Python 3 first on existing version and upgrade later. See Upgrading from Python 2 to Python 3 in the Weblate 3.11.1 documentation.
Diğer veri tabanlarından PostgreSQL üzerine aktarım
If you are running Weblate on other dabatase than PostgreSQL, you should consider migrating to PostgreSQL as Weblate performs best with it. The following steps will guide you in migrating your data between the databases. Please remember to stop both web and Celery servers prior to the migration, otherwise you might end up with inconsistent data.
PostgreSQL üzerinde bir veri tabanı oluşturmak
Weblate için ayrı bir kullanıcı hesabı ile ayrı bir veri tabanı kullanmak genellikle iyi bir fikirdir:
# If PostgreSQL was not installed before, set the main password
sudo -u postgres psql postgres -c "\password postgres"
# Create a database user called "weblate"
sudo -u postgres createuser -D -P weblate
# Create the database "weblate" owned by "weblate"
sudo -u postgres createdb -E UTF8 -O weblate weblate
Django JSON dökümlerini kullanarak aktarım
The simplest approach for migration is to utilize Django JSON dumps. This works well for smaller installations. On bigger sites you might want to use pgloader instead, see Migrating to PostgreSQL using pgloader.
Add PostgreSQL as additional database connection to the
settings.py
:
DATABASES = {
"default": {
# Database engine
"ENGINE": "django.db.backends.mysql",
# Database name
"NAME": "weblate",
# Database user
"USER": "weblate",
# Database password
"PASSWORD": "password",
# Set to empty string for localhost
"HOST": "database.example.com",
# Set to empty string for default
"PORT": "",
# Additional database options
"OPTIONS": {
# In case of using an older MySQL server, which has MyISAM as a default storage
# 'init_command': 'SET storage_engine=INNODB',
# Uncomment for MySQL older than 5.7:
# 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
# If your server supports it, see the Unicode issues above
"charset": "utf8mb4",
# Change connection timeout in case you get MySQL gone away error:
"connect_timeout": 28800,
},
},
"postgresql": {
# Database engine
"ENGINE": "django.db.backends.postgresql",
# Database name
"NAME": "weblate",
# Database user
"USER": "weblate",
# Database password
"PASSWORD": "password",
# Set to empty string for localhost
"HOST": "database.example.com",
# Set to empty string for default
"PORT": "",
},
}
Run migrations and drop any data inserted into the tables:
weblate migrate --database=postgresql
weblate sqlflush --database=postgresql | weblate dbshell --database=postgresql
Dump legacy database and import to PostgreSQL
weblate dumpdata --all --output weblate.json
weblate loaddata weblate.json --database=postgresql
Adjust
DATABASES
to use just PostgreSQL database as default, remove legacy connection.
Weblate should be now ready to run from the PostgreSQL database.
Migrating to PostgreSQL using pgloader
The pgloader is a generic migration tool to migrate data to PostgreSQL. You can use it to migrate Weblate database.
Adjust your
settings.py
to use PostgreSQL as a database.Migrate the schema in the PostgreSQL database:
weblate migrate weblate sqlflush | weblate dbshell
Run the pgloader to transfer the data. The following script can be used to migrate the database, but you might want to learn more about pgloader to understand what it does and tweak it to match your setup:
LOAD DATABASE FROM mysql://weblate:password@localhost/weblate INTO postgresql://weblate:password@localhost/weblate WITH include no drop, truncate, create no tables, create no indexes, no foreign keys, disable triggers, reset sequences, data only ALTER SCHEMA 'weblate' RENAME TO 'public' ;
Pootle üzerinden aktarım
As Weblate was originally written as replacement from Pootle, it is supported
to migrate user accounts from Pootle. You can dump the users from Pootle and
import them using importusers
.