Suplimente

Add-ons provide ways to customize and automate the translation workflow. Admins can add and manage add-ons from the OperationsAdd-ons menu of each respective translation project or component. Add-ons can be also installed site-wide in Interfața de gestionare.

Sugestie

You can also configure add-ons using API, DEFAULT_ADDONS, or install_addon.

Add-ons that opt in to manual triggering can be run from add-on management or using the API. Results are recorded in the add-on activity log.

../_images/addons.webp

Events that trigger add-ons

Add-on installation

Triggered when add-on is being installed.

Component update

Triggered whenever a change happens in a component such as:

  • Strings are changed in the repository.

  • A string is added.

  • A new translation is added.

Daily

Triggered daily, but add-ons usually split the daily load between components depending on BACKGROUND_TASKS.

Event change

Triggered after a Change event is created.

Manual trigger

Triggered when an add-on is run manually from add-on management or the API.

Repository post-add

Triggered just after the new translation is added and committed.

Repository post-commit

Triggered just after the changes are committed.

Repository post-push

Triggered just after the repository is pushed upstream.

Repository post-remove

Triggered just after a translation is removed.

Repository post-update

Triggered whenever new changes are pulled from the upstream repository.

Repository pre-commit

Triggered just before the changes are committed.

Repository pre-push

Triggered just before the repository is pushed upstream.

Repository pre-update

Triggered just before the repository update is attempted.

Unit post-save

Triggered just after the string is saved.

Unit post-sync

Triggered after the string is synchronized with the VCS.

Unit pre-create

Triggered just after the newly created string is saved.

Addon-uri încorporate

Traducere automată

ID add-on:

weblate.autotranslate.autotranslate

Configurație:

mode

Mod traducere automată

Alegerile disponibile:

suggest

Adaugă ca sugestie

translate

Adaugă ca traducere

fuzzy

Adaugă ca „Necesită editare”

q

Înterogare

Te rugăm să reții că traducerea tuturor șirurilor va elimina toate traducerile existente.

auto_source

Sursa traducerilor automate

Alegerile disponibile:

others

Alte componente de traducere

mt

Traducere automată

component

Componentă

Introdu descriptorul unei componente care urmează să fie utilizată ca sursă, păstrează spațiul gol pentru a utiliza toate componentele din proiectul curent.

engines

Motoare de traducere automată

Motoare de traducere automată

threshold

Prag de punctaj

Declanșări:

Add-on installation, Component update, Daily, Event change

Tradu automat șirurile cu ajutorul traducerii automate sau al altor componente.

CDN de localizare JavaScript

Added in version 4.2.

ID add-on:

weblate.cdn.cdnjs

Configurație:

threshold

Prag de traducere

The percentage of translated strings that must be present for translation to be included.

css_selector

Selector CSS

Selector CSS pentru detectarea elementelor traductibile.

cookie_name

Nume cookie de limbă

Nume cookie care stochează preferințe lingvistice.

files

Extrage șiruri din fișiere HTML

Listă de nume de fișiere din depozitarul curent sau de adrese URL la distanță care trebuie interpretate pentru șiruri traductibile.

Declanșări:

Add-on installation, Daily, Repository post-commit, Repository post-remove, Repository post-update

Publică traducerile în rețeaua de livrare de conținut pentru a fi utilizate în localizarea JavaScript sau HTML.

Poate fi utilizat pentru a localiza pagini HTML statice sau pentru a încărca localizarea în codul JavaScript.

Generează un URL unic pentru componenta dvs. pe care îl puteți include în paginile HTML pentru a le localiza. Consultați Traducerea HTML și JavaScript folosind Weblate CDN pentru mai multe detalii.

Notă

This add-on requires additional configuration on the Weblate server. LOCALIZE_CDN_PATH configures where generated files will be written (on a filesystem), and LOCALIZE_CDN_URL defines where they will be served (URL). Serving of the files is not done by Weblate and has to be set up externally (typically using a CDN service).

This add-on is configured on Hosted Weblate and serves the files via https://weblate-cdn.com/.

Translation files CDN

Added in version 2026.5.

ID add-on:

weblate.cdn.files

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Component update, Repository post-commit, Repository post-remove, Repository post-update

Publishes translation files into a content delivery network.

Publishes translation files without converting them to another format. Files are written below the add-on specific CDN directory and served from LOCALIZE_CDN_URL/<add-on UUID>/. Single-file translations use the language code and original file extension, for example cs.json or de.po. Multi-file translations are served below the language code using paths relative to the translation directory. Monolingual components include the source language file, while bilingual components publish only target-language files. See Localizare CDN for secure serving guidance.

Elimină șiruri goale

Added in version 4.4.

ID add-on:

weblate.cleanup.blank

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Repository post-commit, Repository post-update

Elimină șirurile fără traducere din fișierele de traducere.

Utilizați această opțiune pentru a nu avea șiruri goale în fișierele de traducere (de exemplu, dacă biblioteca de localizare le afișează ca fiind lipsă în loc să revină la șirul sursă).

Curăță fișierele de traducere

ID add-on:

weblate.cleanup.generic

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Repository post-update, Repository pre-commit

Actualizează toate fișierele de traducere pentru a se potrivi cu fișierul de bază monolingv. Pentru majoritatea formatelor de fișiere, aceasta înseamnă eliminarea cheilor de traducere învechite care nu mai sunt prezente în fișierul de bază.

For formats containing additional content besides translation strings (such as Fișiere HTML, Fișiere Windows RC, or Formatul OpenDocument) this also brings the translation file in sync with the base file.

Adaugă limbi lipsă

ID add-on:

weblate.consistency.languages

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Daily, Repository post-add

Asigură utilizarea unui set coerent de limbi pentru toate componentele unui proiect.

Notă

The components shared from other projects are not considered in this.

Limbile lipsă sunt verificate o dată la 24 de ore și atunci când sunt adăugate noi limbi în Weblate.

Spre deosebire de majoritatea celorlalte, acest add-on afectează întregul proiect.

Sugestie

Traduceți automat șirurile nou adăugate cu Traducere automată.

Descoperire componente

ID add-on:

weblate.discovery.discovery

Configurație:

match

Expresie regulată pentru a potrivi fișierele de traducere

The regular expression must define named groups for component and language.

file_format

Format fișier

Format fișier

name_template

Personalizează numele componentei

Use Django template syntax. This template must include {{ component }}.

base_file_template

Definește numele fișierului de bază monolingv

Leave empty for bilingual translation files. When set, this template must include {{ component }}.

new_base_template

Definește fișierul de bază pentru traduceri noi

Filename of file used for creating new translations. For gettext choose .pot file. This template must include {{ component }}.

intermediate_template

Fișier de limbă intermediar

Filename of intermediate translation file. In most cases this is a translation file provided by developers and is used when creating actual source strings. This template must include {{ component }}.

language_regex

Filtru limbă

Expresie regulată pentru filtrarea fișierelor de traducere la scanarea pentru masca de fișiere.

copy_addons

Clonare suplimente din componenta principală în cele nou create

remove

Elimină componente pentru fișiere inexistente

Declanșări:

Add-on installation, Repository post-update

Adaugă sau elimină automat componente ale proiectului pe baza modificărilor de fișiere din sistemul de control al versiunilor.

The matching is done using regular expressions enabling complex configuration, but some knowledge is required to do so. The regular expression to match translation files has to contain two named groups to match component and language. All named groups in the regular expression can be used as variables in the template fields.

Discovery requirements

To discover a component successfully, the configuration has to do all of the following:

  • The regular expression must define component and language named groups.

  • Template fields used to name or locate per-component files must include {{ component }}, so the rendered value actually changes for each discovered component.

  • For monolingual formats, the component must contain a file matching base_file_template and at least one translation file matching match.

Worked example: news_<lang>.md

This is a common filename-based language variant layout:

  • docs/news_en.md

  • docs/news_cs.md

  • docs/guide_en.md

Use the Filename-based language variants preset for a starting point, then choose the matching file format and review the populated values.

Regular expression:

(?:(?P<path>.*/))?(?P<component>.+?)_(?P<language>[A-Za-z]{2,3}(?:[_-][A-Za-z0-9]+)*)\.(?P<extension>[^/.]+)

Component name:

{{ component }}

Discovered file masks:
  • docs/news_*.md

  • docs/guide_*.md

In this example, {{ component }} resolves to the basename before the language suffix, so docs/news_en.md, docs/news_pt_BR.md, and docs/news_pt-BR.md all become the news component.

You can use Django template markup in all filename fields, for example:

{{ component }}

Component name parsed from the component match group

{{ component|title }}

Nume de fișier al componentei cu prima literă majusculă

{{ path }}: {{ component }}

Custom match group from the regular expression

După ce apăsați pe Save, va fi prezentată o previzualizare a componentelor corespunzătoare, de unde puteți verifica dacă configurația se potrivește cu nevoile dumneavoastră:

../_images/addon-discovery.webp

Component discovery examples

The worked example above covers the most common filename-based variant layout. The following examples show other repository structures you can match.

One folder per language

Un dosar pentru fiecare limbă care conține fișiere de traducere pentru componente.

Regular expression:

(?P<language>[^/.]*)/(?P<component>[^/]*)\.po

Matching files:
  • cs/application.po

  • cs/website.po

  • de/application.po

  • de/website.po

Gettext locales layout

Structura obișnuită pentru stocarea fișierelor gettext PO.

Regular expression:

locale/(?P<language>[^/.]*)/LC_MESSAGES/(?P<component>[^/]*)\.po

Matching files:
  • locale/cs/LC_MESSAGES/application.po

  • locale/cs/LC_MESSAGES/website.po

  • locale/de/LC_MESSAGES/application.po

  • locale/de/LC_MESSAGES/website.po

Complex filenames

Utilizarea atât a componentei, cât și a denumirii limbii în numele fișierului.

Regular expression:

src/locale/(?P<component>[^/]*)\.(?P<language>[^/.]*)\.po

Matching files:
  • src/locale/application.cs.po

  • src/locale/website.cs.po

  • src/locale/application.de.po

  • src/locale/website.de.po

Repeated language code

Utilizarea limbii atât în calea de acces, cât și în numele fișierului.

Regular expression:

locale/(?P<language>[^/.]*)/(?P<component>[^/]*)/(?P=language)\.po

Matching files:
  • locale/cs/application/cs.po

  • locale/cs/website/cs.po

  • locale/de/application/de.po

  • locale/de/website/de.po

Split Android strings

Șiruri de resurse Android, împărțite în mai multe fișiere.

Regular expression:

res/values-(?P<language>[^/.]*)/strings-(?P<component>[^/]*)\.xml

Matching files:
  • res/values-cs/strings-about.xml

  • res/values-cs/strings-help.xml

  • res/values-de/strings-about.xml

  • res/values-de/strings-help.xml

Matching multiple paths

Multi-module Maven project with Java properties translations.

Regular expression:

(?P<originalHierarchy>.+/)(?P<component>[^/]*)/src/main/resources/ApplicationResources_(?P<language>[^/.]*)\.properties

Component name:

{{ originalHierarchy }}: {{ component }}

Matching files:
  • parent/module1/submodule/src/main/resources/ApplicationResources_fr.properties

  • parent/module1/submodule/src/main/resources/ApplicationResource_es.properties

  • parent/module2/src/main/resources/ApplicationResource_de.properties

  • parent/module2/src/main/resources/ApplicationResource_ro.properties

Sugestie

Component discovery add-on uses URL-uri interne Weblate. It’s a convenient way to share VCS setup between multiple components. Linked components use the local repository of the main component set up by filling weblate://project/main-component into the Depozitar cod sursă field (in OperationsSettingsVersion control system) of each respective component. This saves time with configuration and system resources too.

Sugestie

Ensure the new component contains the full set of translatable languages with Adaugă limbi lipsă.

Fedora Messaging

Added in version 5.15.

ID add-on:

weblate.fedora_messaging.publish

Configurație:

events

Change events

Change events

amqp_host

AMQP broker host

The AMQP broker to connect to.

amqp_ssl

Use SSL for AMQP connection

ca_cert

CA certificates

Bundle of PEM encoded CA certificates used to validate the certificate presented by the server.

client_key

Client SSL key

PEM encoded client private SSL key.

client_cert

Client SSL certificates

PEM encoded client SSL certificate.

Declanșări:

Event change

Sends notifications to a Fedora Messaging compatible AMQP exchange.

Fedora Messaging este un editor bazat pe AMQP pentru toate modificările care se produc în Weblate. Puteți agăța servicii suplimentare pe modificările care se produc în Weblate folosind acest lucru.

Message topic

All messages have topic weblate.<action>.<project>.<component>.<translation>. The action is lowercase textual representation of action with underscores instead of space, for example resource_update, all other parts are optional and represent slug of the object or a language code.

Message body

The body consists of following fields (given that they are available for the event):

change_id

Numerical ID of change

action

Verbose name of the change.

timestamp

ISO formatted timestamp

target

New value of the change (eg. new translation of the string)

old

Old value of the change (eg. previous translation of the string)

source

Source string.

url

Absolute URL to view the related object.

author

Author username (this can be different from user for example when accepting suggestions)

user

Acting username

project

Limbajul proiectului

component

Componenta slug

translation

Codul limbii de traducere

Message headers

There are additional headers which you might utilize for routing as well:

action

Verbose name of the change.

project

Limbajul proiectului

component

Componenta slug

Example messages

Repository merge event:

{
  "id": 1,
  "action": "Merged repository",
  "timestamp": "2017-06-15T11:30:47.325000+00:00",
  "url": "http://example.com/projects/test/test/",
  "component": "test"
}

New source string event:

{
  "id": 2,
  "action": "New source string",
  "timestamp": "2017-06-15T11:30:47.372000+00:00",
  "url": "http://example.com/translate/test/test/cs/?checksum=6412684aaf018e8e",
  "component": "test",
  "translation": "cs",
  "source": ["Hello, world!\n"]
}

Resource update event:

{
  "id": 6,
  "action": "Resource update",
  "timestamp": "2017-06-15T11:30:47.410000+00:00",
  "url": "http://example.com/projects/test/test/cs/",
  "project": "test",
  "component": "test",
  "translation": "cs"
}
{
  "id": 7,
  "action": "Resource update",
  "timestamp": "2017-06-15T11:30:47.510000+00:00",
  "url": "http://example.com/projects/test/test/de/",
  "project": "test",
  "component": "test",
  "translation": "de"
}
{
  "id": 8,
  "action": "Resource update",
  "timestamp": "2017-06-15T11:30:47.595000+00:00",
  "url": "http://example.com/projects/test/test/it/",
  "project": "test",
  "component": "test",
  "translation": "it"
}

Project removal event:

{
  "id": 9,
  "action": "Removed project",
  "timestamp": "2019-10-17T15:57:08.559420+00:00",
  "target": "test",
  "user": "testuser"
}

New contributor event:

{
  "id": 11,
  "action": "New contributor",
  "timestamp": "2019-10-17T15:57:08.759960+00:00",
  "url": "http://example.com/translate/test/test/cs/?checksum=6412684aaf018e8e",
  "author": "testuser",
  "user": "testuser",
  "project": "test",
  "component": "test",
  "translation": "cs",
  "source": ["Hello, world!\n"]
}

New translation event:

{
  "id": 12,
  "action": "New translation",
  "timestamp": "2019-10-17T15:57:08.772591+00:00",
  "url": "http://example.com/translate/test/test/cs/?checksum=6412684aaf018e8e",
  "target": ["Ahoj svete!\n"],
  "author": "testuser",
  "user": "testuser",
  "project": "test",
  "component": "test",
  "translation": "cs",
  "source": ["Hello, world!\n"]
}

Editare în masă

ID add-on:

weblate.flags.bulk

Configurație:

q

Înterogare

state

Stare de setat

Alegerile disponibile:

-1

Nu modifica

10

Necesită editare

11

Needs editing (Needs rewriting)

12

Needs editing (Needs checking)

20

Tradus

30

Aprobat

add_flags

Indicator de traducere de adăugat

remove_flags

Indicatoare de traducere de eliminat

add_labels

Etichete de adăugat

remove_labels

Etichete de eliminat

Declanșări:

Add-on installation, Component update

Editează majoritatea semnalărilor, etichetelor sau stării șirurilor.

Exemple:

Etichetarea automată a șirurilor noi

Interogare de căutare

NOT has:label

Etichete de adăugat

recent

Marcarea tuturor șirurilor de modificare Fișiere de metadate magazin de aplicații changelog numai pentru citire

Interogare de căutare

language:en AND key:changelogs/

Indicator de traducere de adăugat

read-only

Marking certain strings read-only

Interogare de căutare

source:r"^\`\`[.a-zA-Z0-9_-]*\`\`$" AND language:en

Indicator de traducere de adăugat

read-only

Flag unchanged translations as „Needs rewriting”

ID add-on:

weblate.flags.same_edit

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Unit pre-create

Whenever a new translatable string is imported from the VCS and it matches a source string, it is flagged as needing rewriting in Weblate. Especially useful for file formats that include source strings for untranslated strings.

Sugestie

De asemenea, este posibil să doriți să întăriți verificarea Traducere neschimbată prin adăugarea indicatorului strict-same la Indicarori traducere.

Flag new source strings as „Needs checking”

ID add-on:

weblate.flags.source_edit

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Unit pre-create

Whenever a new source string is imported from the VCS, it is flagged as needing checking in Weblate. This way you can easily filter and edit source strings written by the developers.

Flag new translations as „Needs rewriting”

ID add-on:

weblate.flags.target_edit

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Unit pre-create

Whenever a new translatable string is imported from the VCS, it is flagged as needing rewriting in Weblate. This way you can easily filter and edit translations created by the developers.

Flag updated translations from repository as „Needs rewriting”

ID add-on:

weblate.flags.target_repo_update

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Unit post-sync

Whenever a string translation is changed from the VCS, it is flagged as needing rewriting in Weblate. Especially useful if translation files are often updated manually or by an external service.

Completare șiruri doar pentru citire cu sursa

Added in version 4.18.

ID add-on:

weblate.generate.fill_read_only

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Component update, Daily

Completează șirurile de traducere doar pentru citire cu șirul sursă.

Generator de statistici

ID add-on:

weblate.generate.generate

Configurație:

filename

Nume fișier generat

template

Conținut fișier generat

Declanșări:

Add-on installation, Repository pre-commit

Generează un fișier care conține informații detaliate despre starea traducerii.

Puteți utiliza un șablon Django atât în numele fișierului, cât și în conținut; consultați Marcarea șablonului pentru o descriere detaliată a marcajului.

De exemplu, generarea unui fișier de sinteză pentru fiecare traducere:

Nume fișier generat

locale/{{ language_code }}.json

Conținut
{
   "language": "{{ language_code }}",
   "strings": "{{ stats.all }}",
   "translated": "{{ stats.translated }}",
   "last_changed": "{{ stats.last_changed }}",
   "last_author": "{{ stats.last_author }}",
}

Precompletare traducere cu sursa

Added in version 4.11.

ID add-on:

weblate.generate.prefill

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Component update, Daily

Completează șirurile de traducere cu șirul sursă.

All untranslated strings in the component will be filled with the source string, and marked as needing edit. Use this when you can not have empty strings in the translation files. .. AUTOGENERATED START: weblate.generate.pseudolocale .. This section is automatically generated by ./manage.py list_addons. Do not edit manually.

Generare pseudolocale

Added in version 4.5.

ID add-on:

weblate.generate.pseudolocale

Configurație:

source

Șiruri sursă

target

Traducere țintă

Toate șirurile din această traducere vor fi suprascrise

prefix

Prepended static text

var_prefix

Prepended variable text

suffix

Appended static text

var_suffix

Appended variable text

var_multiplier

Variable text multiplier

How many times to repeat the variable text depending on the length of the source string.

include_readonly

Include șiruri doar pentru citire

Declanșări:

Add-on installation, Component update, Daily

Generează o traducere prin adăugarea automată a prefixului și sufixului la șirurile sursă.

Pseudolocalele sunt utile pentru a găsi șiruri de caractere care nu sunt pregătite pentru localizare. Acest lucru se realizează prin modificarea tuturor șirurilor sursă traductibile pentru a facilita identificarea șirurilor nealterate la rularea aplicației în limba pseudolocală.

De asemenea, este posibil să se găsească șiruri de caractere ale căror omologi localizați ar putea să nu se potrivească cu aspectul.

Using the variable parts makes it possible to look for strings which might not fit into the user interface after the localization - it extends the text based on the source string length. The variable texts are repeated by length of the text multiplied by the multiplier. For example Hello world with variable text _ and variable multiplier of 1 becomes Hello world___________ - the text is repeated once for each character in the source string.

Șirurile vor fi generate folosind următorul model:

Prepended static text Prepended variable text Source string Appended variable text Appended static text

Sugestie

Puteți folosi limbi reale pentru testare, dar există pseudolocale dedicate disponibile în Weblate - en_XA și ar_XB.

Sugestie

Puteți utiliza acest add-on pentru a începe traducerea într-o nouă locație a unei limbi existente sau a unei limbi similare. După ce adăugați traducerea la componentă, urmați la add-on. Exemplu: Dacă aveți fr și doriți să începeți traducerea fr_CA, setați pur și simplu fr ca sursă, fr_CA ca țintă și lăsați prefixul și sufixul goale.

Dezinstalați add-on-ul după ce ați completat noua traducere pentru a împiedica Weblate să modifice traducerile făcute după copiere.

Contribuitori în comentariu

ID add-on:

weblate.gettext.authors

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Repository pre-commit

Actualizează partea de comentarii din antetul fișierului PO pentru a include numele contribuitorilor și anii de contribuție.

Antetul fișierului PO va arăta în felul următor:

# Michal Čihař <michal@weblate.org>, 2012, 2018, 2019, 2020.
# Pavel Borecki <pavel@example.com>, 2018, 2019.
# Filip Hron <filip@example.com>, 2018, 2019.
# anonymous <noreply@weblate.org>, 2019.

Actualizarea variabilei ALL_LINGUAS în fișierul „configure”

ID add-on:

weblate.gettext.configure

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Daily, Repository post-add, Repository post-remove

Updates the ALL_LINGUAS variable in „configure”, „configure.in” or „configure.ac” files, when a translation is added or removed.

Updates the ALL_LINGUAS variable in configure, configure.in or any configure.ac files, when a translation is added or removed.

Personalizare ieșire gettext

Removed in version 5.13: Replaced by File format parameters.

Update gettext template (Django)

Added in version 5.17.

ID add-on:

weblate.gettext.django

Configurație:

interval

Update frequency

How often the add-on should update the POT file when the component is refreshed.

Alegerile disponibile:

daily

Daily

weekly

Weekly

monthly

Lunar

normalize_header

Normalize POT header

Updates gettext headers and replaces placeholder POT comments.

Declanșări:

Add-on installation, Manual trigger, Repository post-update

Updates the gettext template using Django’s built-in makemessages command.

Actualizare fișier LINGUAS

ID add-on:

weblate.gettext.linguas

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Daily, Repository post-add, Repository post-remove

Updates the LINGUAS file when a translation is added or removed.

Update POT file (Meson)

Added in version 5.17.

ID add-on:

weblate.gettext.meson

Configurație:

interval

Update frequency

How often the add-on should update the POT file when the component is refreshed.

Alegerile disponibile:

daily

Daily

weekly

Weekly

monthly

Lunar

normalize_header

Normalize POT header

Updates gettext headers and replaces placeholder POT comments.

comment_mode

Code comments

Choose whether xgettext should extract no comments, all comments, or only comments marked with a specific tag.

Alegerile disponibile:

off

Do not extract comments

all

Extract all comments

tagged

Extract comments with tag

comment_tag

Comment tag

Tag passed to xgettext for comment extraction when using tagged comment mode.

checks

xgettext checks

Additional xgettext validation checks to enable for extracted messages.

Alegerile disponibile:

ellipsis-unicode

ellipsis-unicode

space-ellipsis

space-ellipsis

quote-unicode

quote-unicode

bullet-unicode

bullet-unicode

keyword

Additional keyword

Optional extra keyword passed to xgettext using –keyword.

preset

Meson preset

Built-in xgettext argument preset matching Meson gettext integration. The GLib preset adds the keyword and format-flag options used by Meson’s gettext helper.

Alegerile disponibile:

glib

GLib

Declanșări:

Add-on installation, Manual trigger, Repository post-update

Updates the gettext template using Meson gettext conventions.

Generare fișiere MO

ID add-on:

weblate.gettext.mo

Configurație:

path

Cale către fișierul MO generat

Dacă nu este specificat, se va utiliza locația fișierului PO.

fuzzy

Include șiruri care necesită editare

Șirurile care au nevoie de editare (neclare) nu sunt de obicei pregătite pentru a fi utilizate ca traduceri.

Declanșări:

Repository pre-commit

Generează automat un fișier MO pentru fiecare fișier PO modificat.

Locația fișierului MO generat poate fi personalizată, iar câmpul pentru acesta utilizează Marcarea șablonului.

Notă

If a translation is removed, its PO file will be deleted from the repository, but the MO file generated by this add-on will not. The MO file must be removed from the upstream manually.

Actualizare fișiere PO pentru a se potrivi cu POT (msgmerge)

Schimbat în versiunea 5.13: Settings configuration has been moved to File format parameters.

ID add-on:

weblate.gettext.msgmerge

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Repository post-update

Actualizează toate fișierele PO (conform configurației „Mască de fișier”) pentru a se potrivi cu fișierul POT (conform configurației „Șablon pentru traduceri noi”) utilizând msgmerge.

This add-on is essential when working with gettext PO files where the POT (template) file is updated with new strings or changes to existing strings. When the POT file is updated in the repository, this add-on automatically merges those changes into all language PO files, ensuring that:

  • New translatable strings appear in all languages

  • Removed strings are marked as obsolete

  • Modified strings are marked as needing review (fuzzy)

Most msgmerge command-line options can be set up through file format parameters configuration.

Update POT file (Sphinx)

Added in version 5.17.

ID add-on:

weblate.gettext.sphinx

Configurație:

interval

Update frequency

How often the add-on should update the POT file when the component is refreshed.

Alegerile disponibile:

daily

Daily

weekly

Weekly

monthly

Lunar

normalize_header

Normalize POT header

Updates gettext headers and replaces placeholder POT comments.

filter_mode

Filtering

Optionally remove strings that are not useful to translate after Sphinx extraction.

Alegerile disponibile:

none

Nici unul

weblate_docs

Weblate documentation

Declanșări:

Add-on installation, Manual trigger, Repository post-update

Updates the gettext template using Sphinx’s gettext builder without loading project configuration.

Update POT file (xgettext)

Added in version 5.17.

ID add-on:

weblate.gettext.xgettext

Configurație:

interval

Update frequency

How often the add-on should update the POT file when the component is refreshed.

Alegerile disponibile:

daily

Daily

weekly

Weekly

monthly

Lunar

normalize_header

Normalize POT header

Updates gettext headers and replaces placeholder POT comments.

comment_mode

Code comments

Choose whether xgettext should extract no comments, all comments, or only comments marked with a specific tag.

Alegerile disponibile:

off

Do not extract comments

all

Extract all comments

tagged

Extract comments with tag

comment_tag

Comment tag

Tag passed to xgettext for comment extraction when using tagged comment mode.

checks

xgettext checks

Additional xgettext validation checks to enable for extracted messages.

Alegerile disponibile:

ellipsis-unicode

ellipsis-unicode

space-ellipsis

space-ellipsis

quote-unicode

quote-unicode

bullet-unicode

bullet-unicode

keyword

Additional keyword

Optional extra keyword passed to xgettext using –keyword.

input_mode

Input source

Choose whether xgettext should read source files from glob patterns or from a POTFILES/POTFILES.in manifest.

Alegerile disponibile:

patterns

Source file patterns

potfiles

POTFILES manifest

language

xgettext language

Programming language passed to xgettext, for example Python or C.

source_patterns

Source file patterns

Newline-separated repository-relative glob patterns for files to extract with xgettext.

potfiles_path

POTFILES path

Repository-relative path to POTFILES or POTFILES.in. Entries are resolved relative to the repository root. If present next to the manifest, POTFILES.skip excludes listed files from extraction.

Declanșări:

Add-on installation, Manual trigger, Repository post-update

Updates the gettext template using xgettext on selected source files.

Comasează comiteri Git

ID add-on:

weblate.git.squash

Configurație:

squash

Comitere prin comasare

Alegerile disponibile:

all

Toate comiterile într-una singură

language

Pentru fiecare limbă în parte

file

Pentru fiecare fișier în parte

author

Pentru fiecare autor în parte

append_trailers

Adăugă trailere la mesajul de comitere comasată

Liniile de trailer sunt linii care se aseamănă cu anteturile de e-mail RFC 822, la sfârșitul părții de formă liberă a unui mesaj de comitere, cum ar fi „Co-autor: …”.

commit_message

Mesaj comitere

Acest mesaj de comitere va fi utilizat în locul mesajelor de comitere combinate de la comiterile comasate.

Declanșări:

Add-on installation, Repository post-commit

Comasează comiteri Git înainte de a încărca modificările.

Sugestie

To avoid unnecessary conflicts, it is recommended to configure automatic receiving of upstream changes by webhooks or API, see Actualizarea depozitelor.

Comițările Git pot fi eliminate înainte de împingerea modificărilor în unul dintre următoarele moduri:

  • Toate comiterile într-una singură

  • Pentru fiecare limbă în parte

  • Pentru fiecare fișier în parte

  • Pentru fiecare autor în parte

Mesajele de confirmare originale sunt păstrate, dar se pierde paternitatea, cu excepția cazului în care se selectează Per author sau mesajul de confirmare este personalizat pentru a o include.

Mesajele de confirmare originale pot fi opțional înlocuite cu un mesaj de confirmare personalizat.

Remetele (commit lines like Co-authored-by: ) pot fi opțional eliminate din mesajele de confirmare originale și adăugate la sfârșitul mesajului de confirmare strivit. Acest lucru generează, de asemenea, creditul corespunzător Co-authored-by: pentru fiecare traducător.

Personalizare ieșire JSON

Schimbat în versiunea 5.12: Avoid spaces after separators option added.

Removed in version 5.13: Replaced by File format parameters.

Resetează depozitarul la sursa principală

Added in version 5.17.

ID add-on:

weblate.hosted.reset

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Daily

Elimină toate modificările din depozitarul Weblate în fiecare noapte.

Formatare fișier de proprietăți Java

ID add-on:

weblate.properties.sort

Configurație:

case_sensitive

Enable case-sensitive key sorting

Declanșări:

Repository pre-commit

Formatează și sortează fișierul de proprietăți Java.

  • Consolidează liniile noi la cele Unix.

  • Formatarea cu majuscule a secvențelor de evacuare Unicode (în cazul în care acestea sunt prezente).

  • Șiruri cu observații.

  • Sortează șirurile de caractere în funcție de chei.

  • Renunță la șirurile duplicate.

Elimină comentariu învechit

ID add-on:

weblate.removal.comments

Configurație:

age

Zile de păstrat

Declanșări:

Add-on installation, Daily

Setare termen pentru eliminare comentarii.

Acest lucru poate fi util pentru a elimina comentariile vechi care ar putea fi depășite. Folosiți-o cu grijă, deoarece faptul că comentariile devin vechi nu înseamnă că și-au pierdut importanța.

Elimină sugestie învechită

ID add-on:

weblate.removal.suggestions

Configurație:

age

Zile de păstrat

votes

Prag de vot

Threshold for removal. Leave empty to remove suggestions regardless of votes. This field has no effect with voting turned off.

Declanșări:

Add-on installation, Daily

Setare termen pentru eliminare sugestii.

Poate fi foarte utilă în legătură cu votarea sugestiilor (see Evaluare reciprocă) pentru a elimina sugestiile care nu primesc suficiente voturi pozitive într-un anumit interval de timp.

Actualizare fișiere RESX

ID add-on:

weblate.resx.update

Configurație:

Acest add-on nu are nicio configurație.

Declanșări:

Add-on installation, Repository post-update

Actualizează toate fișierele de traducere pentru a se potrivi cu fișierul sursă monolingv din sursă principală. Șirurile neutilizate sunt eliminate, iar cele noi sunt adăugate ca copii ale șirului sursă.

Sugestie

Utilizați Curăță fișierele de traducere dacă doriți să eliminați doar cheile de traducere vechi.

Slack Webhooks

Added in version 5.12.

ID add-on:

weblate.webhook.slack

Configurație:

webhook_url

Webhook URL

events

Change events

Change events

Declanșări:

Event change

Sends notification to a Slack channel based on selected events.

Atenționare

The notification content might show HTML tags. This is a known issue that will be soon addressed; see https://github.com/WeblateOrg/weblate/issues/15056.

Sugestie

To obtain a webhook URL, follow the steps outlined in the Slack Incoming Webhooks documentation

Webhook

Added in version 5.11.

Schimbat în versiunea 5.15: Compliance of the secret length with the specification is now validated.

ID add-on:

weblate.webhook.webhook

Configurație:

webhook_url

Webhook URL

secret

Webhook secret

The Standard Webhooks secret is a base64 encoded string.

events

Change events

Change events

Declanșări:

Event change

Sends notifications to external services based on selected events, following the Standard Webhooks specification.

The request payload complies with the Weblate Messaging schema. The OpenAPI description can also be found at /api/docs/. Sample request body:

{
   "change_id": 99,
   "action": "Translation changed",
   "timestamp": "2019-08-24T14:15:22Z",
   "target": "Nazdar svete!",
   "old": "Nazdar!",
   "source": "Hello, world",
   "url": "/translate/project-slug/component-slug/cs/?checksum=46add148a53cab6f",
   "author": "author-username",
   "user": "user-username",
   "project": "project-slug",
   "component": "component-slug",
   "translation": "cs"
}

Sample request body with categories:

{
   "change_id": 8910,
   "action": "Component renamed",
   "timestamp": "2025-06-11T07:15:09Z",
   "target": ["new-name"],
   "old": ["component-slug"],
   "url": "/projects/project-slug/parent-category/child-category/sub-category/component-slug/",
   "user": "testuser",
   "project": "project-slug",
   "component": "component-slug",
   "category": [
      "sub-category",
      "child-category",
      "parent-category"
   ]
}

Sample request headers:

{
   "webhook-id": "7f1c5477f6275a69af7b83236c20cb1a",
   "webhook-timestamp": "1748505623.044281",
   "webhook-signature": "v1,Ceo5qEr07ixe2NLpvHk3FH9bwy/WavXrAFQ/9tdO6mc="
}

The webhook-signature is a space separated list of HMAC signatures generated using the secret string, the request payload, the webhook-timestamp, and the webhook-id. This ensures the authenticity and integrity of the webhook request.

The provided secret is a base64 encoded string between 24 bytes (192 bits) and 64 bytes (512 bits). It can be prefixed with whsec_ for easy identification.

To verify a request, you can use the Webhook.verify method from the standardwebhooks library or an implementation of the „Standard Webhooks Specification”.

Obsolete add-ons

Personalizare ieșire XML

Added in version 4.15.

Removed in version 5.13: Replaced by File format parameters.

Personalizare ieșire YAML

Removed in version 5.13: Replaced by File format parameters.

Common add-on parameters

Motoare de traducere automată

Alegerile disponibile:

alibaba

Alibaba

aws

Amazon Translate

anthropic

Anthropic

apertium-apy

APy Apertium

microsoft-translator

Azure AI Translator

azure-openai

Azure OpenAI

baidu

Baidu

cyrtranslit

CyrTranslit

deepl

DeepL

glosbe

Glosbe

google-translate-api-v3

Google Cloud Translation Advanced

google-translate

Google Cloud Translation Basic

ltengine

LTEngine

libretranslate

Traducere Libre

modernmt

ModernMT

mymemory

MyMemory

netease-sight

Vedere Netease

ollama

Ollama

openai

OpenAI

sap-translation-hub

Centrul de traduceri SAP

systran

Systran

weblate

Weblate

weblate-translation-memory

Memorie de traducere Weblate

yandex

Yandex

yandex-v2

Yandex v2

youdao-zhiyun

Youdao Zhiyun

tmserver

tmserver

Format fișier

Alegerile disponibile:

apple-xliff

XLIFF 1.2 with Apple extensions

appstore

Fișiere de metadate magazin de aplicații

arb

Fișier ARB

aresource

Android String Resource

asciidoc

AsciiDoc file

ass

Fișier subtitrări Advanced SubStation Alpha

catkeys

Haiku catkeys

cmp-resource

Compose Multiplatform Resource

csv

Fișier CSV

csv-multi

Fișier CSV multivaloare

csv-simple

Fișier CSV simplu

dokuwiki

Fișier text DokuWiki

dtd

Fișier DTD

flatxml

Fișier Flat XML

fluent

Fișier Fluent

formatjs

Format.JS JSON file

go-i18n-json

Fișier JSON go-i18n v1

go-i18n-json-v2

Fișier JSON go-i18n v2

go-i18n-toml

go-i18n TOML file

gotext

Fișier JSON gotext

gwt

Proprietăți GWT

html

Fișier HTML

i18next

Fișier JSON i18next v3

i18nextv4

Fișier JSON i18next v4

idml

Fișier IDML

ini

Fișier INI

islu

Fișier Inno Setup INI

joomla

Fișier de limbă Joomla

json

Fișier JSON

json-nested

Fișier de structură imbricata JSON

laravel

Șiruri Laravel PHP

markdown

Fișier Markdown

mdx

MDX file

mediawiki

Fișier text MediaWiki

mi18n-lang

@draggable/i18n lang file

moko-resource

Mobile Kotlin Resource

nextcloud-json

Nextcloud JSON file

odf

Fișier OpenDocument

php

Șiruri PHP

plainxliff

Fișier de traducere XLIFF 1.2

po

Fișier gettext PO

po-mono

Fișier gettext PO (monolingv)

poxliff

XLIFF 1.2 cu extensii gettext

properties

Java Properties

rc

Fișier RC

resjson

RESJSON file

resourcedictionary

Fișier ResourceDictionary

resx

Fișier de resurse .NET

ruby-yaml

Fișier Ruby YAML

srt

Fișier subtitrări SubRip

ssa

Fișier subtitrări SubStation Alpha

strings

Șiruri iOS

stringsdict

Fișier Stringsdict

sub

Fișier subtitrări MicroDVD

tbx

Fișier TermBase eXchange

toml

TOML file

ts

Fișier de traducere Qt Linguist

txt

Fișier text simplu

webextension

Fișier JSON WebExtension

wxl

WixLocalization file

xliff

XLIFF 1.2 cu suport pentru placabile

xliff2

XLIFF 2.0 translation file

xliff2-placeables

XLIFF 2.0 translation file with placeables support

xlsx

Excel Open XML

xwiki-fullpage

XWiki Full Page

xwiki-java-properties

XWiki Java Properties

xwiki-page-properties

XWiki Page Properties

yaml

Fișier YAML

Change events

Alegerile disponibile:

0

Resursă actualizată

1

Traducere finalizată

2

Traducere schimbată

3

Comentariu adăugat

4

Sugestie adăugată

5

Traducere adăugată

6

Tradus automat

7

Sugestie acceptată

8

Traducere inversată

9

Traducere încărcată

13

Șir sursă adăugat

14

Componentă blocată

15

Componentă deblocată

17

Modificări comise

18

Modificări încărcate

19

Depozitar resetat

20

Depozitar îmbinat

21

Depozitar rebazat

22

Eroare la îmbinarea depozitarului

23

Eroare la rebazarea depozitarului

24

Înterpretare eșuată

25

Traducere eliminată

26

Sugestie eliminată

27

Traducere înlocuită

28

Eroare la încărcarea depozitarului

29

Sugestie eliminată în timpul curățării

30

Șir sursă modificat

31

Șir adăugat

32

Schimbare stare în masă

33

Vizibilitate modificată

34

Utilizator adăugat

35

Utilizator eliminat

36

Traducere aprobată

37

Marcată pentru editare

38

Componentă eliminată

39

Proiect eliminat

41

Proiect redenumit

42

Componentă redenumită

43

Componentă mutată

45

S-a alăturat contribuitor

46

Anunț publicat

47

Alertă declanșată

48

Limbă adăugată

49

Limbă solicitată

50

Proiect creat

51

Componentă creată

52

Utilizator invitat

53

Notificare depozitar primită

54

Înlocuire fișier cu traduceri prin încărcare

55

Licență schimbată

56

Contributor license agreement changed

57

Captură de ecran adăugată

58

Captură de ecran încărcată

59

Șir actualizat în depozitar

60

Supliment instalat

61

Configurație supliment modificată

62

Supliment dezinstalat

63

Șir eliminat

64

Comentariu eliminat

65

Comentariu rezolvat

66

Explicație actualizată

67

Categorie eliminată

68

Categorie redenumită

69

Categorie mutată

70

Salvare șir eșuată

71

String added in the repository

72

String updated in the upload

73

String added in the upload

74

Translation updated by source upload

75

Component translation completed

76

Applied enforced check

77

Propagated change

78

File uploaded

79

Extra flags updated

80

Font uploaded

81

Font changed

82

Font removed

83

Forced synchronization of translations

84

Forced rescan of translations

85

Screenshot removed

86

Label added

87

Label removed

88

Repository cleanup

89

Source string added in the upload

90

Source string added in the repository

91

Project backed up

92

Project restored

93

Component restored

94

User edit reverted

95

Project setting changed

96

Component setting changed

97

User access changed

98

Workspace created

99

Workspace setting changed

100

Project moved

Personalizarea listei de add-on-uri

Lista de add-on-uri este configurată prin WEBLATE_ADDONS. Pentru a adăuga un alt addon, este suficient să includeți numele absolut al clasei în această setare.

Add-on de scriere

Puteți să vă scrieți propriile add-on-uri, să creați o subclasă de weblate.addons.base.BaseAddon pentru a defini metadatele addon-ului și apoi să implementați un callback pentru a face procesarea.

Executarea scripturilor din add-on

Suplimentele pot fi utilizate și pentru a executa scripturi externe. Acest lucru era integrat în Weblate, dar acum trebuie să scrieți niște cod pentru a înfășura scriptul vostru cu un add-on.

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

"""Example pre commit script."""

from __future__ import annotations

from typing import ClassVar

from django.utils.translation import gettext_lazy

from weblate.addons.events import AddonEvent
from weblate.addons.scripts import BaseScriptAddon


class ExamplePreAddon(BaseScriptAddon):
    # Event used to trigger the script
    events: ClassVar[set[AddonEvent]] = {
        AddonEvent.EVENT_PRE_COMMIT,
    }
    # Name of the addon, has to be unique
    name = "weblate.example.pre"
    # Verbose name and long description
    verbose = gettext_lazy("Execute script before commit")
    description = gettext_lazy("This add-on executes a script.")

    # Script to execute
    script = "/bin/true"
    # File to add in commit (for pre commit event)
    # does not have to be set
    add_file = "po/{{ language_code }}.po"

Pentru instrucțiuni de instalare, consultați Custom quality checks, add-ons, automatic suggestions and auto-fixes.

Scriptul este executat cu directorul curent setat la rădăcina depozitului VCS pentru orice componentă dată.

În plus, sunt disponibile următoarele variabile de mediu:

WL_VCS

Sistemul de control al versiunilor utilizat.

WL_REPO

URL-ul depozitului din amonte.

WL_PATH

Calea absolută către depozitul VCS.

WL_BRANCH

Ramura de depozit configurată în componenta curentă.

WL_FILEMASK

Masca de fișier pentru componenta curentă.

WL_TEMPLATE

Numele de fișier al șablonului pentru traducerile monolingve (poate fi gol).

WL_NEW_BASE

Numele de fișier al fișierului utilizat pentru crearea de noi traduceri (poate fi gol).

WL_FILE_FORMAT

Format de fișier utilizat în componenta curentă.

WL_LANGUAGE

Limba traducerii procesate în prezent (nu este disponibilă pentru cârligele la nivel de componentă).

WL_PREVIOUS_HEAD

HEAD anterior după actualizare (disponibil numai după rularea cârligului post-update).

WL_COMPONENT_SLUG

Denumirea componentei utilizată pentru a construi URL-ul.

WL_PROJECT_SLUG

Denumirea proiectului utilizată pentru a construi URL-ul.

WL_COMPONENT_NAME

Denumirea componentei.

WL_PROJECT_NAME

Numele proiectului.

WL_COMPONENT_URL

URL-ul componentei.

WL_ENGAGE_URL

URL de angajare a proiectului.

Prelucrarea depozitelor după actualizare

Poate fi utilizat pentru a actualiza fișierele de traducere atunci când sursa VCS din amonte se modifică. Pentru a realiza acest lucru, vă rugăm să rețineți că Weblate vede numai fișierele trimise în VCS, deci trebuie să trimiteți modificările ca parte a scriptului.

De exemplu, cu Gulp puteți face acest lucru folosind următorul cod:

#! /bin/sh
gulp --gulpfile gulp-i18n-extract.js
git commit -m 'Update source strings' src/languages/en.lang.json

Pre-angajare de procesare a traducerilor

Utilizați scriptul de trimitere pentru a modifica automat o traducere înainte de a fi trimisă în depozit.

Acesta este transmis ca un singur parametru care constă în numele de fișier al unei traduceri curente.

Add-on activity logging

Add-on activity log keeps track of the add-on execution and can be used to keep track of add-on activity.

The logs can be pruned after a certain time interval by configuring the ADDON_ACTIVITY_LOG_EXPIRY.