Dodaci¶
Add-ons provide ways to customize and automate the translation workflow. Admins can add and manage add-ons from the Operations ↓ Add-ons menu of each respective translation project or component. Add-ons can be also installed site-wide in Management interface.
Savjet
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.
Events that trigger add-ons¶
Add-on installation¶
Triggered when add-on is being installed.
Component update¶
Pokreće se kad god se dogodi promjena u komponenti kao što je:
Izrazi su promijenjeni u repozitoriju.
Dodan je jedan izraz.
Dodan je jedan novi prijevod.
Dnevno¶
Pokreće se svakodnevno, ali dodaci obično dijele dnevno opterećenje između komponenti ovisno o BACKGROUND_TASKS.
Promjena događaja¶
Pokreće se nakon što se stvori događaj promjene.
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.
Ugrađeni dodaci¶
Automatsko prevođenje¶
- ID dodatka:
weblate.autotranslate.autotranslate- Konfiguracija:
modeModus automatskog prevođenja
Dostupne mogućnosti:¶ suggestDodaj kao prijedlog
translateDodaj kao prijevod
fuzzyDodaj kao „Treba urediti”
qUpit
Imaj na umu da će prevođenje svih izraza odbaciti sve postojeće prijevode.
auto_sourceIzvor automatskih prijevoda
Dostupne mogućnosti:¶ othersOstale prevodilačke komponente
mtStrojno prevođenje
componentKomponenta
Upiši identifikator komponente za korištenje kao izvor. Ostavi prazno za korištenje svih komponenti u trenutačnom projektu.
enginesUređaji za strojno prevođenje
thresholdPrag rezultata
- Triggers:
Add-on installation, Component update, Dnevno, Promjena događaja
Automatski prevodi izraze koristeći strojno prevođenje ili druge komponente.
JavaScript mreža za dostavljanje sadržaja (CDN) lokalizacije¶
Added in version 4.2.
- ID dodatka:
weblate.cdn.cdnjs- Konfiguracija:
thresholdPrag prijevoda
Postotak prevedenih izraza koji moraju biti prisutni da bi se prijevod uključio.
css_selectorCSS selektor
CSS selektor za otkrivanje lokalizirajućih elemenata.
cookie_nameIme kolačića jezika
Ime kolačića koji sprema postavke jezika.
filesIzvuci izraze iz HTML datoteka
Popis datoteka u trenutačnom repozitoriju ili udaljenim URL adresama koje se analiziraju za prevodivim izrazima.
- Triggers:
Add-on installation, Dnevno, Repository post-commit, Repository post-remove, Repository post-update
Objavljuje prijevode u mrežu za isporuku sadržaja (CDN) za upotrebu u JavaScriptu ili HTML lokalizaciji.
Can be used to localize static HTML pages, or to load localization in the JavaScript code.
Generates a unique URL for your component you can include in HTML pages to localize them. See Prevođenje HTML-a i JavaScripta pomoću Weblate CDN-a for more details.
Napomena
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).
Ovaj je dodatak konfiguriran na Hosted Weblate i poslužuje datoteke preko https://weblate-cdn.com/.
Translation files CDN¶
Added in version 2026.5.
- ID dodatka:
weblate.cdn.files- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Add-on installation, Component update, Repository post-commit, Repository post-remove, Repository post-update
Objavljuje prevodilačke datoteke u mrežu za isporuku sadržaja (CDN).
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 Mreža za dostavljanje sadržaja (CDN) lokalizacije for secure serving guidance.
Ukloni prazne izraze¶
Added in version 4.4.
- ID dodatka:
weblate.cleanup.blank- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Add-on installation, Repository post-commit, Repository post-update
Uklanja neprevedene izraze iz provodilačke datoteke.
Koristi ovo kako u prevodilačkim datotekama ne bi bilo praznih izraza (na primjer, ako ih tvoja biblioteka lokalizacije prikazuje kao nedostajuće umjesto da koristi izvorni izraz).
Više informacija
Počisti prevodilačke datoteke¶
- ID dodatka:
weblate.cleanup.generic- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Add-on installation, Repository post-update, Repository pre-commit
Aktualiziraj sve prevodilačke datoteke kako bi se podudarale s jednojezičnom osnovnom datotekom. Za većinu datotečnih formata to znači uklanjanje prevedenih izraza koji više nisu prisutni u osnovnoj datoteci.
For formats containing additional content besides translation strings (such as HTML datoteke, Windows RC datoteke, or OpenDocument format) this also brings the translation file in sync with the base file.
For a one-time cleanup of a single translation file, use Cleanup unused in Održavanje repozitorija on that translation instead of installing the add-on.
Više informacija
Dodaj nedostajuće jezike¶
- ID dodatka:
weblate.consistency.languages- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Osigurava korištenje dosljednog skupa jezika za sve komponente u projektu.
Napomena
The components shared from other projects are not considered in this.
Nedostajući jezici se provjeravaju svaka 24 sata i kada se u Weblate dodaju novi jezici.
Za razliku od većine drugih dodataka, ovaj dodatak utječe na cijeli projekt.
Savjet
Automatski prevedi novo dodane izraze s Automatsko prevođenje.
Otkrivanje komponenti¶
- ID dodatka:
weblate.discovery.discovery- Konfiguracija:
matchRegularni izraz za usporedbu s prevodilačkim datotekama
The regular expression must define named groups for component and language.
file_formatFormat datoteke
name_templatePrilagodi ime komponente
Use Django template syntax. This template must include {{ component }}.
base_file_templateOdredi ime osnovne jednojezične datoteke
Leave empty for bilingual translation files. When set, this template must include {{ component }}.
new_base_templateOdredi osnovnu datoteku za nove prijevode
Filename of file used for creating new translations. For gettext choose .pot file. This template must include {{ component }}.
intermediate_templateDatoteka posrednog jezika
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_regexFiltar jezika
Regularni izraz za filtriranje prevodilačkih datoteka prilikom traženja maske datoteke.
copy_addonsKloniraj dodatke iz glavne komponente u novo stvorene
removeUkloni komponente za nepostojeće datoteke
- Triggers:
Automatski dodaje ili uklanja komponente projekta na temelju promjena datoteka u sustavu za kontrolu verzija.
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
componentandlanguagenamed 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_templateand at least one translation file matchingmatch.
Worked example: news_<lang>.md¶
This is a common filename-based language variant layout:
docs/news_en.mddocs/news_cs.mddocs/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.
- Regularni izraz:
(?:(?P<path>.*/))?(?P<component>.+?)_(?P<language>[A-Za-z]{2,3}(?:[_-][A-Za-z0-9]+)*)\.(?P<extension>[^/.]+)- Ime komponente:
{{ component }}- Otkrivene maske datoteka:
docs/news_*.mddocs/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.
Označavanje Django predložaka možeš koristiti u svim poljima imena datoteke, na primjer:
{{ component }}Component name parsed from the
componentmatch group{{ component|title }}Ime datoteke komponente s početnim velikim slovom
{{ path }}: {{ component }}Custom match group from the regular expression
Once you hit Save, a preview of matching components will be presented, from where you can check whether the configuration actually matches your needs:
Primjeri otkrivanja komponenti¶
The worked example above covers the most common filename-based variant layout. The following examples show other repository structures you can match.
Pojedinačne mape za jezike¶
Jedna mapa za svaki jezik, koja sadrži prevodilačke datoteke za komponente.
- Regularni izraz:
(?P<language>[^/.]*)/(?P<component>[^/]*)\.po- Podudarajuće datoteke:
cs/application.pocs/website.pode/application.pode/website.po
Gettext locales layout¶
Uobičajena struktura za spčremanje gettext PO datoteka.
- Regularni izraz:
locale/(?P<language>[^/.]*)/LC_MESSAGES/(?P<component>[^/]*)\.po- Podudarajuće datoteke:
locale/cs/LC_MESSAGES/application.polocale/cs/LC_MESSAGES/website.polocale/de/LC_MESSAGES/application.polocale/de/LC_MESSAGES/website.po
Complex filenames¶
Upotreba imena komponente i jezika za ime datoteke.
- Regularni izraz:
src/locale/(?P<component>[^/]*)\.(?P<language>[^/.]*)\.po- Podudarajuće datoteke:
src/locale/application.cs.posrc/locale/website.cs.posrc/locale/application.de.posrc/locale/website.de.po
Ponavljajući jezični kodovi¶
Upotreba jezika za stazu i ime datoteke.
- Regularni izraz:
locale/(?P<language>[^/.]*)/(?P<component>[^/]*)/(?P=language)\.po- Podudarajuće datoteke:
locale/cs/application/cs.polocale/cs/website/cs.polocale/de/application/de.polocale/de/website/de.po
Rastavljanje Android izraza¶
Izrazi resursa za Android, rastavljeni u nekoliko datoteka.
- Regularni izraz:
res/values-(?P<language>[^/.]*)/strings-(?P<component>[^/]*)\.xml- Podudarajuće datoteke:
res/values-cs/strings-about.xmlres/values-cs/strings-help.xmlres/values-de/strings-about.xmlres/values-de/strings-help.xml
Podudaranje više staza¶
Višemodulni projekt Maven s prijevodima Java svojstava.
- Regularni izraz:
(?P<originalHierarchy>.+/)(?P<component>[^/]*)/src/main/resources/ApplicationResources_(?P<language>[^/.]*)\.properties- Ime komponente:
{{ originalHierarchy }}: {{ component }}- Podudarajuće datoteke:
parent/module1/submodule/src/main/resources/ApplicationResources_fr.propertiesparent/module1/submodule/src/main/resources/ApplicationResource_es.propertiesparent/module2/src/main/resources/ApplicationResource_de.propertiesparent/module2/src/main/resources/ApplicationResource_ro.properties
Savjet
Component discovery add-on uses Weblate interni URL-ovi. 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 Repozitorij izvornog koda field (in Operations ↓ Settings ↓
Version control system) of each respective component.
This saves time with configuration and system resources too.
Savjet
Ensure the new component contains the full set of translatable languages with Dodaj nedostajuće jezike.
Više informacija
Fedora Messaging¶
Added in version 5.15.
- ID dodatka:
weblate.fedora_messaging.publish- Konfiguracija:
amqp_urlAMQP broker URL
The AMQP broker URL to connect to.
topic_prefixTopic prefix
Optional prefix to prepend to generated message topics.
publish_timeoutPublish timeout
How many seconds to wait for the broker delivery acknowledgement.
connection_attemptsConnection attempts
How many times to try connecting to the broker.
retry_delayRetry delay
How many seconds to wait between connection attempts.
ca_certCA certificate bundle (PEM)
Paste only PEM certificate blocks, each starting with „—–BEGIN CERTIFICATE—–” and ending with „—–END CERTIFICATE—–„.
client_keyClient private key (PEM)
Paste a single unencrypted PEM private key block. Encrypted private keys are not supported.
client_certClient certificate (PEM)
Paste only the PEM certificate block starting with „—–BEGIN CERTIFICATE—–”; do not paste the output from „openssl x509 -text”.
event_filterChange events to trigger
Choose which change events should trigger this add-on. Change events to trigger
eventsSelected change events
- Triggers:
Šalje obavijesti u AMQP protokolu koji je kompatibilna s Fedora Messaging sustavom.
Fedora Messaging is AMQP-based publisher for all changes happening in Weblate. You can hook additional services on changes happening in Weblate using this.
Message topic¶
All messages have topic
weblate.<action>.<project>.<category...>.<component>.<translation>.
When configured, topic_prefix is prepended to this topic using a single dot
separator, for example org.fedoraproject.weblate.project_backed_up.website.
The action is lowercase textual representation of action with underscores
instead of space, for example resource_updated; see Selected change events
for all action identifiers. The remaining parts match Weblate object path
segments.
For example, a project backup event for the website project uses
weblate.project_backed_up.website. A translation change in the website
project, frontend component, and Czech translation uses
weblate.translation_changed.website.frontend.cs. The same change in the
frontend component inside the parent and child categories uses
weblate.translation_changed.website.parent.child.frontend.cs.
Message body¶
The body consists of following fields (given that they are available for the event):
change_idNumerical ID of change
actionPotpuno ime promjene.
timestampISO formatirana vremenska oznaka
targetNova vrijednost promjene (npr. novi prijevod izraza)
oldStara vrijednost promjene (npr. prijašnji prijevod izraza)
sourceIzvorni izraz.
urlApsolutni URL za prikaz povezanog objekta.
authorAuthor username (this can be different from user for example when accepting suggestions)
userActing username
projectURL identifikator projekta
componentIdentifikator komponente
translationJezični kod prijevoda
Zaglavlje poruke¶
Postoje i dodatna zaglavlja koja se mogu koristiti za usmjeravanje:
actionPotpuno ime promjene.
projectURL identifikator projekta
componentIdentifikator komponente
Primjeri poruka¶
Događaj sjedinjavanja repozitorija:
{
"id": 1,
"action": "Merged repository",
"timestamp": "2017-06-15T11:30:47.325000+00:00",
"url": "http://example.com/projects/test/test/",
"component": "test"
}
Događaj novog izvornog izraza:
{
"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"]
}
Događaj aktualiziranja resursa:
{
"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"
}
Događaj uklanjanja projekta:
{
"id": 9,
"action": "Removed project",
"timestamp": "2019-10-17T15:57:08.559420+00:00",
"target": "test",
"user": "testuser"
}
Događaj novog doprinositelja:
{
"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"]
}
Događaj novog prijevoda:
{
"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"]
}
Više informacija
Skupno uređivanje¶
- ID dodatka:
weblate.flags.bulk- Konfiguracija:
qUpit
stateStanje za postavljanje
Dostupne mogućnosti:¶ -1Ne mijenjaj
10Treba urediti
11Treba urediti (Treba prepraviti)
12Treba urediti (Treba provjeriti)
20Prevedeno
30Odobreno
add_flagsPrevodilačke oznake za dodavanje
remove_flagsPrevodilačke oznake za uklanjanje
add_labelsEtikete za dodavanje
remove_labelsEtikete za uklanjanje
- Triggers:
Skupno uređivanje oznaka, etiketa ili stanja izraza.
Primjeri:
Upit u polju pretrage |
|
|---|---|
Etikete za dodavanje |
nedavni |
Upit u polju pretrage |
|
|---|---|
Prevodilačke oznake za dodavanje |
|
Upit u polju pretrage |
|
|---|---|
Prevodilačke oznake za dodavanje |
|
Više informacija
Označi nepromijenjene prijevode s oznakom „Treba preraditi”¶
- ID dodatka:
weblate.flags.same_edit- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Kad god se uveze novi prevodiv izraz iz sustava za kontrolu verzija koji se poklapa s izvornim izrazom, on se u Weblateu označava s oznakom da ga se treba preraditi. To je naročito korisno za datotečne formate koji uključuju neprevedene izvorne izraze.
Savjet
You might also want to tighthen the Nepromijenjen prijevod check by adding
strict-same flag to Prevodilačke oznake.
Više informacija
Označi nove izvorne izraze s oznakom „Treba pregledati”¶
- ID dodatka:
weblate.flags.source_edit- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Kada god se uveze novi izvorni izraz iz sustava za kontrolu verzija, on se u Weblateu označava s oznakom da ga se treba provjeriti. Na taj način možeš jednostavno filtrirati i urediti izvorne izraze koje su napisali programeri.
Više informacija
Označi nove prijevode s oznakom „Treba preraditi”¶
- ID dodatka:
weblate.flags.target_edit- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Kada god se uveze novi prevodiv izraz iz sustava za kontrolu verzija, on se u Weblateu označava s oznakom da ga se treba preraditi. Na taj način možeš jednostavno filtrirati i urediti prijevode koje su napisali programeri.
Više informacija
Označi aktualizirane prijevode iz ropozitorija s oznakom „Treba preraditi”¶
- ID dodatka:
weblate.flags.target_repo_update- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Kada god se promijeni prijevod izraza iz sustava za kontrolu verzija, on se u Weblateu označava s oznakom da ga se treba preraditi. Posebno korisno ako se prevodilačke datoteke često aktualiziraju ručno ili putem eksterne usluge.
Više informacija
Ispuni izraze samo-za-čitanje s izvorom¶
Added in version 4.18.
- ID dodatka:
weblate.generate.fill_read_only- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Ispunjava prijevode izraza samo-za-čitanje s izvornim izrazom.
Generator statistike¶
- ID dodatka:
weblate.generate.generate- Konfiguracija:
filenameIme stvorene datoteke
templateSadržaj stvorene datoteke
- Triggers:
Izrađuje datoteku s detaljnim podatcima o stanju prijevoda.
Django predložak možeš koristiti u imenu datoteke i u sadržaju. Pogledaj Označavanje u predlošcima za detaljan opis označavanja.
Na primjer, generiranje datoteke sažetka za svaki prijevod:
- Ime stvorene datoteke
locale/{{ language_code }}.json- Sadržaj
{ "language": "{{ language_code }}", "strings": "{{ stats.all }}", "translated": "{{ stats.translated }}", "last_changed": "{{ stats.last_changed }}", "last_author": "{{ stats.last_author }}", }
Više informacija
Unaprijed ispuni prijevod s izvorom¶
Added in version 4.11.
- ID dodatka:
weblate.generate.prefill- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Ispunjava prevodilačke izraze s izvornim izrazom.
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.
Izrada pseudolokalnog prijevoda¶
Added in version 4.5.
- ID dodatka:
weblate.generate.pseudolocale- Konfiguracija:
sourceIzvorni izrazi
targetCiljani prijevod
Svi izrazi u ovom prijevodu će se prepisati
prefixDodan statični tekst na početku
var_prefixDodan varijabilni tekst na početku
suffixDodan statični tekst
var_suffixDodan varijabilni tekst
var_multiplierMultiplikator varijabilnog teksta
Koliko puta ponoviti varijabilni tekst ovisno o duljini izvornog izraza.
include_readonlyUključi izraze samo-za-čitanje
- Triggers:
Generira prijevod, automatski dodajući prefiks i sufiks izvornim izrazima.
Pseudolocales are useful to find strings that are not prepared for localization. This is done by altering all translatable source strings to make it easy to spot unaltered strings when running the application in the pseudolocale language.
Finding strings whose localized counterparts might not fit the layout is also possible.
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.
Izrazi će se izraditi koristeći sljedeći uzorak:
Prepended static text Prepended variable text Source string Appended variable text Appended static text
Savjet
You can use real languages for testing, but there are dedicated pseudolocales available in Weblate - en_XA and ar_XB.
Savjet
You can use this add-on to start translation to a new locale of an existing language or similar language. Once you add the translation to the component, follow to the add-on. Example: If you have fr and want to start fr_CA translation, simply set fr as the source, fr_CA as the target, and leave the prefix and suffix blank.
Uninstall the add-on once you have the new translation filled to prevent Weblate from changing the translations made after the copying.
Doprinositelji u komentaru¶
- ID dodatka:
weblate.gettext.authors- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Aktualizira komentar u zaglavlju PO datoteke, kako bi se uključilo ime doprinositelja i godine doprinosa.
Zaglavlje PO datoteke će izgledati ovako:
# 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.
Aktualiziraj ALL_LINGUAS varijablu u „configure” datoteci¶
- ID dodatka:
weblate.gettext.configure- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Add-on installation, Dnevno, 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.
Prilagodi gettext rezultat¶
Removed in version 5.13: Zamijenjeno s Parametri formata datoteke.
Aktualiziraj gettext predložak (Django)¶
Added in version 5.17.
- ID dodatka:
weblate.gettext.django- Konfiguracija:
intervalUčestalost aktualiziranja
Koliko često dodatak treba aktualizirati POT datoteku kada se komponenta osvježi.
Dostupne mogućnosti:¶ dailyDnevno
weeklyTjedno
monthlyMjesečno
normalize_headerNormaliziraj POT zaglavlje
Updates gettext headers and replaces placeholder POT comments.
location_modeSource locations
Choose how extraction writes source locations to the POT file. Use this to keep locations in the template while omitting them from translated PO files.
Dostupne mogućnosti:¶ fileUse file format settings
keepExtract locations to the POT file
omitDo not extract locations
- Triggers:
Aktualizira gettext predložak pomoću Django-ove ugrađene naredbe makemessages.
This add-on updates the template configured in Predložak za nove prijevode. It is available for gettext PO components, and the component must define a template for new translations.
The selected update frequency applies to automatic runs after repository refreshes. Installing or reconfiguring the add-on runs it immediately, and manual runs from add-on management or the API also bypass the frequency schedule. After a successful update, Weblate commits the changed template and reloads source strings.
The template update does not update translation PO files by itself. Keep Aktualiziraj PO datoteke za poklapanje s POT datotekom (msgmerge) installed when translation files should follow template changes automatically. The install form for this add-on can install that add-on, but existing add-on settings do not show that installation option again.
Django requirements¶
This add-on requires xgettext and msguniq. It runs Weblate’s internal extraction wrapper for Django messages instead of invoking a project’s manage.py makemessages, so it does not load project Django settings or applications.
The template for new translations must use the django or djangojs
domain. Supported template names are django.pot, djangojs.pot,
django.po, and djangojs.po. Weblate infers the source directory
from the template path and skips repository locale directories while extracting.
Aktualiziraj LINGUAS datoteku¶
- ID dodatka:
weblate.gettext.linguas- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Add-on installation, Dnevno, Repository post-add, Repository post-remove
Updates the LINGUAS file when a translation is added or removed.
Aktualiziraj POT datoteku (Meson)¶
Added in version 5.17.
- ID dodatka:
weblate.gettext.meson- Konfiguracija:
intervalUčestalost aktualiziranja
Koliko često dodatak treba aktualizirati POT datoteku kada se komponenta osvježi.
Dostupne mogućnosti:¶ dailyDnevno
weeklyTjedno
monthlyMjesečno
normalize_headerNormaliziraj POT zaglavlje
Updates gettext headers and replaces placeholder POT comments.
location_modeSource locations
Choose how extraction writes source locations to the POT file. Use this to keep locations in the template while omitting them from translated PO files.
Dostupne mogućnosti:¶ fileUse file format settings
keepExtract locations to the POT file
omitDo not extract locations
comment_modeKomentari o kodu
Choose whether xgettext should extract no comments, all comments, or only comments marked with a specific tag.
Dostupne mogućnosti:¶ offNe izdvajaj komentare
allIzdvoji sve komentare
taggedIzdvoji komentare s oznakom
comment_tagOznake komentara
Tag passed to xgettext for comment extraction when using tagged comment mode.
checksxgettext provjere
Additional xgettext validation checks to enable for extracted messages.
Dostupne mogućnosti:¶ ellipsis-unicodeellipsis-unicode
space-ellipsisspace-ellipsis
quote-unicodequote-unicode
bullet-unicodebullet-unicode
keywordDodatna ključna riječ
Optional extra keyword passed to xgettext using –keyword.
keyword_exclusiveUse keywords exclusively
When enabled, passes
--keywordwithout a value to xgettext before the additional keyword, disabling all default keywords so that only the keyword specified above is recognized.presetUnaprijed postavljene postavke za Meson
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.
Dostupne mogućnosti:¶ glibGLib
- Triggers:
Aktualizira gettext predložak koristeći Meson xgettext konvencije.
This add-on updates the template configured in Predložak za nove prijevode. It is available for gettext PO components, and the component must define a template for new translations.
The selected update frequency applies to automatic runs after repository refreshes. Installing or reconfiguring the add-on runs it immediately, and manual runs from add-on management or the API also bypass the frequency schedule. After a successful update, Weblate commits the changed template and reloads source strings.
The template update does not update translation PO files by itself. Keep Aktualiziraj PO datoteke za poklapanje s POT datotekom (msgmerge) installed when translation files should follow template changes automatically. The install form for this add-on can install that add-on, but existing add-on settings do not show that installation option again.
Meson requirements¶
This add-on requires xgettext; it does not invoke Meson. It follows
Meson gettext conventions by reading POTFILES or POTFILES.in
from the gettext directory and passing the GLib keyword and format-flag preset
to xgettext.
The gettext directory is the directory containing the template configured in
Predložak za nove prijevode. It must contain meson.build and
POTFILES or POTFILES.in. A Meson project meson.build
must be present in that directory or one of its parent directories. If both
POTFILES and POTFILES.in exist, POTFILES is used.
An adjacent POTFILES.skip excludes listed source files from extraction.
Configure this add-on from the existing Meson gettext setup. In most Meson
projects, the gettext directory is po/, the template is named after the
gettext domain, and po/meson.build calls Meson’s gettext helper. Use the
same template path in Predložak za nove prijevode, for example
po/example.pot, and keep POTFILES or POTFILES.in next to
that meson.build file.
Weblate does not read the source file list from meson.build. It uses
POTFILES or POTFILES.in, matching Meson’s gettext convention.
When the Meson project uses a non-default gettext directory or domain, mirror
that layout in the component template path.
Izradi MO datoteke¶
- ID dodatka:
weblate.gettext.mo- Konfiguracija:
pathStaza stvorene MO datoteke
Ako nije zadano, koristit će se mjesto PO datoteke.
fuzzyUključi izraze koje treba urediti
Izrazi koji se trebaju urediti obično nisu gotovi prijevodi.
- Triggers:
Automatski izrađuje MO datoteku za svaku promijenjenu PO datoteku.
The location of the generated MO file can be customized and the field for it uses Označavanje u predlošcima.
Napomena
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.
Aktualiziraj PO datoteke za poklapanje s POT datotekom (msgmerge)¶
Promijenjeno u verziji 5.13: Settings configuration has been moved to Parametri formata datoteke.
- ID dodatka:
weblate.gettext.msgmerge- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Aktualizira sve PO datoteke (kao što su konfigurirane u „Maska datoteke”) kako bi odgovarale POT datoteci (kao što je konfigurirana u „Predložak za nove prijevode”) pomoću 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
Uklonjeni izrazi su označeni kao zastarjeli
Modified strings are marked as needing review (fuzzy)
Most msgmerge command-line options can be set up through file format parameters
configuration. Enable the po_remove_obsolete parameter to remove obsolete
#~ entries when PO files are saved.
Aktualiziraj POT datoteku (Sphinx)¶
Added in version 5.17.
- ID dodatka:
weblate.gettext.sphinx- Konfiguracija:
intervalUčestalost aktualiziranja
Koliko često dodatak treba aktualizirati POT datoteku kada se komponenta osvježi.
Dostupne mogućnosti:¶ dailyDnevno
weeklyTjedno
monthlyMjesečno
normalize_headerNormaliziraj POT zaglavlje
Updates gettext headers and replaces placeholder POT comments.
location_modeSource locations
Choose how extraction writes source locations to the POT file. Use this to keep locations in the template while omitting them from translated PO files.
Dostupne mogućnosti:¶ fileUse file format settings
keepExtract locations to the POT file
omitDo not extract locations
filter_modeFiltriranje
Opcionalno ukloni izraze koji nisu korisni za prevođenje nakon izdvajanja Sphinxom.
Dostupne mogućnosti:¶ noneNepoznato
weblate_docsWeblate dokumentacija
- Triggers:
Aktualizira gettext predložak pomoću Sphinxovog gettext buildera bez učitavanja konfiguracije projekta.
This add-on updates the template configured in Predložak za nove prijevode. It is available for gettext PO components, and the component must define a template for new translations.
The selected update frequency applies to automatic runs after repository refreshes. Installing or reconfiguring the add-on runs it immediately, and manual runs from add-on management or the API also bypass the frequency schedule. After a successful update, Weblate commits the changed template and reloads source strings.
The template update does not update translation PO files by itself. Keep Aktualiziraj PO datoteke za poklapanje s POT datotekom (msgmerge) installed when translation files should follow template changes automatically. The install form for this add-on can install that add-on, but existing add-on settings do not show that installation option again.
Sphinx requirements¶
This add-on requires sphinx-build, provided by the sphinx
installation extra. The template for new translations must be a .pot
file below a locales directory. The directory before locales is
used as the Sphinx source directory and must contain conf.py.
Extraction uses Weblate’s bundled Sphinx configuration and does not load the project configuration. Weblate runs the Sphinx gettext builder, normalizes source references to paths relative to the source directory, and copies the generated template back to the configured template path.
Aktualiziraj POT datoteku (xgettext)¶
Added in version 5.17.
- ID dodatka:
weblate.gettext.xgettext- Konfiguracija:
intervalUčestalost aktualiziranja
Koliko često dodatak treba aktualizirati POT datoteku kada se komponenta osvježi.
Dostupne mogućnosti:¶ dailyDnevno
weeklyTjedno
monthlyMjesečno
normalize_headerNormaliziraj POT zaglavlje
Updates gettext headers and replaces placeholder POT comments.
location_modeSource locations
Choose how extraction writes source locations to the POT file. Use this to keep locations in the template while omitting them from translated PO files.
Dostupne mogućnosti:¶ fileUse file format settings
keepExtract locations to the POT file
omitDo not extract locations
comment_modeKomentari o kodu
Choose whether xgettext should extract no comments, all comments, or only comments marked with a specific tag.
Dostupne mogućnosti:¶ offNe izdvajaj komentare
allIzdvoji sve komentare
taggedIzdvoji komentare s oznakom
comment_tagOznake komentara
Tag passed to xgettext for comment extraction when using tagged comment mode.
checksxgettext provjere
Additional xgettext validation checks to enable for extracted messages.
Dostupne mogućnosti:¶ ellipsis-unicodeellipsis-unicode
space-ellipsisspace-ellipsis
quote-unicodequote-unicode
bullet-unicodebullet-unicode
keywordDodatna ključna riječ
Optional extra keyword passed to xgettext using –keyword.
keyword_exclusiveUse keywords exclusively
When enabled, passes
--keywordwithout a value to xgettext before the additional keyword, disabling all default keywords so that only the keyword specified above is recognized.input_modeIzvor unosa
Odaberi treba li xgettext čitati izvorne datoteke iz glob uzoraka ili iz manifesta POTFILES/POTFILES.in.
Dostupne mogućnosti:¶ patternsUzorci izvornih datoteka
potfilesPOTFILES manifest
languagexgettext jezik
Programming language passed to xgettext, for example Python or C. Leave blank to let xgettext guess the language from file extensions.
source_patternsUzorci izvornih datoteka
Novim redcima odvojeni glob uzorci relativni na repozitorij za datoteke koje se trebaju izdvojiti pomoću alata xgettext.
potfiles_pathPOTFILES staza
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.
- Triggers:
Aktualizira gettext predložak koristeći xgettext na odabranim izvornim datotekama.
This add-on updates the template configured in Predložak za nove prijevode. It is available for gettext PO components, and the component must define a template for new translations.
The selected update frequency applies to automatic runs after repository refreshes. Installing or reconfiguring the add-on runs it immediately, and manual runs from add-on management or the API also bypass the frequency schedule. After a successful update, Weblate commits the changed template and reloads source strings.
The template update does not update translation PO files by itself. Keep Aktualiziraj PO datoteke za poklapanje s POT datotekom (msgmerge) installed when translation files should follow template changes automatically. The install form for this add-on can install that add-on, but existing add-on settings do not show that installation option again.
xgettext requirements¶
This add-on requires xgettext. Configure either source file patterns
or a POTFILES / POTFILES.in manifest. Source file patterns are
repository-relative glob patterns and only matching repository files are passed
to xgettext.
Entries in POTFILES or POTFILES.in are resolved relative to the
repository root. They must be relative paths, stay inside the repository, and
point to existing files. Blank lines and lines starting with # are ignored.
If a POTFILES.skip file exists next to the manifest, its entries are
excluded from extraction.
Automatic repository refresh runs are skipped unless the changed files match the configured source patterns, match files listed in the manifest, change a watched manifest, or change the add-on configuration.
Start from the build-system extraction setup when configuring this add-on.
Autotools projects usually keep gettext inputs in po/POTFILES.in and
options such as the gettext domain and xgettext flags in
po/Makevars or related Makefile.am files. Use manifest mode
with the same POTFILES.in when its entries are plain repository-relative
source paths, and copy relevant extraction behavior into the add-on settings,
for example the language, comment extraction, checks, and additional keyword.
For other build systems, use the source list or extraction command they already
run as the source of truth. CMake, custom Makefiles, npm scripts, or project
specific extraction scripts often call xgettext directly or generate
an intermediate file list. Configure source patterns for simple layouts, or use
manifest mode when the project maintains a plain file list. If a build-system
manifest contains transformations or prefixes that are not file paths, convert
it to plain repository-relative paths before using it as POTFILES.
Združi Git izmjene¶
- ID dodatka:
weblate.git.squash- Konfiguracija:
squashSpremi združivanje
Dostupne mogućnosti:¶ allSve izmjene u jednu
languagePo jeziku
filePo datoteci
authorPo autoru
append_trailersDodaj krajnje retke združenoj poruci promjena
Krajnji redci sliče RFC 822 zaglavljima e-pošte, na kraju inače slobodnog dijela poruke izmjene, poput „Co-authored-by: …”.
commit_messagePoruka promjena
Umjesto sastavljenih poruka promjena združenih promjena koristit će se ova poruka promjene.
- Triggers:
Združi Git izmjene prije prijenosa promjena.
Savjet
To avoid unnecessary conflicts, it is recommended to configure automatic receiving of upstream changes by webhooks or API, see Updating repositories.
Git commits can be squashed prior to pushing changes in one of the following modes:
Sve izmjene u jednu
Po jeziku
Po datoteci
Po autoru
Izvorne poruke izmjene se čuvaju, ali autorstvo se gubi, ako nije odabrano Po autoru ili ako poruka izmjene nije prilagođena da ga uključi.
The original commit messages can optionally be overridden with a custom commit message.
Trailers (commit lines like Co-authored-by: …) can optionally be removed
from the original commit messages and appended to the end of the squashed
commit message. This also generates proper Co-authored-by: credit for every
translator.
Prilagodi JSON rezultat¶
Promijenjeno u verziji 5.12: Avoid spaces after separators option added.
Removed in version 5.13: Zamijenjeno s Parametri formata datoteke.
Resetiraj repozitorij na izvorni¶
Added in version 5.17.
- ID dodatka:
weblate.hosted.reset- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Poništava sve promjene u Weblate repozitoriju svake noći.
Formatiraj Java datoteku svojstava¶
- ID dodatka:
weblate.properties.sort- Konfiguracija:
case_sensitiveAktiviraj razvrstavanje ključeva, razlikuj velika i mala slova
- Triggers:
Formatira i raszvrstava Java datoteku svojstava.
Consolidates newlines to Unix ones.
Uppercase formatting of Unicode escape sequences (in case they are present).
Uklanja prazne retke i komentare.
Razvrstava izraze prema ključnim riječima.
Isključuje duple izraze.
Uklanjanje zastarjelog komentara¶
- ID dodatka:
weblate.removal.comments- Konfiguracija:
ageBroj dana za zadržavanje
- Triggers:
Postavi vrijeme za uklanjanje komentara.
This can be useful to remove old comments which might have become outdated. Use with care as comments getting old does not mean they have lost their importance.
Uklanjanje zastarjelog prijedloga¶
- ID dodatka:
weblate.removal.suggestions- Konfiguracija:
ageBroj dana za zadržavanje
votesPrag glasanja
Threshold for removal. Leave empty to remove suggestions regardless of votes. This field has no effect with voting turned off.
- Triggers:
Postavi vremensko razdoblje za uklanjanje prijedloga.
Can be very useful in connection with suggestion voting (see Pregled suradnika) to remove suggestions which don’t receive enough positive votes in a given timeframe.
Aktualiziraj RESX datoteke¶
- ID dodatka:
weblate.resx.update- Konfiguracija:
Ovaj dodatak nema konfiguraciju.
- Triggers:
Aktualiziraj sve prevodilačke datoteke kako bi se podudarale s jednojezičnom osnovnom datotekom izvornog repozitorija. Nekorišteni izrazi se uklanjaju, a novi se dodaju kao kopije izvornog izraza.
Savjet
Use Počisti prevodilačke datoteke if you only want to remove stale translation keys.
Više informacija
Slack Webhooks¶
Added in version 5.12.
- ID dodatka:
weblate.webhook.slack- Konfiguracija:
webhook_urlWebhook URL
event_filterChange events to trigger
Choose which change events should trigger this add-on. Change events to trigger
eventsSelected change events
- Triggers:
Šalje obavijest jednom Slack kanalu na osnovi odabranih događaja.
Upozorenje
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.
Savjet
To obtain a webhook URL, follow the steps outlined in the Slack Incoming Webhooks documentation
Webhook¶
Added in version 5.11.
Promijenjeno u verziji 5.15: Compliance of the secret length with the specification is now validated.
- ID dodatka:
weblate.webhook.webhook- Konfiguracija:
webhook_urlWebhook URL
secretWebhook tajna
Standardna webhook tajna je niz znakova koji je kodiran u base64 formatu.
event_filterChange events to trigger
Choose which change events should trigger this add-on. Change events to trigger
eventsSelected change events
- Triggers:
Šalje obavijest eksternoj usluzi na osnovi odabranih događaja, slijedeći Standard Webhooks specifikaciju.
The request payload complies with the Weblate Messaging schema. The
action field uses the action name listed in Selected change events.
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”.
Zastarjeli dodaci¶
Prilagodi XML rezultat¶
Added in version 4.15.
Removed in version 5.13: Zamijenjeno s Parametri formata datoteke.
Prilagodi YAML rezultat¶
Removed in version 5.13: Zamijenjeno s Parametri formata datoteke.
Uobičajeni parametri dodataka¶
Uređaji za strojno prevođenje¶
|
Alibaba |
|
Amazon Translate |
|
Anthropic |
|
Apertium APy |
|
Azure UI prevoditelj |
|
Azure OpenAI |
|
Baidu |
|
CyrTranslit |
|
DeepL |
|
Glosbe |
|
Google Cloud Translation Advanced |
|
Google Cloud Translation Basic |
|
LTEngine |
|
LibreTranslate |
|
Mistral |
|
ModernMT |
|
MyMemory |
|
Netease Sight |
|
Ollama |
|
OpenAI |
|
Centar SAP prijevoda |
|
Systran |
|
Weblate |
|
Weblate prevodilačka memorija |
|
Yandex |
|
Yandex v2 |
|
Youdao Zhiyun |
|
tmserver |
Format datoteke¶
|
XLIFF 1.2 s Apple proširenjima |
|
App store datoteke metapodataka |
|
ARB datoteka |
|
Resurs Android izraza |
|
AsciiDoc datoteka |
|
Napredna SubStation Alpha datoteka titlova |
|
Haiku catkeys |
|
Sastavi resurs za više platforma |
|
CSV datoteka |
|
CSV datoteka s više vrijednosti |
|
Jednostavna CSV datoteka |
|
DokuWiki tekstualna datoteka |
|
DTD datoteka |
|
Flat XML datoteka |
|
Fluent datoteka |
|
Format.JS JSON datoteka |
|
go-i18n v1 JSON datoteka |
|
go-i18n v2 JSON datoteka |
|
go-i18n TOML datoteka |
|
gotext JSON datoteka |
|
GWT svojstva |
|
HTML datoteka |
|
i18next JSON datoteka v3 |
|
i18next JSON datoteka v4 |
|
IDML datoteka |
|
INI datoteka |
|
Inno Setup INI datoteka |
|
Joomla jezična datoteka |
|
JSON datoteka |
|
JSON datoteka ugniježdene strukture |
|
Laravel PHP izrazi |
|
Markdown datoteka |
|
MDX file |
|
MediaWiki tekstualna datoteka |
|
Jezična datoteka @draggable/i18n |
|
Mobile Kotlin resurs |
|
Nextcloud JSON datoteka |
|
OpenDocument datoteka |
|
PHP izrazi |
|
XLIFF 1.2 prevodilačka datoteka |
|
gettext PO datoteka |
|
gettext PO datoteka (jednojezična) |
|
XLIFF 1.2 s gettext proširenjima |
|
Java svojstva |
|
RC datoteka |
|
RESJSON datoteka |
|
ResourceDictionary datoteka |
|
Datoteka .NET resursa |
|
Ruby YAML datoteka |
|
SubRip datoteka titlova |
|
SubStation Alpha datoteka titlova |
|
iOS izrazi |
|
Stringsdict datoteka |
|
MicroDVD datoteka titlova |
|
TermBase eXchange datoteka |
|
TOML datoteka |
|
Qt Linguist translation file (version 2) |
|
Qt Linguist translation file (version 1) |
|
Obična tekstualna datoteka |
|
WebExtension JSON datoteka |
|
WixLocalization datoteka |
|
XLIFF 1.2 s podrškom za zamjenska mjesta |
|
XLIFF 2.0 prevodilačka datoteka |
|
XLIFF 2.0 prevodilačka datoteka s podrškom za zamjenska mjesta |
|
Excel Open XML |
|
XWiki Full Page |
|
XWiki Java Properties |
|
XWiki Page Properties |
|
YAML datoteka |
Change events to trigger¶
|
Translation content events |
|
All change events |
|
Selected change events |
Selected change events¶
The following change actions can appear in notification payloads. Fedora Messaging uses the identifier column in message topics, while webhook payloads use the name column in the action field.
ID |
Identifier |
Ime |
Opis |
|---|---|---|---|
|
|
Resurs aktualiziran |
A translation file was synchronized with its repository. |
|
|
Prijevod završen |
A language translation became fully translated after an individual edit. Automatic translation, uploads, and bulk edits do not emit this event. |
|
|
Prijevod promijenjen |
An existing translation was edited by a user. |
|
|
Komentar dodan |
A comment was added to a string. |
|
|
Prijedlog dodan |
A translation suggestion was added. |
|
|
Prijevod dodan |
A previously untranslated string was translated by a user. |
|
|
Automatski prevedeno |
A translation was added or changed by automatic translation. This is emitted instead of Translation added or Translation changed. |
|
|
Prijedlog prihvaćen |
A translation suggestion was accepted as the translation. |
|
|
Prijevod vraćen |
A translation was restored to an earlier value. |
|
|
Prijevod prenesen |
A translation was added or changed by a translation file upload. This is emitted instead of Translation added or Translation changed. |
|
|
Izvorni izraz dodan |
A source string was added outside repository or upload updates. |
|
|
Komponenta zaključana |
A component was locked for translation. |
|
|
Komponenta otključana |
A component was unlocked for translation. |
|
|
Promjene dodane |
Pending component changes were committed. |
|
|
Promjene prenesene |
Repository changes were pushed upstream. |
|
|
Repozitorij resetiran |
A repository was reset to its upstream state. |
|
|
Repozitorij sjedinjen |
Upstream repository changes were merged. |
|
|
Repozitorij premješten |
Repository changes were rebased on upstream. |
|
|
Sjedinjavanje repozitorija neuspjelo |
Merging upstream repository changes failed. |
|
|
Premještanje repozitorija neuspjelo |
Rebasing repository changes failed. |
|
|
Obrada neuspjela |
Weblate could not parse a translation file. |
|
|
Prijevod uklonjen |
A language translation was removed. |
|
|
Prijedlog uklonjen |
A translation suggestion was removed. |
|
|
Prijevod zamijenjen |
A translation was changed by a search-and-replace operation. This is emitted instead of Translation changed. |
|
|
Slanje u repozitorij neuspjelo |
Pushing repository changes upstream failed. |
|
|
Prijedlog uklonjen tijekom čišćenja |
An obsolete translation suggestion was removed during cleanup. |
|
|
Izvorni izraz promijenjen |
A source string was edited in Weblate. |
|
|
Izraz dodan |
A new string was added in Weblate. |
|
|
Grupno stanje promijenjeno |
The translation state of one or more strings was changed in bulk. |
|
|
Vidljivost promijenjena |
Project or component visibility was changed. |
|
|
Korisnik dodan |
A user was granted access. |
|
|
Korisnik uklonjen |
A user’s access was removed. |
|
|
Prijevod odobren |
A translation was approved during review. |
|
|
Označeno za uređivanje |
A translation was marked as needing editing. |
|
|
Komponenta uklonjena |
A translation component was removed. |
|
|
Projekt uklonjen |
A translation project was removed. |
|
|
Projekt preimenovan |
A translation project was renamed. |
|
|
Komponenta preimenovana |
A translation component was renamed. |
|
|
Komponenta premještena |
A component was moved within a project. |
|
|
Doprinositelj se pridružio |
A user made their first contribution to a translation. |
|
|
Objava objavljena |
An announcement was posted. |
|
|
Upozorenje aktivirano |
A component alert was triggered. |
|
|
Jezik dodan |
A language translation was added. |
|
|
Jezik zatražen |
A user requested a new language. |
|
|
Projekt stvoren |
A translation project was created. |
|
|
Komponenta stvorena |
A translation component was created. |
|
|
Korisnik pozvan |
A user was invited to a project. |
|
|
Obavijest repozitorija primljena |
Weblate received a repository notification from a code host. |
|
|
Datoteka zamijenjena prenesenim prijevodom |
A translation file was replaced by an uploaded file. |
|
|
Licenca promijenjena |
Project or component license information changed. |
|
|
Licencni ugovor za doprinositelje promijenjen |
The contributor license agreement was changed. |
|
|
Snimka ekrana dodana |
A screenshot was associated with a string. |
|
|
Snimka ekrana prenesena |
A screenshot image was uploaded. |
|
|
Izraz aktualiziran u repozitoriju |
A string was changed while synchronizing from the repository. |
|
|
Dodatak instaliran |
An add-on was installed. |
|
|
Konfiguracija dodatka promijenjena |
An add-on’s configuration was changed. |
|
|
Dodatak deinstaliran |
An add-on was uninstalled. |
|
|
Izraz uklonjen |
A string was removed from a translation. |
|
|
Komentar uklonjen |
A string comment was removed. |
|
|
Komentar riješen |
A string comment was marked as resolved. |
|
|
Objašnjenje aktualizirano |
The explanation for a source string was updated. |
|
|
Kategorija uklonjenja |
A component category was removed. |
|
|
Kategorija preimenovana |
A component category was renamed. |
|
|
Kategorija premještena |
A component category was moved. |
|
|
Spremanje izraza neuspjelo |
Weblate could not save a changed string. |
|
|
Izraz dodan u repozitorij |
A new string was found while synchronizing from the repository. |
|
|
Izraz aktualiziran u prijenos |
A string was changed while processing an uploaded file. |
|
|
Izraz dodan u prijenos |
A new string was found while processing an uploaded file. |
|
|
Prijevod aktualiziran prijenosom izvora |
A translation was synchronized after uploading a source file. |
|
|
Prijevod komponente završen |
All language translations in a component became fully translated after an individual edit. Automatic translation, uploads, and bulk edits do not emit this event. |
|
|
Primijenjena prisilna provjera |
A translation was marked as needing editing by an enforced check. |
|
|
Promjena dijeljenog izraza |
A translation edit was propagated to another matching string. |
|
|
Datoteka prenesena |
A file was uploaded to a translation. |
|
|
Dodatne oznake aktualizirane |
Additional source-string flags were updated. |
|
|
Font prenesen |
A font was uploaded. |
|
|
Font promijenjen |
An uploaded font was changed. |
|
|
Font uklonjen |
An uploaded font was removed. |
|
|
Prisiljena sinkronizacija prijevoda |
Translation files were forcibly synchronized with the repository. |
|
|
Prisiljeno ponovno skeniranje prijevoda |
Translation files were forcibly rescanned for changes. |
|
|
Snimka ekrana je uklonjena |
A screenshot was removed. |
|
|
Dodana je etiketa |
A label was added to a string. |
|
|
Etiketa je uklonjena |
A label was removed from a string. |
|
|
Čišćenje repozitorija |
The repository working tree was cleaned up. |
|
|
Izvorni izraz dodan u prijenos |
A source string was added while processing an uploaded file. |
|
|
Izvorni izraz dodan u repozitorij |
A source string was added while synchronizing from the repository. |
|
|
Project backed up |
A project backup was created. |
|
|
Project restored |
A project was restored from a backup. |
|
|
Component restored |
A component was restored from a backup. |
|
|
User edit reverted |
All selected edits by a user were reverted. |
|
|
Project setting changed |
A project setting was changed. |
|
|
Component setting changed |
A component setting was changed. |
|
|
User access changed |
A user’s access permissions were changed. |
|
|
Workspace created |
A workspace was created. |
|
|
Workspace setting changed |
A workspace setting was changed. |
|
|
Project moved |
A project was moved into or out of a workspace. |
|
|
Remote repository updated |
A remote repository update was completed. |
|
|
Remote repository update failed |
Updating a remote repository failed. |
|
|
Alert dismissed |
A component alert was dismissed. |
|
|
Alert reopened |
A component alert was reopened after its context changed. |
Prilagođavanje popisa dodataka¶
The list of add-ons is configured by WEBLATE_ADDONS.
To add another add-on, simply include the absolute class name in this setting.
Pisanje dodatka¶
You can write your own add-ons too, create a subclass of
weblate.addons.base.BaseAddon to define the add-on metadata, and
then implement a callback to do the processing.
Više informacija
Izvršavanje skripta dodatka¶
Add-ons can also be used to execute external scripts. This used to be integrated in Weblate, but now you have to write some code to wrap your script with an 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"
For installation instructions see Custom quality checks, add-ons, automatic suggestions and auto-fixes.
The script is executed with the current directory set to the root of the VCS repository for any given component.
Additionally, the following environment variables are available:
- WL_VCS¶
Version control system used.
- WL_REPO¶
URL izvornog repozitorija.
- WL_PATH¶
Apsolutna staza do repozitorija sustava za kontrolu verzija.
- WL_BRANCH¶
Repository branch configured in the current component.
- WL_FILEMASK¶
File mask for current component.
- WL_TEMPLATE¶
Filename of template for monolingual translations (can be empty).
- WL_NEW_BASE¶
Filename of the file used for creating new translations (can be empty).
- WL_FILE_FORMAT¶
Datotečni format koji se koristi u trenutačnoj komponenti.
- WL_LANGUAGE¶
Language of currently processed translation (not available for component-level hooks).
- WL_PREVIOUS_HEAD¶
Previous HEAD after update (only available after running the post-update hook).
- WL_COMPONENT_SLUG¶
Component slug used to construct URL.
- WL_PROJECT_SLUG¶
Project slug used to construct URL.
- WL_COMPONENT_NAME¶
Component name.
- WL_PROJECT_NAME¶
Project name.
- WL_COMPONENT_URL¶
Component URL.
- WL_ENGAGE_URL¶
Project engage URL.
Više informacija
Post-update repository processing¶
Can be used to update translation files when the VCS upstream source changes. To achieve this, please remember Weblate only sees files committed to the VCS, so you need to commit changes as a part of the script.
For example with Gulp you can do it using following code:
#! /bin/sh
gulp --gulpfile gulp-i18n-extract.js
git commit -m 'Update source strings' src/languages/en.lang.json
Obrada prijevoda prije slanja izmjene¶
Use the commit script to automatically change a translation before it is committed to the repository.
It is passed as a single parameter consisting of the filename of a current translation.
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.
Each entry records whether processing is pending, successful, failed, or skipped. Skipped entries include the reason the add-on did not run, such as an incompatible component, no relevant changes, or a configured schedule that is not due yet. A successful entry can still mean that the add-on checked its inputs but found nothing to change.
For scope-wide add-ons that process components independently, the activity log contains a separate entry for each component.
The logs can be pruned after a certain time interval by configuring the ADDON_ACTIVITY_LOG_EXPIRY.