Add-on¶
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.
Suggerimento
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.
Eventi che attivano componenti aggiuntivi¶
Installazione di componenti aggiuntivi¶
Attivato quando il componente aggiuntivo è in fase di installazione.
Aggiornamento dei componenti¶
Si attiva ogni volta che si verifica una modifica in un componente, ad esempio:
Stringhe cambiate nel repository.
Aggiunta una stringa.
Viene aggiunta una nuova traduzione.
Giornalmente¶
Triggered daily, but add-ons usually split the daily load between components depending on BACKGROUND_TASKS.
Cambiamento di eventi¶
Attivato dopo la creazione di un evento Change.
Manual trigger¶
Triggered when an add-on is run manually from add-on management or the API.
Repository post-aggiunta¶
Attivato subito dopo l’aggiunta e il commit della nuova traduzione.
Repository post-commit¶
Triggered just after the changes are committed.
Repository post-push¶
Attivato subito dopo che il repository è stato inviato a monte.
Repository post-remove¶
Triggered just after a translation is removed.
Repository post-aggiornamento¶
Attivato ogni volta che vengono estratte nuove modifiche dal repository upstream.
Repository pre-commit¶
Triggered just before the changes are committed.
Repository pre-push¶
Attivato appena prima che il repository venga inviato a monte.
Repository pre-aggiornamento¶
Triggered just before the repository update is attempted.
Unit post-save¶
Triggered just after the string is saved.
Unit post-sync¶
Attivato dopo che la stringa è stata sincronizzata con il VCS.
Unit pre-create¶
Triggered just after the newly created string is saved.
Componenti aggiuntivi integrati¶
Traduzione automatica¶
- ID componente aggiuntivo:
weblate.autotranslate.autotranslate- Configurazione:
modeModo traduzione automatica
Scelte disponibili:¶ suggestAggiungi come suggerimento
translateAggiungi come traduzione
fuzzyAggiungi come «Richiede modifica»
approvedAggiungi come traduzione approvata
qRicerca
Tieni presente che la traduzione di tutte le stringhe eliminerà tutte le traduzioni esistenti.
auto_sourceSorgente di traduzioni automatizzate
Scelte disponibili:¶ othersAltri componenti di traduzione
mtTraduzione automatica
componentComponente
Enter a source component ID. With 30 or more eligible source components, a project/component path is also accepted. In that case, component and project operations also accept a component slug from the target project. Leave blank to use eligible components from each target component’s project.
enginesMotori di traduzione automatica
thresholdSoglia punteggio
- Triggers:
Installazione di componenti aggiuntivi, Aggiornamento dei componenti, Giornalmente, Cambiamento di eventi
Traduce automaticamente le stringhe usando la traduzione automatica o altri componenti.
CDN localizzazione JavaScript¶
Added in version 4.2.
- ID componente aggiuntivo:
weblate.cdn.cdnjs- Configurazione:
thresholdSoglia traduzione
La percentuale di stringhe tradotte che devono essere presenti affinché la traduzione venga inclusa.
css_selectorSelettore CSS
Selettore CSS per rilevare elementi localizzabili.
cookie_nameNome cookie lingua
Nome del cookie che memorizza la impostazioni della lingua.
filesEstrai stringhe da file HTML
Elenco di nomi di file nel repository attuale o URL remoti da analizzare per le stringhe traducibili.
- Triggers:
Installazione di componenti aggiuntivi, Giornalmente, Repository post-commit, Repository post-remove, Repository post-aggiornamento
Pubblica traduzioni nella rete di distribuzione dei contenuti per l’uso nella localizzazione JavaScript o HTML.
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 Translating HTML and JavaScript using Weblate CDN for more details.
Nota
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/.
File di traduzione CDN¶
Added in version 2026.5.
- ID componente aggiuntivo:
weblate.cdn.files- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Aggiornamento dei componenti, Repository post-commit, Repository post-remove, Repository post-aggiornamento
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 Localizzazione CDN for secure serving guidance.
Rimuovi stringhe vuote¶
Added in version 4.4.
- ID componente aggiuntivo:
weblate.cleanup.blank- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Repository post-commit, Repository post-aggiornamento
Rimuovi dai file traduzioni le stringhe senza una traduzione.
Use this to not have any empty strings in translation files (for example if your localization library displays them as missing instead of falling back to the source string).
Pulisci i file di traduzione¶
- ID componente aggiuntivo:
weblate.cleanup.generic- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Repository post-aggiornamento, Repository pre-commit
Aggiorna tutti i file di traduzione per farli corrispondere ai file monolingue di base. Per molti formati significa rimuovere le traduzioni che corrispondono a vecchie voci che non sono più presenti nei file di base.
For formats containing additional content besides translation strings (such as File HTML, File RC di Windows, or Formato OpenDocument) 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 Manutenzione repository on that translation instead of installing the add-on.
Aggiungi lingue mancanti¶
- ID componente aggiuntivo:
weblate.consistency.languages- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Giornalmente, Repository post-aggiunta
Assicura che per tutti i componenti all’interno di un progetto venga usato un insieme coerente di lingue.
Nota
In questo non vengono considerati i componenti condivisi da altri progetti.
Missing languages are checked once every 24 hours, and when new languages are added in Weblate.
Unlike most others, this add-on affects the whole project.
Suggerimento
Auto-translate the newly added strings with Traduzione automatica.
Scoperta dei componenti¶
- ID componente aggiuntivo:
weblate.discovery.discovery- Configurazione:
matchEspressione regolare usata per corrispondenza con i file traduzione
The regular expression must define a named group for component. Also define a named group for language when matching translation files. When the file mask is set, omit language and match the monolingual base or new base file instead.
file_formatFormato file
name_templatePersonalizza il nome del componente
Use Django template syntax. This template must include {{ component }}.
base_file_templateDefinisci il file lingua a base monolingue
Lascia vuoto per i file di traduzione bilingue. Se impostato, questo modello deve includere {{ component }}.
new_base_templateDefinisci il file di base per le nuove traduzioni
Il nome file usato per creare nuove traduzioni. Per gettext scegli un file .pot. Questo modello deve includere {{ component }}.
intermediate_templateFile di lingua intermedio
Nome file del file di traduzione intermedio. Nella maggior parte dei casi si tratta di un file di traduzione fornito dagli sviluppatori e viene usato durante la creazione delle stringhe sorgente effettive. Questo modello deve includere {{ component }}.
filemask_templateDefine the file mask
Leave empty to match translation files directly. When set, discovery matches the monolingual base or new base file and uses this template as the file mask. Include a language wildcard and {{ component }}, for example locale//{{ component }}.po or docs/{{ component }}_.md.
language_regexFiltro lingua
Espressione regolare per filtrare i file traduzione durante la scansione con maschera dei file.
copy_addonsClona gli add-on dal componente principale in quelli appena creati
removeRimuovi componenti per i file inesistenti
- Triggers:
Installazione di componenti aggiuntivi, Repository post-aggiornamento
Aggiunge o rimuove componenti al progetto basandosi sulle modifiche dei file nel sistema controllo versione.
The matching is done using regular expressions enabling complex configuration, but some knowledge is required to do so. Usually the regular expression to match translation files has to contain two named groups to match component and language. When creating components from a monolingual base or new base file, omit the language group and match that source file instead. 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 a
componentnamed group. Matching translation files also requires alanguagenamed group.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, unless you set the file mask (see below).
Discovering components without translation files¶
Set Define the file mask to discover components from a monolingual base or new base file alone, even when no translation files exist yet. In that mode:
Configure Regular expression to match translation files against to match the monolingual base or new base file, and omit the
languagegroup. Keep full control over thecomponentcapture, for examplelocale/(?P<component>[^/]+)\.potordocs/(?P<component>[^/_]+)\.md.Fill Define the file mask with a path that includes both a language wildcard and
{{ component }}, for examplelocale/*/{{ component }}.poordocs/{{ component }}_*.md.Keep using the other filename templates with any named groups from the match expression.
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.
- Espressione regolare:
(?:(?P<path>.*/))?(?P<component>.+?)_(?P<language>[A-Za-z]{2,3}(?:[_-][A-Za-z0-9]+)*)\.(?P<extension>[^/.]+)- Nome componente:
{{ component }}- Discovered file masks:
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.
Puoi utilizzare il markup del modello Django in tutti i campi del nome file, ad esempio:
{{ component }}Component name parsed from the
componentmatch group{{ component|title }}Nome file del componente con prima lettera maiuscola
{{ path }}: {{ component }}Gruppo di corrispondenze personalizzato dall’espressione regolare
Once you hit Save, a preview of matching components will be presented, from where you can check whether the configuration actually matches your needs:
Esempi di rilevamento dei componenti¶
The worked example above covers the most common filename-based variant layout. The following examples show other repository structures you can match.
Una cartella per lingua¶
Una cartella per lingua contenente i file di traduzione per i componenti.
- Espressione regolare:
(?P<language>[^/.]*)/(?P<component>[^/]*)\.po- File corrispondenti:
cs/application.pocs/website.pode/application.pode/website.po
Gettext locales layout¶
Struttura abituale per la memorizzazione di file PO gettext.
- Espressione regolare:
locale/(?P<language>[^/.]*)/LC_MESSAGES/(?P<component>[^/]*)\.po- File corrispondenti:
locale/cs/LC_MESSAGES/application.polocale/cs/LC_MESSAGES/website.polocale/de/LC_MESSAGES/application.polocale/de/LC_MESSAGES/website.po
Nomi di file complessi¶
Uso sia del nome del componente, sia della lingua all’interno del nome file.
- Espressione regolare:
src/locale/(?P<component>[^/]*)\.(?P<language>[^/.]*)\.po- File corrispondenti:
src/locale/application.cs.posrc/locale/website.cs.posrc/locale/application.de.posrc/locale/website.de.po
Codice lingua ripetuto¶
Uso della lingua sia nel percorso sia nel nome file.
- Espressione regolare:
locale/(?P<language>[^/.]*)/(?P<component>[^/]*)/(?P=language)\.po- File corrispondenti:
locale/cs/application/cs.polocale/cs/website/cs.polocale/de/application/de.polocale/de/website/de.po
Dividi stringhe Android¶
Stringhe risorse Android, separate in diversi file.
- Espressione regolare:
res/values-(?P<language>[^/.]*)/strings-(?P<component>[^/]*)\.xml- File corrispondenti:
res/values-cs/strings-about.xmlres/values-cs/strings-help.xmlres/values-de/strings-about.xmlres/values-de/strings-help.xml
Corrispondenza di più percorsi¶
Progetto Maven multimodulo con traduzioni delle proprietà Java.
- Espressione regolare:
(?P<originalHierarchy>.+/)(?P<component>[^/]*)/src/main/resources/ApplicationResources_(?P<language>[^/.]*)\.properties- Nome componente:
{{ originalHierarchy }}: {{ component }}- File corrispondenti:
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
Suggerimento
Component discovery add-on uses Weblate internal URLs. 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 Repository codice sorgente field (in Operations ↓ Settings ↓
Version control system) of each respective component.
This saves time with configuration and system resources too.
Suggerimento
Ensure the new component contains the full set of translatable languages with Aggiungi lingue mancanti.
Vedi anche
Messaggistica Fedora¶
Added in version 5.15.
- ID componente aggiuntivo:
weblate.fedora_messaging.publish- Configurazione:
amqp_urlURL broker AMQP
L’URL del broker AMQP a cui connettersi.
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_delayRitardo per nuovo tentativo
How many seconds to wait between connection attempts.
ca_certBundle certificato CA (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_certCertificato client (PEM)
Paste only the PEM certificate block starting with «—–BEGIN CERTIFICATE—–»; do not paste the output from «openssl x509 -text».
event_filterEventi di modifica che attivano
Choose which change events should trigger this add-on. Eventi di modifica che attivano
eventsEventi di modifica selezionati
- Triggers:
Invia notifiche a uno scambio AMQP compatibile con Fedora Messaging.
Fedora Messaging is AMQP-based publisher for all changes happening in Weblate. You can hook additional services on changes happening in Weblate using this.
Argomento del messaggio¶
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 Eventi di modifica selezionati
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.
Corpo del messaggio¶
The body consists of following fields (given that they are available for the event):
change_idID numerico della modifica
actionNome dettagliato della modifica.
timestampDatazione in formato ISO
targetNuovo valore della modifica (es. nuova traduzione della stringa)
oldVecchio valore della modifica (es. traduzione precedente della stringa)
sourceStringa sorgente.
urlAbsolute URL to view the related object.
authorAuthor username (this can be different from user for example when accepting suggestions)
userNome utente in qualità di agente
projectProject slug
componentComponent slug
translationTranslation language code
Intestazioni dei messaggi¶
There are additional headers which you might utilize for routing as well:
actionNome dettagliato della modifica.
projectProject slug
componentComponent slug
Messaggi di esempio¶
Evento merge nel repository:
{
"id": 1,
"action": "Merged repository",
"timestamp": "2017-06-15T11:30:47.325000+00:00",
"url": "http://example.com/projects/test/test/",
"component": "test"
}
Evento nuova stringa sorgente:
{
"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"]
}
Evento risorsa aggiornata:
{
"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"
}
Evento progetto rimosso:
{
"id": 9,
"action": "Removed project",
"timestamp": "2019-10-17T15:57:08.559420+00:00",
"target": "test",
"user": "testuser"
}
Evento nuovo collaboratore:
{
"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"]
}
Evento nuova traduzione:
{
"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"]
}
Vedi anche
Modifica collettiva¶
- ID componente aggiuntivo:
weblate.flags.bulk- Configurazione:
qRicerca
stateStato da impostare
Scelte disponibili:¶ -1Non modificare
10Richiede modifica
11Da modificare (da riscrivere)
12Da modificare (da verificare)
20Tradotte
30Approvato
add_flagsFlag traduzione da aggiungere
remove_flagsFlag traduzione da rimuovere
add_labelsEtichetta da aggiungere
remove_labelsEtichetta da rimuovere
- Triggers:
Installazione di componenti aggiuntivi, Aggiornamento dei componenti
Modifica in blocco dei flag, delle etichette o dello stato delle stringhe.
Esempi:
Domanda di ricerca |
|
|---|---|
Etichetta da aggiungere |
recente |
Domanda di ricerca |
|
|---|---|
Flag traduzione da aggiungere |
|
Domanda di ricerca |
|
|---|---|
Flag traduzione da aggiungere |
|
Contrassegna le traduzioni invariate come «Da riscrivere»¶
- ID componente aggiuntivo:
weblate.flags.same_edit- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Ogni volta che una nuova stringa traducibile viene importata da VCS e corrisponde a una stringa sorgente, viene contrassegnata come stringa da riscrivere in Weblate. Particolarmente utile per i formati di file che includono stringhe sorgente per stringhe non tradotte.
Suggerimento
You might also want to tighthen the Traduzione invariata check by adding
strict-same flag to Flag traduzione.
Vedi anche
Contrassegna le nuove stringhe sorgenti come «Da verificare»¶
- ID componente aggiuntivo:
weblate.flags.source_edit- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Ogni volta che una nuova stringa sorgente viene importata dal VCS in Weblate, verrà contrassegnata come da verificare. In questo modo puoi facilmente filtrare e modificare le stringhe sorgenti inserite dagli sviluppatori.
Vedi anche
Contrassegna le nuove traduzioni come «Da riscrivere»¶
- ID componente aggiuntivo:
weblate.flags.target_edit- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Ogni volta che una nuova traduzione viene importata dal VCS in Weblate, verrà contrassegnata come da riscrivere. In questo modo puoi facilmente filtrare e modificare le traduzioni scritte dagli sviluppatori.
Vedi anche
Contrassegna le traduzioni aggiornate dal repository come «Da riscrivere»¶
- ID componente aggiuntivo:
weblate.flags.target_repo_update- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Ogni volta che una traduzione di stringhe viene modificata dal VCS, viene contrassegnata come da riscrivere in Weblate. Particolarmente utile se i file di traduzione vengono spesso aggiornati manualmente o da un servizio esterno.
Vedi anche
Riempi le stringhe di sola lettura con i sorgenti¶
Added in version 4.18.
- ID componente aggiuntivo:
weblate.generate.fill_read_only- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Aggiornamento dei componenti, Giornalmente
Riempie la traduzione di stringhe di sola lettura con le stringhe sorgenti.
Generatore statistiche¶
- ID componente aggiuntivo:
weblate.generate.generate- Configurazione:
scopeOutput scope
Scelte disponibili:¶ translationOne file per translation
componentOne file per component
filenameNome file generato
templateContenuto file generato
- Triggers:
Installazione di componenti aggiuntivi, Aggiornamento dei componenti, Repository post-aggiunta, Repository post-remove, Repository pre-commit
Genera un file con informazioni dettagliate sulla stato traduzione.
Puoi usare un modello Django sia nel nome del file che nel contenuto, vedi Template markup per una descrizione dettagliata del markup.
Ad esempio generando un file di riepilogo per ogni traduzione:
- Nome file generato
locale/{{ language_code }}.json- Contenuto
{ "language": "{{ language_code }}", "strings": "{{ stats.all }}", "translated": "{{ stats.translated }}", "last_changed": "{{ stats.last_changed }}", "last_author": "{{ stats.last_author }}", }
Component-wide output¶
Set Output scope to One file per component to maintain one locale list or statistics file for the entire component. The default, One file per translation, preserves existing configurations.
Component output is generated on installation and configuration changes. It is updated when translations are committed, languages are added or removed, and component files are reloaded. Language metadata changes are included on the next such update or when the add-on is reconfigured. Unchanged output does not create a new commit.
Both modes support component and project variables in filenames and content.
In component mode, the content additionally receives translations, ordered
by repository language code. Each item provides:
language_code: the language code used in the repository.language_name: the English language name.language_native_name: the name translated into its own language using Weblate’s catalogs, with an English fallback when unavailable.language_direction:ltrorrtl.filenameandurl: the translation filename and Weblate URL.is_source: whether this is the component’s source translation.stats: the same statistics available in translation mode.
The source translation is included. Templates can exclude it using
{% if not item.is_source %}. Statistics use Weblate’s completion semantics.
Custom language names are retained; there is no external locale-data lookup.
For example, generate locales.json for a website:
[
{% for item in translations %}
{
"code": {{ item.language_code|json }},
"file": {{ item.filename|json }},
"name": {{ item.language_native_name|json }},
"dir": {{ item.language_direction|json }}
}{% if not forloop.last %},{% endif %}
{% endfor %}
]
Or generate languages.py for an application:
names = {
{% for item in translations %}
{{ item.language_code|python }}: {{ item.language_native_name|python }},
{% endfor %}
}
completeness = {
{% for item in translations %}
{{ item.language_code|python }}: {{ item.stats.translated_percent|python }},
{% endfor %}
}
The json and python filters serialize complete values, including string
quotes and escaping. Do not add quotes around their output. They also support
lists and dictionaries; {{ translations|json }} exports all available data.
Dates and times are serialized as ISO-formatted strings.
Vedi anche
Pre completamento traduzione con sorgente¶
Added in version 4.11.
- ID componente aggiuntivo:
weblate.generate.prefill- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Aggiornamento dei componenti, Giornalmente
Riempi le stringhe da tradurre con la stringa sorgente.
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.
Generazione pseudo locale¶
Added in version 4.5.
- ID componente aggiuntivo:
weblate.generate.pseudolocale- Configurazione:
sourceStringhe sorgente
targetTraduzione destinazione
Tutte le stringhe in questa traduzione verranno sovrascritte
prefixTesto statico anteposto
var_prefixTesto variabile anteposto
suffixTesto statico aggiunto
var_suffixTesto variabile aggiunto
var_multiplierMoltiplicatore di testo variabile
Quante volte ripetere la parte variabile a seconda della lunghezza della stringa sorgente.
include_readonlyIncludi stringhe sola lettura
- Triggers:
Installazione di componenti aggiuntivi, Aggiornamento dei componenti, Giornalmente
Genera automaticamente una traduzione aggiungendo prefisso e suffisso alle stringhe sorgenti.
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.
Le stringhe verranno generate usando il seguente modello:
Prepended static text Prepended variable text Source string Appended variable text Appended static text
Suggerimento
You can use real languages for testing, but there are dedicated pseudolocales available in Weblate - en_XA and ar_XB.
Suggerimento
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.
Collaboratori nel commento¶
- ID componente aggiuntivo:
weblate.gettext.authors- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Aggiorna la parte di commento dell’intestazione del file PO per includere i nomi dei collaboratori e gli anni che hanno contribuito.
The PO file header will look like this:
# 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.
Aggiorna la variabile ALL_LINGUAS nel file «configure»¶
- ID componente aggiuntivo:
weblate.gettext.configure- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Giornalmente, Repository post-aggiunta, 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.
Personalizza l’uscita gettext¶
Removed in version 5.13: Sostituito da Parametri del formato file.
Aggiorna il template gettext (Django)¶
Added in version 5.17.
- ID componente aggiuntivo:
weblate.gettext.django- Configurazione:
intervalFrequenza di aggiornamento
Con quale frequenza il componente aggiuntivo deve aggiornare il file POT quando il componente viene aggiornato.
Scelte disponibili:¶ dailyGiornalmente
weeklySettimanale
monthlyMensile
normalize_headerNormalizza l’intestazione POT
Aggiorna le intestazioni gettext e sostituisce i commenti placeholder del POT.
location_modeFonte di posizioni
Scegli come l’estrazione scrive le posizioni di origine nel file POT. Usa questa opzione per mantenere le posizioni nel modello, omettendole però dai file PO tradotti.
Scelte disponibili:¶ fileUtilizzare le impostazioni del formato file
keepEstrai posizioni al POT file
omitNon estrarre le posizioni
- Triggers:
Installazione di componenti aggiuntivi, Manual trigger, Repository post-aggiornamento
Aggiorna il template gettext utilizzando il comando makemessages integrato di Django.
This add-on updates the template configured in Modello per le nuove traduzioni. 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 Aggiorna i file PO per adeguarli al file POT (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.
Aggiorna file LINGUAS¶
- ID componente aggiuntivo:
weblate.gettext.linguas- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Giornalmente, Repository post-aggiunta, Repository post-remove
Updates the LINGUAS file when a translation is added or removed.
Aggiorna il file POT (Meson)¶
Added in version 5.17.
- ID componente aggiuntivo:
weblate.gettext.meson- Configurazione:
intervalFrequenza di aggiornamento
Con quale frequenza il componente aggiuntivo deve aggiornare il file POT quando il componente viene aggiornato.
Scelte disponibili:¶ dailyGiornalmente
weeklySettimanale
monthlyMensile
normalize_headerNormalizza l’intestazione POT
Aggiorna le intestazioni gettext e sostituisce i commenti placeholder del POT.
location_modeFonte di posizioni
Scegli come l’estrazione scrive le posizioni di origine nel file POT. Usa questa opzione per mantenere le posizioni nel modello, omettendole però dai file PO tradotti.
Scelte disponibili:¶ fileUtilizzare le impostazioni del formato file
keepEstrai posizioni al POT file
omitNon estrarre le posizioni
data_dirsITS data directories
Newline-separated repository-relative directories containing an its subdirectory, for example po for po/its. Earlier directories override later directories and bundled rules.
comment_modeCommenti sul codice
Scegli se xgettext debba estrarre nessun commento, tutti i commenti, o solamente commenti con una specifica etichetta.
Scelte disponibili:¶ offNon estrarre i commenti
allEstrai tutti i commenti
taggedEstrai commenti con etichetta
comment_tagTag di commento
Il Tag passato a xgettext per il commento di estrazione quando si utilizza la modalità commenti con tag.
checkscontrolli xgettext
Ulteriori controlli di validazione xgettext da abilitare per i messaggi estratti.
Scelte disponibili:¶ ellipsis-unicodeellipsis-unicode
space-ellipsisspace-ellipsis
quote-unicodequote-unicode
bullet-unicodebullet-unicode
keywordParole chiave aggiuntive
Parole chiave aggiuntive separate da una nuova riga, passate a xgettext tramite –keyword.
keyword_exclusiveUtilizza esclusivamente le parole chiave
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.presetPreimpostazione 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.
Scelte disponibili:¶ glibGLib
- Triggers:
Installazione di componenti aggiuntivi, Manual trigger, Repository post-aggiornamento
Aggiorna il modello gettext usando le convenzioni gettext di Meson.
This add-on updates the template configured in Modello per le nuove traduzioni. 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 Aggiorna i file PO per adeguarli al file POT (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
Modello per le nuove traduzioni. 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 Modello per le nuove traduzioni, 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.
Genera file MO¶
- ID componente aggiuntivo:
weblate.gettext.mo- Configurazione:
pathPercorso del file MO generato
Se non specificato, verrà usato il percorso del file PO.
fuzzyIncludi stringhe che necessitano di modifica
Le stringhe che necessitano di modifica (fuzzy) in genere non sono pronte per essere usate come traduzioni.
- Triggers:
Genera automaticamente un file MO per ogni file PO modificato.
The location of the generated MO file can be customized and the field for it uses Template markup.
Nota
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.
Aggiorna i file PO per adeguarli al file POT (msgmerge)¶
Cambiato nella versione 5.13: Settings configuration has been moved to Parametri del formato file.
- ID componente aggiuntivo:
weblate.gettext.msgmerge- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Repository post-aggiornamento
Aggiorna tutti i file PO (come configurato da «Maschera file») in modo che corrispondano al file POT (come configurato da «Modello per nuove traduzioni») utilizzando 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:
Nuove stringhe traducibili vengono visualizzate in tutte le lingue
Le stringhe rimosse sono contrassegnate come obsolete
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.
Aggiorna il file POT (Sphinx)¶
Added in version 5.17.
- ID componente aggiuntivo:
weblate.gettext.sphinx- Configurazione:
intervalFrequenza di aggiornamento
Con quale frequenza il componente aggiuntivo deve aggiornare il file POT quando il componente viene aggiornato.
Scelte disponibili:¶ dailyGiornalmente
weeklySettimanale
monthlyMensile
normalize_headerNormalizza l’intestazione POT
Aggiorna le intestazioni gettext e sostituisce i commenti placeholder del POT.
location_modeFonte di posizioni
Scegli come l’estrazione scrive le posizioni di origine nel file POT. Usa questa opzione per mantenere le posizioni nel modello, omettendole però dai file PO tradotti.
Scelte disponibili:¶ fileUtilizzare le impostazioni del formato file
keepEstrai posizioni al POT file
omitNon estrarre le posizioni
filter_modeFiltraggio
Facoltativamente, è possibile rimuovere le stringhe non utili alla traduzione dopo l’estrazione con Sphinx.
Scelte disponibili:¶ noneNessuno
weblate_docsDocumentazione Weblate
- Triggers:
Installazione di componenti aggiuntivi, Manual trigger, Repository post-aggiornamento
Aggiorna il template gettext utilizzando il generatore gettext di Sphinx senza caricare la configurazione del progetto.
This add-on updates the template configured in Modello per le nuove traduzioni. 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 Aggiorna i file PO per adeguarli al file POT (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.
Aggiorna il file POT (xgettext)¶
Added in version 5.17.
- ID componente aggiuntivo:
weblate.gettext.xgettext- Configurazione:
intervalFrequenza di aggiornamento
Con quale frequenza il componente aggiuntivo deve aggiornare il file POT quando il componente viene aggiornato.
Scelte disponibili:¶ dailyGiornalmente
weeklySettimanale
monthlyMensile
normalize_headerNormalizza l’intestazione POT
Aggiorna le intestazioni gettext e sostituisce i commenti placeholder del POT.
location_modeFonte di posizioni
Scegli come l’estrazione scrive le posizioni di origine nel file POT. Usa questa opzione per mantenere le posizioni nel modello, omettendole però dai file PO tradotti.
Scelte disponibili:¶ fileUtilizzare le impostazioni del formato file
keepEstrai posizioni al POT file
omitNon estrarre le posizioni
data_dirsITS data directories
Newline-separated repository-relative directories containing an its subdirectory, for example po for po/its. Earlier directories override later directories and bundled rules.
comment_modeCommenti sul codice
Scegli se xgettext debba estrarre nessun commento, tutti i commenti, o solamente commenti con una specifica etichetta.
Scelte disponibili:¶ offNon estrarre i commenti
allEstrai tutti i commenti
taggedEstrai commenti con etichetta
comment_tagTag di commento
Il Tag passato a xgettext per il commento di estrazione quando si utilizza la modalità commenti con tag.
checkscontrolli xgettext
Ulteriori controlli di validazione xgettext da abilitare per i messaggi estratti.
Scelte disponibili:¶ ellipsis-unicodeellipsis-unicode
space-ellipsisspace-ellipsis
quote-unicodequote-unicode
bullet-unicodebullet-unicode
keywordParole chiave aggiuntive
Parole chiave aggiuntive separate da una nuova riga, passate a xgettext tramite –keyword.
keyword_exclusiveUtilizza esclusivamente le parole chiave
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_modeSorgente di ingresso
Scegli se xgettext deve leggere i file sorgente dai pattern glob o da un manifesto POTFILES/POTFILES.in.
Scelte disponibili:¶ patternsModelli file di origine
potfilesManifesti di POTFILES
languagelinguaggio xgettext
Linguaggio di programmazione passato a xgettext, ad esempio Python o C. Lascia vuoto per lasciare che xgettext indovini il linguaggio dalle estensioni dei file.
source_patternsModelli file di origine
Pattern glob relativi al repository, separati da interruzioni di riga, per i file da estrarre con xgettext.
potfiles_pathPercorso POTFILES
Percorso relativo al repository per POTFILES o POTFILES.in. Le voci vengono risolte rispetto alla radice del repository. Se presente accanto al manifesto, POTFILES.skip esclude i file elencati dall’estrazione.
- Triggers:
Installazione di componenti aggiuntivi, Manual trigger, Repository post-aggiornamento
Aggiorna il modello gettext utilizzando xgettext sui file sorgente selezionati.
This add-on updates the template configured in Modello per le nuove traduzioni. 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 Aggiorna i file PO per adeguarli al file POT (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.
Mixed source formats and ITS rules¶
Leave xgettext language blank to extract messages from different
formats into the same POT. Include all inputs in the source patterns or
POTFILES, for example:
common/messages.py
qt/application.desktop
qt/application.policy
data/application.metainfo.xml
Desktop entries use the native xgettext parser. Weblate bundles ITS rules for Polkit policies, AppStream/MetaInfo, GSettings, GTK Builder, and Shared MIME Info. These rules are included in the Weblate package, including Docker installations; no additional system packages are required for these formats. The Aggiorna il file POT (Meson) add-on uses the same rules.
Extraction follows upstream gettext and ITS behavior. In particular, desktop
extraction includes keys such as Name, GenericName, and Comment;
Polkit rules select description and message elements without filtering
by gettext-domain. Use untranslated policy sources: upstream Polkit rules
also select elements carrying xml:lang.
For custom XML formats or overrides, configure ITS data directories.
Enter one repository-relative directory per line, in priority order. Each must
contain an its/ subdirectory with .loc locating rules and .its
extraction rules. For example, enter po for po/its/example.loc and
po/its/example.its, or . for its/ at the repository root.
In API add-on configuration, use a list: "data_dirs": ["po", "data"].
Earlier directories take precedence over later ones, followed by Weblate’s
bundled rules and gettext’s system rules. The directories are passed through
GETTEXTDATADIRS. Configure them explicitly even when using Meson; Weblate
does not read data_dirs from meson.build or inherit an administrator’s
GETTEXTDATADIRS environment variable.
Rule directories and files must stay inside the repository and must not be
symbolic links. A locating rule’s target must name an existing .its file
in the same directory. DTDs, entity declarations, and external rule references
are not supported. Weblate validates project-local rules before extraction and
reports invalid rules as add-on errors. Changes, additions, or deletions in the
configured its/ directories trigger extraction even when source files
have not changed.
Vedi anche
Unisci commit Git¶
- ID componente aggiuntivo:
weblate.git.squash- Configurazione:
squashCompressione commit
Scelte disponibili:¶ allTutte i commit in uno
languagePer lingua
filePer file
authorPer autore
append_trailersAggiungi trailer al messaggio commit compresso
Le linee trailer sono linee simili alle intestazioni e-mail di RFC 822, alla fine della parte altrimenti libera di un messaggio di commit, ad esempio “Co-autore: …”.
commit_messageMessaggio commit
Questo messaggio di commit verrà usato al posto dei messaggi di commit combinati dai commit compressi.
- Triggers:
Installazione di componenti aggiuntivi, Repository post-commit
Unisci i commit Git prima del push delle modifiche.
Suggerimento
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:
Tutte i commit in uno
Per lingua
Per file
Per autore
I messaggi di modifica originali saranno mantenuti ma l’informazione sull’autore non verrà conservata a meno che non sia selezionato Per autore o si personalizzi il messaggio di modifica per includerlo.
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.
Personalizza l’uscita JSON¶
Cambiato nella versione 5.12: Avoid spaces after separators option added.
Removed in version 5.13: Sostituito da Parametri del formato file.
Ripristina archivio in upstream¶
Added in version 5.17.
- ID componente aggiuntivo:
weblate.hosted.reset- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Elimina tutte le modifiche nel repository Weblate ogni notte.
Formatta il file delle proprietà Java¶
- ID componente aggiuntivo:
weblate.properties.sort- Configurazione:
case_sensitiveAbilita l’ordinamento delle chiavi con distinzione tra maiuscole e minuscole
- Triggers:
Formatta ed ordina il file delle proprietà Java.
Consolidates newlines to Unix ones.
Uppercase formatting of Unicode escape sequences (in case they are present).
Elimina le righe vuote e i commenti.
Ordina le stringhe in base ai tasti.
Elimina le stringhe duplicate.
Rimozione commenti obsoleti¶
- ID componente aggiuntivo:
weblate.removal.comments- Configurazione:
ageGiorni di archiviazione
- Triggers:
Imposta un termine per la rimozione dei commenti.
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.
Rimozione suggerimenti obsoleti¶
- ID componente aggiuntivo:
weblate.removal.suggestions- Configurazione:
ageGiorni di archiviazione
votesSoglia votazione
Soglia per la rimozione. Lascia vuoto per rimuovere i suggerimenti indipendentemente dai voti. Questo campo non ha effetto con la votazione disabilitata.
- Triggers:
Imposta un termine per la rimozione dei suggerimenti.
Can be very useful in connection with suggestion voting (see Peer review) to remove suggestions which don’t receive enough positive votes in a given timeframe.
Aggiorna file RESX¶
- ID componente aggiuntivo:
weblate.resx.update- Configurazione:
Questo componente aggiuntivo non ha configurazione.
- Triggers:
Installazione di componenti aggiuntivi, Repository post-aggiornamento
Aggiorna tutti i file traduzione per farli corrispondere ai file singola lingua di base. Le stringhe non usate saranno rimosse e aggiungerà quelle nuove come copia delle stringhe sorgenti.
Suggerimento
Use Pulisci i file di traduzione if you only want to remove stale translation keys.
Webhook di Slack¶
Added in version 5.12.
- ID componente aggiuntivo:
weblate.webhook.slack- Configurazione:
webhook_urlURL webhook
event_filterEventi di modifica che attivano
Choose which change events should trigger this add-on. Eventi di modifica che attivano
eventsEventi di modifica selezionati
- Triggers:
Invia notifiche a un canale Slack in base agli eventi selezionati.
Avvertimento
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.
Suggerimento
To obtain a webhook URL, follow the steps outlined in the Slack Incoming Webhooks documentation
Webhook¶
Added in version 5.11.
Cambiato nella versione 5.15: Compliance of the secret length with the specification is now validated.
- ID componente aggiuntivo:
weblate.webhook.webhook- Configurazione:
webhook_urlURL webhook
secretSegreto Webhook
Il segreto per i Webhook Standard è una stringa codificata in base64.
event_filterEventi di modifica che attivano
Choose which change events should trigger this add-on. Eventi di modifica che attivano
eventsEventi di modifica selezionati
- Triggers:
Invia notifiche a servizi esterni in base a eventi selezionati, seguendo le specifiche dei webhook standard.
The request payload complies with the Weblate Messaging schema. The
action field uses the action name listed in Eventi di modifica selezionati.
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».
The Traduzione automatica mode Add as approved translation creates approved strings when reviews are enabled for the target language. If the project settings or a language workflow override disable reviews, it creates translated strings instead. The configured mode is preserved, including for project-wide and site-wide add-ons whose targets have different review settings. Configuring this mode requires the usual add-on management permission; it does not require the configuring user to be a reviewer.
The Scoperta dei componenti add-on stops with an error if the repository scan exceeds 100,000 paths or matching translation files would require more than 1,000,000 path-to-mask comparisons. The comparison limit is checked using the number of repository paths multiplied by the number of file masks. These fixed limits bound resource consumption when repository content determines the masks. When either limit is exceeded, discovery does not create or remove components.
Componenti aggiuntivi obsoleti¶
Personalizza output XML¶
Added in version 4.15.
Removed in version 5.13: Sostituito da Parametri del formato file.
Personalizza output YAML¶
Removed in version 5.13: Sostituito da Parametri del formato file.
Parametri comuni dei componenti aggiuntivi¶
Motori di traduzione automatica¶
|
Alibaba |
|
Amazon Translate |
|
Anthropic |
|
Apertium APy |
|
Azure AI Translator |
|
Azure OpenAI |
|
Baidu |
|
CyrTranslit |
|
DeepL |
|
Glosbe |
|
Google Cloud Translation Advanced |
|
Google Cloud Translation Basic |
|
LTEngine |
|
LibreTranslate |
|
Mistral |
|
ModernMT |
|
MyMemory |
|
Netease Sight |
|
Ollama |
|
OpenAI |
|
SAP Translation Hub |
|
Systran |
|
Weblate |
|
Weblate Translation Memory |
|
Yandex |
|
Yandex v2 |
|
Youdao Zhiyun |
|
tmserver |
Formato file¶
|
XLIFF 1.2 con estensioni Apple |
|
File metadati store app |
|
File ARB |
|
Stringhe risorse Android |
|
File AsciiDoc |
|
File sottotitoli Advanced SubStation Alpha |
|
Haiku catkeys |
|
Componi risorsa multipiattaforma |
|
File CSV |
|
File CSV multivalore |
|
File CSV semplice |
|
File testo DokuWiki |
|
File DTD |
|
File YAML semplice |
|
File Fluent |
|
File Format.JS JSON |
|
File JSON go-i18n v1 |
|
File JSON go-i18n v2 |
|
File TOML go-i18n |
|
File JSON gotext |
|
Proprietà GWT |
|
File HTML |
|
File JSON i18next v3 |
|
File JSON i18next v4 |
|
File IDML |
|
File INI |
|
File INI Inno Setup |
|
File lingua Joomla |
|
File JSON |
|
File struttura annidata JSON |
|
Stringhe PHP Laravel |
|
File Markdown |
|
File MDX |
|
File testo MediaWiki |
|
File di lingua @draggable/i18n |
|
Risorsa Kotlin mobile |
|
File JSON di Nextcloud |
|
File OpenDocument |
|
Stringhe PHP |
|
File traduzione XLIFF 1.2 |
|
File PO gettext |
|
File PO gettetx (monolingue) |
|
XLIFF 1.2 con estensioni gettext |
|
Proprietà Java |
|
File RC |
|
File RESJSON |
|
File dizionario risorse |
|
File risorse .NET |
|
File YAML Ruby |
|
File sottotitoli SubRip |
|
File sottotitoli SubStation Alpha |
|
Stringhe iOS |
|
File Stringsdict |
|
File sottotitoli MicroDVD |
|
File TermBase eXchange |
|
File TOML |
|
File di traduzione Qt Linguist (versione 2) |
|
File di traduzione Qt Linguist (versione 1) |
|
File di testo normale |
|
File JSON WebExtension |
|
File WixLocalization |
|
XLIFF 1.2 con supporto posizionabili |
|
File traduzione XLIFF 2.0 |
|
File traduzione XLIFF 2.0 con supporto per elementi posizionabili |
|
Open XML di Excel |
|
XWiki Full Page |
|
Proprietà Java di XWiki |
|
Proprietà della pagina XWiki |
|
File YAML |
Eventi di modifica che attivano¶
|
Eventi sul contenuto della traduzione |
|
Tutti gli eventi di modifica |
|
Eventi di modifica selezionati |
Eventi di modifica selezionati¶
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 |
Nome |
Descrizione |
|---|---|---|---|
|
|
Risorsa aggiornata |
Un file di traduzione è stato sincronizzato con il suo repository. |
|
|
Traduzione completata |
A language translation became fully translated after an individual edit. Automatic translation, uploads, and bulk edits do not emit this event. |
|
|
Traduzione modificata |
An existing translation was edited by a user. |
|
|
Commento aggiunto |
È stato aggiunto un commento a una stringa. |
|
|
Aggiunto suggerimento |
A translation suggestion was added. |
|
|
Traduzione aggiunta |
Una stringa precedentemente non tradotta è stata tradotta da un utente. |
|
|
Tradotto automaticamente |
A translation was added or changed by automatic translation. This is emitted instead of Translation added or Translation changed. |
|
|
Suggerimento accettato |
Un suggerimento di traduzione è stato accettato come traduzione. |
|
|
Traduzione ripristinata |
Una traduzione è stata ripristinata a un valore precedente. |
|
|
Traduzione caricata |
A translation was added or changed by a translation file upload. This is emitted instead of Translation added or Translation changed. |
|
|
Stringa sorgente aggiunta |
È stata aggiunta una stringa sorgente al di fuori del repository o degli aggiornamenti di caricamento. |
|
|
Componente bloccato |
Un componente è stato bloccato per la traduzione. |
|
|
Componente sbloccato |
Un componente è stato sbloccato per la traduzione. |
|
|
Modifiche apportate |
Pending component changes were committed. |
|
|
Modifiche inviate |
Le modifiche del repository sono state inviate (push) a monte. |
|
|
Reimpostazione repository |
Un repository è stato ripristinato al suo stato originale. |
|
|
Repository unito |
Upstream repository changes were merged. |
|
|
Rebase del repository completato |
Le modifiche del repository sono state ribasate sull’upstream. |
|
|
Unione del repository non riuscita |
L’unione delle modifiche del repository upstream non è riuscita. |
|
|
Rebase del repository non riuscito |
Il rebase delle modifiche del repository non è riuscito. |
|
|
Analisi non riuscita |
Weblate could not parse a translation file. |
|
|
Traduzione rimossa |
A language translation was removed. |
|
|
Rimosso suggerimento |
A translation suggestion was removed. |
|
|
Traduzione sostituita |
A translation was changed by a search-and-replace operation. This is emitted instead of Translation changed. |
|
|
Push del repository non riuscito |
L’invio (push) delle modifiche del repository a monte non è riuscito. |
|
|
Suggerimento rimosso durante pulizia |
Durante la fase di pulizia è stato rimosso un suggerimento di traduzione obsoleto. |
|
|
Stringa sorgente modificata |
Una stringa sorgente è stata modificata in Weblate. |
|
|
Stringa aggiunta |
A new string was added in Weblate. |
|
|
Stato modificato in massa |
The translation state of one or more strings was changed in bulk. |
|
|
Visibilità modificata |
Project or component visibility was changed. |
|
|
Utente aggiunto |
A user was granted access. |
|
|
Utente rimosso |
L’accesso di un utente è stato rimosso. |
|
|
Traduzione approvata |
Una traduzione è stata approvata durante la revisione. |
|
|
Contrassegnate per la modifica |
Una traduzione è stata contrassegnata come bisognosa di modifica. |
|
|
Componente rimosso |
Un componente di traduzione è stato rimosso. |
|
|
Progetto rimosso |
A translation project was removed. |
|
|
Progetto rinominato |
Un progetto di traduzione è stato rinominato. |
|
|
Componente rinominato |
Un componente di traduzione è stato rinominato. |
|
|
Componente spostato |
Un componente è stato spostato all’interno di un progetto. |
|
|
Collaboratore aggiunto |
Un utente ha dato il suo primo contributo a una traduzione. |
|
|
Annuncio pubblicato |
È stato affisso un annuncio. |
|
|
Avviso attivato |
È stato attivato un avviso relativo a un componente. |
|
|
Lingua aggiunta |
È stata aggiunta una traduzione linguistica. |
|
|
Lingua richiesta |
Un utente ha richiesto una nuova lingua. |
|
|
Progetto creato |
È stato creato un progetto di traduzione. |
|
|
Componente creato |
È stato creato un componente di traduzione. |
|
|
Utente invitato |
A user was invited to a project. |
|
|
Notifica del repository ricevuta |
Weblate ha ricevuto una notifica dal repository di una piattaforma di hosting del codice. |
|
|
File sostituito dalla traduzione con upload |
Il file di traduzione è stato sostituito da un file caricato. |
|
|
Licenza modificata |
Project or component license information changed. |
|
|
Contratto di licenza per collaboratori modificato |
The contributor license agreement was changed. |
|
|
Screenshot aggiunto |
Uno screenshot è stato associato a una stringa. |
|
|
Screenshot caricato |
A screenshot image was uploaded. |
|
|
Stringa aggiornata nel repository |
A string was changed while synchronizing from the repository. |
|
|
Add-on installato |
An add-on was installed. |
|
|
Configurazione dell’add-on modificata |
An add-on’s configuration was changed. |
|
|
Add-on disinstallato |
An add-on was uninstalled. |
|
|
Stringa rimossa |
Una stringa è stata rimossa da una traduzione. |
|
|
Commento rimosso |
A string comment was removed. |
|
|
Commento risolto |
A string comment was marked as resolved. |
|
|
Spiegazione aggiornata |
La spiegazione di una stringa sorgente è stata aggiornata. |
|
|
Categoria rimossa |
Una categoria di componenti è stata rimossa. |
|
|
Categoria rinominata |
Una categoria di componenti è stata rinominata. |
|
|
Categoria spostata |
Una categoria di componenti è stata spostata. |
|
|
Salvataggio stringa non riuscito |
Weblate non è riuscito a salvare una stringa modificata. |
|
|
Stringa aggiunta nel repository |
A new string was found while synchronizing from the repository. |
|
|
Stringa aggiornata nel caricamento |
Una stringa è stata modificata durante l’elaborazione di un file caricato. |
|
|
Stringa aggiunta nel caricamento |
È stata trovata una nuova stringa durante l’elaborazione di un file caricato. |
|
|
Traduzione aggiornata dal caricamento della sorgente |
A translation was synchronized after uploading a source file. |
|
|
Traduzione del componente completata |
All language translations in a component became fully translated after an individual edit. Automatic translation, uploads, and bulk edits do not emit this event. |
|
|
Controllo forzato applicato |
A translation was marked as needing editing by an enforced check. |
|
|
Cambiamento propagato |
A translation edit was propagated to another matching string. |
|
|
File caricato |
Un file è stato caricato in una traduzione. |
|
|
Flag extra aggiornati |
I flag aggiuntivi della stringa sorgente sono stati aggiornati. |
|
|
Font caricato |
A font was uploaded. |
|
|
Font modificato |
Un font caricato è stato modificato. |
|
|
Font rimosso |
Un font caricato è stato rimosso. |
|
|
Sincronizzazione forzata delle traduzioni |
Translation files were forcibly synchronized with the repository. |
|
|
Nuova scansione forzata delle traduzioni |
I file di traduzione sono stati riscansionati forzatamente per le modifiche. |
|
|
Screenshot rimosso |
A screenshot was removed. |
|
|
Etichetta aggiunta |
A label was added to a string. |
|
|
Etichetta rimossa |
A label was removed from a string. |
|
|
Pulizia repository |
The repository working tree was cleaned up. |
|
|
Stringa di origine aggiunta nel caricamento |
A source string was added while processing an uploaded file. |
|
|
Stringa di origine aggiunta nel repository |
A source string was added while synchronizing from the repository. |
|
|
Backup del progetto eseguito |
A project backup was created. |
|
|
Progetto ripristinato |
A project was restored from a backup. |
|
|
Componente ripristinato |
A component was restored from a backup. |
|
|
Modifica utente ripristinata |
All selected edits by a user were reverted. |
|
|
Project setting changed |
A project setting was changed. |
|
|
Impostazione del componente modificata |
Un’impostazione del componente è stata modificata. |
|
|
User access changed |
A user’s access permissions were changed. |
|
|
Spazio di lavoro creato |
È stato creato uno spazio di lavoro. |
|
|
Workspace setting changed |
A workspace setting was changed. |
|
|
Project moved |
A project was moved into or out of a workspace. |
|
|
Repository remoto aggiornato |
Un aggiornamento del repository remoto è stato completato. |
|
|
Remote repository update failed |
Updating a remote repository failed. |
|
|
Avviso ignorato |
Un avviso del componente è stato ignorato. |
|
|
Avviso riaperto |
Un avviso del componente è stato riaperto dopo che il suo contesto è cambiato. |
Personalizzazione dell’elenco dei componenti aggiuntivi¶
The list of add-ons is configured by WEBLATE_ADDONS.
To add another add-on, simply include the absolute class name in this setting.
Componente aggiuntivo di scrittura¶
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.
Vedi anche
Esecuzione di script dal componente aggiuntivo¶
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 Controlli di qualità personalizzati, componenti aggiuntivi, suggerimenti automatici e auto correzioni.
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¶
Upstream repository URL.
- WL_PATH¶
Absolute path to VCS repository.
- 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¶
Formato file usato nel componente attuale.
- 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.
Vedi anche
Elaborazione del repository post-aggiornamento¶
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
Elaborazione preliminare delle traduzioni¶
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.
Registrazione dei componenti aggiuntivi¶
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.