Dodatki¶
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 Interfejs zarządzania.
Podpowiedź
Możesz także skonfigurować dodatki używając API, DEFAULT_ADDONS lub 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.
Add-ons that expose a component API show its base URL on the add-on’s API tab, alongside a link to the API root.
Add-ons are persistent administrative configuration. They run with their service identity in the scope where they are installed, rather than repeatedly using the permissions of the administrator who configured them. This ensures that equally authorized administrators see and save the same configuration, and that saving an unrelated change does not silently alter the add-on’s input scope. Removing or disabling the configuring administrator does not disable the add-on.
Project and category add-ons therefore include compatible restricted components in that scope. A component add-on can use inputs outside its destination component when documented by that add-on. Automatic translation determines its source components as follows:
Direct automatic-translation actions use the acting user’s component access.
A saved automatic-translation add-on uses its persistent administrative scope. Compatible components in the target project are eligible, including restricted components.
Components in another project are eligible when that project contributes to shared translation memory. This includes restricted components even though they do not create shared translation-memory entries; the add-on reads the explicitly selected component as an administrative input instead.
Restricted components remain filtered from ordinary listings and direct access. Grant add-on management permissions only to users trusted with the add-on’s complete input and effect scope. See Zakres zespołów and Ograniczony dostęp.
Events that trigger add-ons¶
Add-on installation¶
Triggered when add-on is being installed.
Component update¶
Wywoływane za każdym razem, gdy nastąpi zmiana w komponencie, takim jak:
Strings are changed in the repository.
A string is added.
A new translation is added.
Codziennie¶
Triggered daily, but add-ons usually split the daily load between components depending on BACKGROUND_TASKS.
Event change¶
Triggered after a Change event is created.
Manual trigger¶
Triggered when an add-on is run manually from add-on management or the API.
Repository post-add¶
Triggered just after the new translation is added and committed.
Repository post-commit¶
Triggered just after the changes are committed.
Repository post-push¶
Triggered just after the repository is pushed upstream.
Repository post-remove¶
Triggered just after a translation is removed.
Repository post-update¶
Triggered whenever new changes are pulled from the upstream repository.
Repository pre-commit¶
Triggered just before the changes are committed.
Repository pre-push¶
Triggered just before the repository is pushed upstream.
Repository pre-update¶
Triggered just before the repository update is attempted.
Unit post-save¶
Triggered just after the string is saved.
Unit post-sync¶
Triggered after the string is synchronized with the VCS.
Unit pre-create¶
Triggered just after the newly created string is saved.
Wbudowane dodatki¶
Ocena jakości AI¶
- ID dodatku:
weblate.ai.quality- Konfiguracja:
serviceUsługa oceny
Dostępne opcje:¶ anthropicAnthropic
openaiOpenAI
mistralMistral
ollamaOllama
azure-openaiAzure OpenAI
qZapytanie
intervalCzęstotliwość oceny
Dostępne opcje:¶ disabledWyłączono
dailyCodziennie
weeklyCotygodniowo
monthlyMiesięcznie
on_changeOceń zmiany w tłumaczeniu
on_updateOceń aktualizacje repozytorium
- Wyzwalacze:
Add-on installation, Component update, Codziennie, Event change, Manual trigger
Ocenia istniejące tłumaczenia przy użyciu modelu LLM i rejestruje wyniki kontroli jakości.
This add-on evaluates existing translations using an LLM service configured under Automatyczne sugestie. It does not generate suggestions or change translations. Choose an Evaluation service from the configured LLM services; credentials and project overrides are reused.
The Query selects strings using the normal search syntax. By default, translated strings are selected. Source strings, read-only strings, and glossary entries are excluded. Each request includes all translation plural forms, source text, language information, string context, glossary terms, placeholders, and configured translation instructions. This data is sent to the selected provider.
Requests group strings from the same translation in file order, using the service’s automatic translation batch size (currently 20 strings for built-in LLM services). All plural forms of a string stay together. Related strings share context, allowing the evaluator to check meaning and terminology across the batch. Batching reduces the number of provider requests for scheduled, manual, and change-triggered runs; it does not skip unchanged strings.
Evaluation frequency defaults to weekly. Daily and monthly schedules are also available; disabled turns off scheduled evaluation. Background processing must be enabled. A successful full run starts the next interval. Manual runs bypass the interval. Enable Evaluate translation changes or Evaluate repository updates to additionally evaluate after those events. Installation does not immediately contact the provider. Each run can incur provider costs, including reevaluation of unchanged translations.
Evaluation runs in background tasks, with results and failure counts recorded in the existing add-on activity log. Failed requests retain existing valid findings and are tried again only by a subsequent run. Evaluation shares the service’s automatic translation cooldown: rate-limit responses activate it, and batches are skipped while it is active. More specific installations take precedence: component, nearest category, project, then site-wide.
Findings appear as standard checks for accuracy, fluency, terminology, style, and
formatting. Each finding includes a minor, major, or critical severity and an
explanation. Multiple findings in one category share a check, so ignoring that
check ignores the whole category for the string. Existing search filters and API
search work, for example check:ai_accuracy. Translation flags such as
ignore-ai-accuracy disable a category; ignore-all-checks disables all checks.
Changing the source or translation removes outdated findings. Results received after any source or translation in their batch changes are discarded for the whole batch. A failed or malformed response also leaves existing findings for the whole batch unchanged; other batches can still complete. Incomplete runs do not advance the scheduled evaluation date. Reevaluation of unchanged content preserves ignored categories, and a successful evaluation removes categories that no longer have findings. Removing or reconfiguring the add-on clears its findings. Evaluator metadata is internal and cannot be edited through the API; the add-on configuration uses the existing Dodatki permissions and validation.
Automatyzacja¶
Dodane w wersji 2026.10.
- ID dodatku:
weblate.automation.automation- Konfiguracja:
workflowPrzepływ pracy
Wpisz definicję automatyzacji w formacie YAML lub JSON.
- Wyzwalacze:
Component update, Codziennie, Event change, Manual trigger, Repository post-commit, Repository post-push, Repository post-update
Wykonuje uporządkowane operacje tłumaczenia z uwzględnieniem warunków i rozgałęzień.
Install this add-on on a component, category, project, or site. Inherited instances run separately for each component. Multiple instances can be installed. Configuring, previewing, and running an automation requires the usual add-on management permission. Saving its configuration does not execute it.
Enter YAML or JSON in Workflow. Use Preview without changes to validate it and inspect planned actions, then Run now for real execution. Results appear in the add-on activity log.
Zobacz także
Workflow definition for the script definition and reference.
Cookbook for complete examples.
Apply translation memory before machine translation for translation memory before machine translation.
Tłumaczenie automatyczne¶
- ID dodatku:
weblate.autotranslate.autotranslate- Konfiguracja:
modeTryb automatycznego tłumaczenia
Dostępne opcje:¶ suggestDodaj jako sugestię
translateDodaj jako tłumaczenie
fuzzyDodaj jako „Wymaga edycji”
approvedDodaj jako zatwierdzone tłumaczenie
qZapytanie
Pamiętaj, że tłumaczenie wszystkich ciągów spowoduje odrzucenie wszystkich istniejących tłumaczeń.
auto_sourceŹródło tłumaczeń automatycznych
Dostępne opcje:¶ othersInne komponenty tłumaczenia
mtTłumaczenie maszynowe
componentKomponent
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.
enginesSilniki tłumaczenia maszynowego
thresholdOcena wyniku
- Wyzwalacze:
Add-on installation, Component update, Codziennie, Event change
Automatycznie tłumaczy ciągi przy użyciu tłumaczenia maszynowego lub innych komponentów.
To control translation order, use the Automatyzacja add-on with a separate action for each pass. Follow the Apply translation memory before machine translation cookbook example to apply local translation memory first and send only the remaining strings to a machine translation service. Selecting multiple engines here uses Priority of machine translation and translation memory services; installation order of separate add-ons does not define an execution sequence.
Lokalizacja JavaScript CDN¶
Dodane w wersji 4.2.
- ID dodatku:
weblate.cdn.cdnjs- Konfiguracja:
thresholdPróg tłumaczenia
Procent przetłumaczonych ciągów, które muszą być obecne w celu uwzględnienia tłumaczenia.
css_selectorSelektor CSS
Selektor CSS do wykrywania lokalizowalnych elementów.
cookie_nameNazwa pliku cookie języka
Nazwa pliku cookie przechowującego preferencje językowe.
filesWyodrębnianie ciągów z plików HTML
Lista nazw plików w bieżącym repozytorium lub zdalnych adresów URL do przeanalizowania w celu przetłumaczenia ciągów.
- Wyzwalacze:
Add-on installation, Codziennie, Repository post-commit, Repository post-remove, Repository post-update
Publikuje tłumaczenia w content delivery network dla lokalizacji JavaScript lub HTML.
Może zostać użyte do lokalizowania statycznych stron HTML, lub do załadowania lokalizacji w kodzie JavaScript.
Generuje unikalny URL dla twojego komponentu, który możesz umieścić na stronach HTML, aby je zlokalizować. Po więcej szczegółów patrz Tłumaczenie HTML i JavaScript za pomocą Weblate CDN.
Informacja
Ten dodatek wymaga dodatkowej konfiguracji na serwerze Weblate. LOCALIZE_CDN_PATH konfiguruje miejsce zapisywania wygenerowanych plików (w systemie plików), a LOCALIZE_CDN_URL określa miejsce, w którym będą one udostępniane (URL). Udostępnianie plików nie jest realizowane przez Weblate i musi zostać skonfigurowane zewnętrznie (zwykle przy użyciu usługi CDN).
Ten dodatek jest skonfigurowany na Hosted Weblate i udostępnia pliki poprzez https://weblate-cdn.com/.
Pliki tłumaczeń CDN¶
Dodane w wersji 2026.5.
- ID dodatku:
weblate.cdn.files- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Add-on installation, Component update, Repository post-commit, Repository post-remove, Repository post-update
Publikuje pliki tłumaczeń w 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 Lokalizacja CDN for secure serving guidance.
CDN SDK Kotlin¶
Dodane w wersji 2026.10.
- ID dodatku:
weblate.cdn.kotlin- Konfiguracja:
maximum_ageMaksymalny wiek kompilacji (dni)
Kompilacje są wycofywane po upływie określonej liczby dni od daty pierwszej rejestracji. Ponowna rejestracja kompilacji nie wydłuża czasu jej istnienia.
maximum_versionsMaksymalna liczba zachowywanych wersji
Ogranicza liczbę zachowywanych kompilacji dla wszystkich nazw pakietów. Kompilacja jest usuwana po osiągnięciu tego limitu lub maksymalnego wieku.
- Wyzwalacze:
Add-on installation, Component update, Codziennie, Repository post-commit, Repository post-remove, Repository post-update
Publikuje zasoby tekstowe i zasoby liczby mnogiej systemu Android dla zarejestrowanych kompilacji pakietu Kotlin SDK.
Ostrzeżenie
The Kotlin SDK is available as an alpha release. No compatibility is guaranteed until the final Kotlin SDK is released. Endpoints, build metadata, CDN manifests, and generated resource formats may change without backward compatibility.
Install Kotlin SDK CDN on an Android string-resource component to
publish translations for builds registered by the Kotlin SDK. Configure
LOCALIZE_CDN_URL and LOCALIZE_CDN_PATH first. CDN output is
public, including translations from private components. Manifests expose the
application package name and version code. ARSC files expose published resource
names and their submitted IDs alongside translated text. Do not treat the
uploaded resource mapping as confidential; enable publication only when this
disclosure is intended. Registration and status API access remains permission-controlled.
Copy the Gradle plugin configuration from the add-on configuration page. It
includes the Weblate server URL, public CDN URL, project slug, and component
path (with any category path URL-encoded). Replace the placeholder with a
project-scoped API token whose permissions allow editing the component. Project
administrators can create one in the project’s API access tab; see
Tokeny dostępu dla poszczególnych projektów.
Keep that token in the build environment, not in the application. The add-on’s
API tab shows the API base URL; submit build metadata to its builds/
endpoint. See
Kotlin SDK builds for the request and response format.
For Gradle plugin and library setup, see Kotlin SDK for Android.
The add-on matches resource names and types from registered builds to current component translations. Strings, plurals, and Android styled text are supported. String arrays and resource references are not generated. Untranslated entries, read-only entries, and incomplete plural resources are omitted; applications retain their bundled values. Unsupported styling fails publication; the previous successful publication remains available.
Resource IDs must describe the final installed build. Uploading an identical mapping again is harmless; a different mapping for the same package and version is rejected. Old builds receive current translations by name, including after source text or formatting arguments change. Maintainers are responsible for compatibility with older application code.
Lifecycle settings¶
Maximum build age (days) defaults to 365 and accepts 1 through 730, measured from the first registration. Repeated uploads do not extend it.
Maximum retained versions defaults to 20 and accepts 1 through 100, counted across all package names. One additional unpublished replacement is allowed. New registrations can retire older unpublished replacements. Published builds are retired for this limit only after a replacement is published. Failed replacements preserve existing publications; maximum-age expiry still applies independently.
Either limit retires a build and immediately clears its metadata. Lightweight retired records are deleted on cleanup after 24 hours and successful manifest removal; their package/version identifiers can then be registered again. Failed or interrupted manifest removals are retried hourly. Until removal succeeds, the registration and its referenced artifacts are retained, and the files may remain publicly accessible. Resource mappings are immutable only while their registration records remain.
Each add-on permits at most 1000 registration records, including retired records. New registrations exceeding this limit return HTTP 409 until cleanup frees capacity; identical retries remain accepted. Metadata is bounded by the 5 MiB upload limit and maximum retained version count plus one replacement, without a separate byte quota. Limits are enforced during registration and scheduled cleanup.
Superseded artifacts are deleted on cleanup after a fixed 24-hour window. All artifact files, including superseded files and incomplete publication output, count towards hard limits of 5 GiB and 10000 files per add-on. The larger artifact allowance accommodates translated text and multiple locales; it does not guarantee capacity for every locale or build combination. Shared artifacts count only once. Publications exceeding either limit fail before writing new artifacts and preserve the previous manifest. Neither the window nor these limits are configurable. Limit manifest caching as described below.
Compilation stages one locale at a time on disk. A per-locale conservative encoded text and styling estimate exceeding 64 MiB fails publication.
Preparation additionally requires up to 5 GiB of temporary disk space per
publication job, separate from the published artifact allowance. Temporary
files contain staged ARSC output, shared by versions with identical resource mappings.
They are stored below LOCALIZE_CDN_PATH. Configure the server to
deny access to .kotlin-sdk-staging as described in
Lokalizacja CDN before enabling this add-on.
Manifest replacement follows the database commit. Failed or interrupted writes are retried by subsequent publication jobs, with artifacts for both the old and pending manifest protected until replacement succeeds.
Uninstalling the add-on attempts to remove its published files from the CDN origin immediately. Failed or interrupted removals are retried hourly; files may remain publicly accessible until cleanup succeeds. Removal does not revoke copies already cached or downloaded by clients.
Publication and cleanup run asynchronously after build registration, component updates, translation commits and removals, and during daily add-on processing. Failures appear in the add-on activity log and registration status. Previous successful publications remain available when replacement generation fails. If the component stops using the Android resource format, hourly maintenance retires its publications. The normal artifact retention window still applies.
CDN client contract¶
Each build has a stable manifest at
<CDN base>/<packageName>/<versionCode>/manifest.json. The version 1 manifest
contains schemaVersion, packageName, versionCode, and locales.
Locale keys are Weblate language codes. Each locale contains a relative url,
sha256, and byte size for its ARSC artifact. Resolve relative URLs against
the manifest URL. Artifact contents do not change after publication.
The manifest has a JSON Schema.
Configure the CDN origin to cache manifests for at most one hour (for example,
Cache-Control: public, max-age=3600), and artifact files with
Cache-Control: public, max-age=31536000, immutable. Artifact files may use
application/octet-stream. Configure these headers on the CDN server.
Translation updates and retirements can take up to one hour to reach clients.
Use Cache-Control: no-cache when immediate revalidation is preferred.
The fixed 24-hour artifact retention window exceeds the manifest cache lifetime.
The Kotlin SDK should validate artifact length and hash, cache successful downloads locally, and load them with Android’s resources-loader API on API 30 or newer. A missing manifest, missing locale, or download failure must preserve bundled resources. Retired manifests return 404 at the origin; cached copies can remain usable until they expire. Hashes detect corrupted or mismatched content; authentication relies on HTTPS and the configured CDN.
Usuń puste ciągi¶
Dodane w wersji 4.4.
- ID dodatku:
weblate.cleanup.blank- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Add-on installation, Repository post-commit, Repository post-update
Usuwa ciągi bez tłumaczenia z plików tłumaczeń.
Użyj tego, aby nie mieć pustych ciągów w plikach tłumaczeń (na przykład, jeśli twoja biblioteka lokalizacji wyświetla je jako brakujące zamiast powracać do ciągu źródłowego).
Wyczyść pliki tłumaczenia¶
- ID dodatku:
weblate.cleanup.generic- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Add-on installation, Repository post-update, Repository pre-commit
Zaktualizuj wszystkie pliki tłumaczeń tak, aby odpowiadały jednojęzykowemu plikowi podstawowemu. W przypadku większości formatów plików oznacza to usunięcie nieaktualnych kluczy tłumaczeń, których nie ma już w pliku podstawowym.
For formats containing additional content besides translation strings (such as Pliki HTML, Pliki RC systemu Windows, or Format 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 Zarządzanie repozytorium on that translation instead of installing the add-on.
Dodaj brakujące języki¶
- ID dodatku:
weblate.consistency.languages- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Zapewnia, że dla wszystkich komponentów w projekcie używany jest spójny zestaw języków.
Informacja
The components shared from other projects are not considered in this.
Brakujące języki są sprawdzane raz na 24 godziny oraz gdy nowe języki są dodawane w Weblate.
W przeciwieństwie do większości ten dodatek wpływa na cały projekt.
Podpowiedź
Automatycznie tłumacz nowo dodane ciągi z Tłumaczenie automatyczne.
Wykrycie komponentów¶
- ID dodatku:
weblate.discovery.discovery- Konfiguracja:
matchWyrażenie regularne dopasowujące pliki tłumaczeń
Wyrażenie regularne musi definiować nazwaną grupę dla komponentu. Należy również zdefiniować nazwaną grupę dla języka podczas dopasowywania plików tłumaczeń. Po ustawieniu maski pliku należy pominąć język i zamiast tego dopasować bazę jednojęzyczną lub nowy plik bazowy.
file_formatFormat pliku
name_templateDostosuj nazwę komponentu
Użyj składni szablonu Django. Ten szablon musi zawierać {{ component }}.
base_file_templateZdefiniuj jednojęzyczną bazową nazwę pliku
Pozostaw puste dla plików tłumaczeń dwujęzycznych. Po ustawieniu ten szablon musi zawierać {{ component }}.
new_base_templateZdefiniuj plik bazowy dla nowych tłumaczeń
Nazwa pliku używanego do tworzenia nowych tłumaczeń. Dla Gettext wybierz plik .pot. Ten szablon musi zawierać {{ component }}.
intermediate_templatePlik języka pośredniego
Nazwa pliku tłumaczenia pośredniego. W większości przypadków jest to plik tłumaczenia dostarczony przez deweloperów i jest używany podczas tworzenia faktycznych ciągów źródłowych. Ten szablon musi zawierać {{ component }}.
filemask_templateZdefiniuj maskę pliku
Pozostaw puste, aby bezpośrednio dopasować pliki tłumaczeń. Po ustawieniu, funkcja odkrywania dopasowuje bazę jednojęzyczną lub nowy plik bazowy i używa tego szablonu jako maski pliku. Dołącz symbol wieloznaczny języka i {{ component }}, na przykład locale//{{ component }}.po lub docs/{{ component }}_.md.
language_regexFiltr języka
Wyrażenie regularne do filtrowania plików tłumaczeń podczas skanowania w poszukiwaniu maski pliku.
copy_addonsKlonuj dodatki z głównego komponentu do nowo utworzonych
removeUsuń komponenty dla nieistniejących plików
- Wyzwalacze:
Automatycznie dodaje lub usuwa komponenty projektu na podstawie zmian plików w systemie kontroli wersji.
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.
- Wyrażenie regularne:
(?:(?P<path>.*/))?(?P<component>.+?)_(?P<language>[A-Za-z]{2,3}(?:[_-][A-Za-z0-9]+)*)\.(?P<extension>[^/.]+)- Nazwa komponentu:
{{ 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.
Możesz używać znaczników szablonów Django zarówno w nazwie pliku, jak i treści, na przykład:
{{ component }}Component name parsed from the
componentmatch group{{ component|title }}Nazwa pliku rozpoczynająca się od wielkiej litery
{{ path }}: {{ component }}Niestandardowa grupa dopasowań z wyrażenia regularnego
Po naciśnięciu Save zostanie wyświetlony podgląd pasujących komponentów, skąd będziesz mógł sprawdzić, czy dana konfiguracja odpowiada twoim potrzebom:
Przykłady wykrycia komponentów¶
The worked example above covers the most common filename-based variant layout. The following examples show other repository structures you can match.
Jeden folder na język¶
Jeden folder na język zawierający pliki tłumaczeniowe dla komponentów.
- Wyrażenie regularne:
(?P<language>[^/.]*)/(?P<component>[^/]*)\.po- Dopasowane pliki:
cs/application.pocs/website.pode/application.pode/website.po
Lokalny układ Gettext¶
Zwykła struktura do przechowywania plików gettext PO.
- Wyrażenie regularne:
locale/(?P<language>[^/.]*)/LC_MESSAGES/(?P<component>[^/]*)\.po- Dopasowane pliki:
locale/cs/LC_MESSAGES/application.polocale/cs/LC_MESSAGES/website.polocale/de/LC_MESSAGES/application.polocale/de/LC_MESSAGES/website.po
Złożone nazwy plików¶
Używanie nazwy komponentu i języka w nazwie pliku.
- Wyrażenie regularne:
src/locale/(?P<component>[^/]*)\.(?P<language>[^/.]*)\.po- Dopasowane pliki:
src/locale/application.cs.posrc/locale/website.cs.posrc/locale/application.de.posrc/locale/website.de.po
Powtarzający się kod języka¶
Używanie języka w ścieżce i nazwie pliku.
- Wyrażenie regularne:
locale/(?P<language>[^/.]*)/(?P<component>[^/]*)/(?P=language)\.po- Dopasowane pliki:
locale/cs/application/cs.polocale/cs/website/cs.polocale/de/application/de.polocale/de/website/de.po
Rozdziel ciągi Android¶
Ciągi zasobów Androida podzielone na kilka plików.
- Wyrażenie regularne:
res/values-(?P<language>[^/.]*)/strings-(?P<component>[^/]*)\.xml- Dopasowane pliki:
res/values-cs/strings-about.xmlres/values-cs/strings-help.xmlres/values-de/strings-about.xmlres/values-de/strings-help.xml
Dopasowywanie wielu ścieżek¶
Wielomodułowy projekt Maven z tłumaczeniami właściwości Java.
- Wyrażenie regularne:
(?P<originalHierarchy>.+/)(?P<component>[^/]*)/src/main/resources/ApplicationResources_(?P<language>[^/.]*)\.properties- Nazwa komponentu:
{{ originalHierarchy }}: {{ component }}- Dopasowane pliki:
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
Podpowiedź
Component discovery add-on uses Wewnętrzne adresy URL Weblate. It’s a convenient way to share
VCS setup between multiple components. Linked components use the local repository of
the main component set up by filling weblate://project/main-component
into the Repozytorium kodu źródłowego field (in Operations ↓ Settings ↓
Version control system) of each respective component.
This saves time with configuration and system resources too.
Podpowiedź
Ensure the new component contains the full set of translatable languages with Dodaj brakujące języki.
Zobacz także
Wiadomości Fedory¶
Dodane w wersji 5.15.
- ID dodatku:
weblate.fedora_messaging.publish- Konfiguracja:
amqp_urlAdres URL brokera AMQP
Adres URL brokera AMQP, z którym chcesz się połączyć.
topic_prefixPrefiks tematu
Opcjonalny prefiks dodawany na początku generowanych tematów wiadomości.
publish_timeoutLimit czasu publikacji
Ile sekund należy czekać na potwierdzenie dostawy od brokera.
connection_attemptsPróby połączenia
Ile razy należy próbować nawiązać połączenie z brokerem.
retry_delayOpóźnienie ponownej próby
Ile sekund należy odczekać między kolejnymi próbami nawiązania połączenia.
ca_certPakiet certyfikatów CA (PEM)
Wklej tylko bloki certyfikatu PEM, każdy zaczynający się od „—–BEGIN CERTIFICATE—–” i kończący się na „—–END CERTIFICATE—–”.
client_keyKlucz prywatny klienta (PEM)
Wklej pojedynczy, niezaszyfrowany blok klucza prywatnego PEM. Zaszyfrowane klucze prywatne nie są obsługiwane.
client_certCertyfikat klienta (PEM)
Wklej tylko blok certyfikatu PEM zaczynający się od „—–BEGIN CERTIFICATE—–”; nie wklejaj danych wyjściowych z polecenia „openssl x509 -text”.
event_filterZmień zdarzenia do wyzwolenia
Choose which change events should trigger this add-on. Zmień zdarzenia do wyzwolenia
eventsZdarzenia wybranych zmian
- Wyzwalacze:
Wysyła powiadomienia do wymiany AMQP kompatybilnej z wiadomościami Fedory.
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 Zdarzenia wybranych zmian
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
actionVerbose name of the change.
timestampISO formatted timestamp
targetNew value of the change (eg. new translation of the string)
oldOld value of the change (eg. previous translation of the string)
sourceSource string.
urlAbsolute URL to view the related object.
authorAuthor username (this can be different from user for example when accepting suggestions)
userActing username
projectKońcówka adresu URL projektu
componentKońcówka adresu URL komponentu
translationKod języka tłumaczenia
Message headers¶
There are additional headers which you might utilize for routing as well:
actionVerbose name of the change.
projectKońcówka adresu URL projektu
componentKońcówka adresu URL komponentu
Example messages¶
Zdarzenie scalania repozytorium:
{
"id": 1,
"action": "Merged repository",
"timestamp": "2017-06-15T11:30:47.325000+00:00",
"url": "http://example.com/projects/test/test/",
"component": "test"
}
Nowe zdarzenie ciągu źródłowego:
{
"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"]
}
Zaktualizowano zasób:
{
"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"
}
Zdarzenie usunięcia projektu:
{
"id": 9,
"action": "Removed project",
"timestamp": "2019-10-17T15:57:08.559420+00:00",
"target": "test",
"user": "testuser"
}
Nowe wydarzenie dla współtwórców:
{
"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"]
}
Nowe wydarzenie tłumaczeniowe:
{
"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"]
}
Zobacz także
Edycja zbiorcza¶
- ID dodatku:
weblate.flags.bulk- Konfiguracja:
qZapytanie
stateStan do ustawienia
Dostępne opcje:¶ -1Nie zmieniaj
10Wymaga edycji
11Wymaga edycji (Wymaga przeredagowania)
12Wymaga edycji (Wymaga sprawdzenia)
20Przetłumaczone
30Zatwierdzone
add_flagsFlagi źródła do dodania — wszystkie języki
remove_flagsFlagi źródła do usunięcia — wszystkie języki
add_translation_flagsFlagi tłumaczeń do dodania — pasujące tłumaczenia
Dotyczy tylko pasujących tłumaczeń, z wyłączeniem ciągów źródłowych.
remove_translation_flagsFlagi tłumaczeń do usunięcia — pasujące tłumaczenia
Usuwa lokalnie ustawione flagi. Flagi dziedziczone pozostają w mocy.
add_labelsEtykiety do dodania — wszystkie języki
remove_labelsEtykiety do usunięcia — wszystkie języki
- Wyzwalacze:
Zbiorcza edycja flag, etykiet lub stanów ciągów.
Przykłady:
Zapytanie wyszukiwania |
|
|---|---|
Etykiety do dodania |
ostatnie |
Zapytanie wyszukiwania |
|
|---|---|
Flagi tłumaczeń do dodania |
|
Zapytanie wyszukiwania |
|
|---|---|
Flagi tłumaczeń do dodania |
|
Oznacz niezmienione tłumaczenia jako „Wymaga przeredagowania”¶
- ID dodatku:
weblate.flags.same_edit- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Za każdym razem, gdy nowy przetłumaczalny ciąg zostaje zaimportowany z VCS i pasuje do ciągu źródłowego, jest oznaczany jako wymagający przeredagowania w Weblate. Jest to szczególnie przydatne w przypadku formatów plików zawierających ciągi źródłowe nieprzetłumaczonych ciągów.
Podpowiedź
Możesz także zaostrzyć kontrolę Niezmienione tłumaczenie, dodając flagę strict-same do flagi Flagi tłumaczeń.
Zobacz także
Oznacz nowe ciągi źródłowe jako „Wymaga sprawdzenia”¶
- ID dodatku:
weblate.flags.source_edit- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Za każdym razem, gdy nowy ciąg źródłowy zostaje zaimportowany z VCS, jest oznaczany jako wymagający sprawdzenia w Weblate. W ten sposób możesz łatwo filtrować i edytować ciągi źródłowe napisane przez programistów.
Zobacz także
Oznacz nowe tłumaczenia jako „Wymaga przeredagowania”¶
- ID dodatku:
weblate.flags.target_edit- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Za każdym razem, gdy nowy przetłumaczalny ciąg zostaje zaimportowany z VCS, jest oznaczany jako wymagający przeredagowania w Weblate. W ten sposób możesz łatwo filtrować i edytować tłumaczenia stworzone przez programistów.
Zobacz także
Oznacz zaktualizowane tłumaczenia z repozytorium jako „Wymaga przeredagowania”¶
- ID dodatku:
weblate.flags.target_repo_update- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Za każdym razem, gdy tłumaczenie ciągu zostaje zmienione w VCS, jest oznaczane jako wymagające przeredagowania w Weblate. Jest to szczególnie przydatne, jeśli pliki tłumaczeń są często aktualizowane ręcznie lub przez zewnętrzną usługę.
Zobacz także
Wypełnij ciągi tylko do odczytu źródłem¶
Dodane w wersji 4.18.
- ID dodatku:
weblate.generate.fill_read_only- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Wypełnia ciągi tłumaczeń tylko do odczytu ciągami źródłowymi.
Generator statystyk¶
- ID dodatku:
weblate.generate.generate- Konfiguracja:
scopeZakres danych wyjściowych
Dostępne opcje:¶ translationJeden plik na tłumaczenie
componentJeden plik na komponent
filenameNazwa wygenerowanego pliku
templateZawartość wygenerowanego pliku
- Wyzwalacze:
Add-on installation, Component update, Repository post-add, Repository post-remove, Repository pre-commit
Generuje plik zawierający szczegółowe informacje o stanie tłumaczenia.
Możesz używać szablonów Django zarówno w nazwie pliku, jak i treści, sprawdź Znaczniki szablonu żeby poznać szczegóły szablonów.
Na przykład wygenerowanie pliku podsumowania dla każdego tłumaczenia:
- Nazwa wygenerowanego pliku
locale/{{ language_code }}.json- Zawartość
{ "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.
Zobacz także
Wypełnij wstępnie tłumaczenie źródłem¶
Dodane w wersji 4.11.
- ID dodatku:
weblate.generate.prefill- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Wypełnia ciągi tłumaczeń ciągami źródłowymi.
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.
Generowanie pseudolokalizacji¶
Dodane w wersji 4.5.
- ID dodatku:
weblate.generate.pseudolocale- Konfiguracja:
sourceCiągi źródłowe
targetTłumaczenie docelowe
Wszystkie ciągi w tym tłumaczeniu zostaną nadpisane
prefixPrzedrostkowy tekst stały
var_prefixPrzedrostkowy tekst zmienny
suffixPrzyrostkowy tekst stały
var_suffixPrzyrostkowy tekst zmienny
var_multiplierMnożnik tekstu zmiennego
Ile razy powtórzyć tekst zmienny w zależności od długości ciągu źródłowego.
include_readonlyUwzględnij ciągi tylko do odczytu
- Wyzwalacze:
Generuje tłumaczenie poprzez automatyczne dodanie prefiksu i sufiksu do ciągów źródłowych.
Pseudolokale są przydatne do wyszukiwania ciągów znaków, które nie są przygotowane do lokalizacji. Odbywa się to poprzez zmianę wszystkich możliwych do przetłumaczenia ciągów źródłowych, aby ułatwić wykrycie niezmienionych ciągów podczas uruchamiania aplikacji w języku pseudolokalnym.
Możliwe jest również znalezienie ciągów znaków, których zlokalizowane odpowiedniki mogą nie pasować do układu.
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.
Ciągi zostaną wygenerowane według następującego wzorca:
Prepended static text Prepended variable text Source string Appended variable text Appended static text
Podpowiedź
Do testowania możesz używać prawdziwych języków, ale w Weblate dostępne są dedykowane pseudolokale - en_XA i ar_XB.
Podpowiedź
Możesz użyć tego dodatku, aby rozpocząć tłumaczenie na nowe ustawienia regionalne istniejącego języka lub języka podobnego. Po dodaniu tłumaczenia do komponentu przejdź do dodatku. Przykład: Jeśli masz fr i chcesz rozpocząć tłumaczenie fr_CA, po prostu ustaw fr jako źródło, fr_CA jako cel i pozostaw przedrostek i sufiks puste.
Odinstaluj dodatek po wypełnieniu nowego tłumaczenia, aby uniemożliwić Weblate zmianę tłumaczeń wykonanych po skopiowaniu.
Zaktualizuj zmienną ALL_LINGUAS w pliku „konfiguracyjnym”¶
- ID dodatku:
weblate.gettext.configure- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Add-on installation, Codziennie, Repository post-add, Repository post-remove
Aktualizuje zmienną ALL_LINGUAS w plikach „configure”, „configure.in” lub „configure.ac” po dodaniu lub usunięciu tłumaczenia.
Updates the ALL_LINGUAS variable in configure, configure.in or any
configure.ac files, when a translation is added or removed.
Dostosuj wyjście gettext¶
Removed in version 5.13: Replaced by Parametry formatu pliku.
Zaktualizuj szablon gettext (Django)¶
Dodane w wersji 5.17.
- ID dodatku:
weblate.gettext.django- Konfiguracja:
intervalCzęstotliwość aktualizacji
Jak często dodatek powinien aktualizować plik POT po odświeżeniu komponentu.
Dostępne opcje:¶ dailyCodziennie
weeklyCotygodniowo
monthlyMiesięcznie
normalize_headerNormalizuj nagłówek POT
Aktualizuje nagłówki gettext i zastępuje zastępcze komentarze POT.
location_modeLokalizacje źródeł
Wybierz sposób, w jaki wyodrębnienie zapisuje lokalizacje źródłowe do pliku POT. Użyj tej opcji, aby zachować lokalizacje w szablonie, pomijając je w przetłumaczonych plikach PO.
Dostępne opcje:¶ fileUżyj ustawień formatu pliku
keepWyodrębnij lokalizacje do pliku POT
omitNie wyodrębniaj lokalizacji
- Wyzwalacze:
Aktualizuje szablon gettext za pomocą wbudowanego polecenia makemessages Django.
This add-on updates the template configured in Szablon dla nowych tłumaczeń. 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 Zaktualizuj pliki PO, aby dopasować 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.
Aktualizuj plik LINGUAS¶
- ID dodatku:
weblate.gettext.linguas- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Add-on installation, Codziennie, Repository post-add, Repository post-remove
Aktualizuje plik LINGUAS po dodaniu lub usunięciu tłumaczenia.
Zaktualizuj plik POT (Meson)¶
Dodane w wersji 5.17.
- ID dodatku:
weblate.gettext.meson- Konfiguracja:
intervalCzęstotliwość aktualizacji
Jak często dodatek powinien aktualizować plik POT po odświeżeniu komponentu.
Dostępne opcje:¶ dailyCodziennie
weeklyCotygodniowo
monthlyMiesięcznie
normalize_headerNormalizuj nagłówek POT
Aktualizuje nagłówki gettext i zastępuje zastępcze komentarze POT.
location_modeLokalizacje źródeł
Wybierz sposób, w jaki wyodrębnienie zapisuje lokalizacje źródłowe do pliku POT. Użyj tej opcji, aby zachować lokalizacje w szablonie, pomijając je w przetłumaczonych plikach PO.
Dostępne opcje:¶ fileUżyj ustawień formatu pliku
keepWyodrębnij lokalizacje do pliku POT
omitNie wyodrębniaj lokalizacji
data_dirsKatalogi danych ITS
Wymienione w oddzielnych liniach katalogi (względem katalogu głównego repozytorium) zawierające podkatalog „its” – na przykład „po” dla „po/its”. Katalogi wymienione wcześniej mają pierwszeństwo przed katalogami wymienionymi później oraz przed wbudowanymi regułami.
comment_modeKomentarze w kodzie
Wybierz, czy xgettext powinien nie wyodrębnić komentarzy, wyodrębnić wszystkie komentarze, czy wyodrębnić tylko komentarze oznaczone określonym tagiem.
Dostępne opcje:¶ offNie wyodrębniaj komentarzy
allWyodrębnij wszystkie komentarze
taggedWyodrębnij komentarze z tagiem
comment_tagTag komentarza
Tag przekazywany do xgettext w celu wyodrębnienia komentarzy podczas używania trybu komentarzy z tagami.
checksKontrole xgettext
Dodatkowe walidacje xgettext do włączenia dla wyodrębnionych wiadomości.
Dostępne opcje:¶ ellipsis-unicodeellipsis-unicode
space-ellipsisspace-ellipsis
quote-unicodequote-unicode
bullet-unicodebullet-unicode
keywordDodatkowe słowa kluczowe
Dodatkowe słowa kluczowe rozdzielone znakami nowej linii przekazane do xgettext za pomocą –keyword.
keyword_exclusiveUżywaj wyłącznie słów kluczowych
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.presetPredefiniowany Meson
Wbudowane ustawienie dopasowywania argumentów xgettext dla integracji gettext w Meson. Predefiniowany parametr GLib dodaje opcje słów kluczowych i flag formatu używane przez pomocnika gettext Meson.
Dostępne opcje:¶ glibGLib
- Wyzwalacze:
Aktualizuje szablon gettext za pomocą konwencji gettext Meson.
This add-on updates the template configured in Szablon dla nowych tłumaczeń. 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 Zaktualizuj pliki PO, aby dopasować 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
Szablon dla nowych tłumaczeń. 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 Szablon dla nowych tłumaczeń, 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.
Generuj pliki MO¶
- ID dodatku:
weblate.gettext.mo- Konfiguracja:
pathŚcieżka wygenerowanego pliku MO
Jeśli nie zostanie określony, zostanie użyta lokalizacja pliku PO.
fuzzyDołącz ciągi wymagające edycji
Ciągi wymagające edycji (rozmyte) zazwyczaj nie są gotowe do użycia jako tłumaczenia.
- Wyzwalacze:
Automatycznie generuje plik MO dla każdego zmienionego pliku PO.
Lokalizację wygenerowanego pliku MO można dostosować, a jego pole używa Znaczniki szablonu.
Informacja
Jeśli tłumaczenie zostanie usunięte, jego plik PO zostanie usunięty z repozytorium, ale plik MO wygenerowany przez ten dodatek nie zostanie usunięty. Plik MO należy usunąć ręcznie z pliku źródłowego.
Zaktualizuj pliki PO, aby dopasować POT (msgmerge)¶
Zmienione w wersji 5.13: Settings configuration has been moved to Parametry formatu pliku.
- ID dodatku:
weblate.gettext.msgmerge- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Aktualizuje wszystkie pliki PO (skonfigurowane przez „File mask”), aby pasowały do pliku POT (zgodnie z konfiguracją „Szablon dla nowych tłumaczeń”) przy użyciu msgmerge.
This add-on is essential when working with gettext PO files where the POT (template) file is updated with new strings or changes to existing strings. When the POT file is updated in the repository, this add-on automatically merges those changes into all language PO files, ensuring that:
New translatable strings appear in all languages
Removed strings are marked as obsolete
Modified strings are marked as needing review (fuzzy)
Most msgmerge command-line options can be set up through file format parameters
configuration. Enable the po_remove_obsolete parameter to remove obsolete
#~ entries when PO files are saved.
Zaktualizuj plik POT (Sphinx)¶
Dodane w wersji 5.17.
- ID dodatku:
weblate.gettext.sphinx- Konfiguracja:
intervalCzęstotliwość aktualizacji
Jak często dodatek powinien aktualizować plik POT po odświeżeniu komponentu.
Dostępne opcje:¶ dailyCodziennie
weeklyCotygodniowo
monthlyMiesięcznie
normalize_headerNormalizuj nagłówek POT
Aktualizuje nagłówki gettext i zastępuje zastępcze komentarze POT.
location_modeLokalizacje źródeł
Wybierz sposób, w jaki wyodrębnienie zapisuje lokalizacje źródłowe do pliku POT. Użyj tej opcji, aby zachować lokalizacje w szablonie, pomijając je w przetłumaczonych plikach PO.
Dostępne opcje:¶ fileUżyj ustawień formatu pliku
keepWyodrębnij lokalizacje do pliku POT
omitNie wyodrębniaj lokalizacji
filter_modeFiltrowanie
Opcjonalnie usuń ciągi, których nie da się przetłumaczyć po wyodrębnieniu przez Sphinx.
Dostępne opcje:¶ noneŻaden
weblate_docsDokumentacja Weblate
- Wyzwalacze:
Aktualizuje szablon gettext za pomocą kompilatora gettext Sphinx bez ładowania konfiguracji projektu.
This add-on updates the template configured in Szablon dla nowych tłumaczeń. 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 Zaktualizuj pliki PO, aby dopasować 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.
Zaktualizuj plik POT (xgettext)¶
Dodane w wersji 5.17.
- ID dodatku:
weblate.gettext.xgettext- Konfiguracja:
intervalCzęstotliwość aktualizacji
Jak często dodatek powinien aktualizować plik POT po odświeżeniu komponentu.
Dostępne opcje:¶ dailyCodziennie
weeklyCotygodniowo
monthlyMiesięcznie
normalize_headerNormalizuj nagłówek POT
Aktualizuje nagłówki gettext i zastępuje zastępcze komentarze POT.
location_modeLokalizacje źródeł
Wybierz sposób, w jaki wyodrębnienie zapisuje lokalizacje źródłowe do pliku POT. Użyj tej opcji, aby zachować lokalizacje w szablonie, pomijając je w przetłumaczonych plikach PO.
Dostępne opcje:¶ fileUżyj ustawień formatu pliku
keepWyodrębnij lokalizacje do pliku POT
omitNie wyodrębniaj lokalizacji
data_dirsKatalogi danych ITS
Wymienione w oddzielnych liniach katalogi (względem katalogu głównego repozytorium) zawierające podkatalog „its” – na przykład „po” dla „po/its”. Katalogi wymienione wcześniej mają pierwszeństwo przed katalogami wymienionymi później oraz przed wbudowanymi regułami.
comment_modeKomentarze w kodzie
Wybierz, czy xgettext powinien nie wyodrębnić komentarzy, wyodrębnić wszystkie komentarze, czy wyodrębnić tylko komentarze oznaczone określonym tagiem.
Dostępne opcje:¶ offNie wyodrębniaj komentarzy
allWyodrębnij wszystkie komentarze
taggedWyodrębnij komentarze z tagiem
comment_tagTag komentarza
Tag przekazywany do xgettext w celu wyodrębnienia komentarzy podczas używania trybu komentarzy z tagami.
checksKontrole xgettext
Dodatkowe walidacje xgettext do włączenia dla wyodrębnionych wiadomości.
Dostępne opcje:¶ ellipsis-unicodeellipsis-unicode
space-ellipsisspace-ellipsis
quote-unicodequote-unicode
bullet-unicodebullet-unicode
keywordDodatkowe słowa kluczowe
Dodatkowe słowa kluczowe rozdzielone znakami nowej linii przekazane do xgettext za pomocą –keyword.
keyword_exclusiveUżywaj wyłącznie słów kluczowych
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_modeŹródło danych wejściowych
Wybierz, czy xgettext powinien odczytywać pliki źródłowe ze wzorców glob, czy z manifestu POTFILES/POTFILES.in.
Dostępne opcje:¶ patternsWzorce plików źródłowych
potfilesManifest POTFILES
languageJęzyk xgettext
Język programowania przekazywany do xgettext, na przykład Python lub C. Pozostaw puste pole, aby xgettext mógł odgadnąć język na podstawie rozszerzeń plików.
source_patternsWzorce plików źródłowych
Rozdzielone nowymi wierszami wzorce glob dla repozytorium dla plików do wyodrębnienia przez xgettext.
potfiles_pathŚcieżka POTFILES
Ścieżka względna w repozytorium do POTFILES lub POTFILES.in. Wpisy są rozstrzygane względem katalogu głównego repozytorium. Jeśli występuje obok manifestu, POTFILES.skip wyklucza wymienione pliki z ekstrakcji.
- Wyzwalacze:
Aktualizuje szablon gettext za pomocą xgettext w wybranych plikach źródłowych.
This add-on updates the template configured in Szablon dla nowych tłumaczeń. 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 Zaktualizuj pliki PO, aby dopasować 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 Zaktualizuj plik 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.
Zobacz także
Zesquashowane commity na Git¶
- ID dodatku:
weblate.git.squash- Konfiguracja:
squashSquashowanie commitów
Dostępne opcje:¶ allWszystkie commity w jeden
languageWedług języka
fileWedług pliku
authorWedług autora
author-languageWedług autora i języka
append_trailersDołącz zakończenia do opisu zesquashowanego commita
Linie końcowe to linie, które wyglądają podobnie do nagłówków wiadomości e-mail RFC 822, na końcu części opisu commita, takie jak „Współtworzone przez: …”.
commit_messageOpis commita
Ten opis commita będzie użyty zamiast połączonych opisów commitów z zesquashowanych commitów.
- Wyzwalacze:
Zesquashuj commity na Git przed wysłaniem zmian.
Podpowiedź
To avoid unnecessary conflicts, it is recommended to configure automatic receiving of upstream changes by webhooks or API, see Aktualizacja repozytoriów.
Zatwierdzenia Git można zmiażdżyć przed wypchnięciem zmian w jednym z następujących trybów:
Wszystkie commity w jeden
Według języka
Według pliku
Według autora
Według autora i języka
Oryginalne opisy commitów są zachowywane, ale autorstwo zostaje utracone, chyba że wybrano dla autora opcję Na autora lub dostosowano opis commita, aby go uwzględnić.
Oryginalne opisy commitów można opcjonalnie zastąpić niestandardowym opisem commita.
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.
Dostosuj wyjście JSON¶
Zmienione w wersji 5.12: Avoid spaces after separators option added.
Removed in version 5.13: Replaced by Parametry formatu pliku.
Zresetuj repozytorium do nadrzędnego¶
Dodane w wersji 5.17.
- ID dodatku:
weblate.hosted.reset- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Każdej nocy odrzuca wszystkie zmiany w repozytorium Weblate.
Sformatuj plik właściwości Java¶
- ID dodatku:
weblate.properties.sort- Konfiguracja:
case_sensitiveWłącz sortowanie kluczy z uwzględnieniem wielkości liter
- Wyzwalacze:
Formatuje i sortuje plik właściwości Java.
Zamienia nowe linie do formatu Unix.
Formatowanie wielkich liter sekwencji ucieczki Unicode (jeśli są obecne).
Usuwa puste linie i komentarze.
Sortuje ciągi znaków według kluczy.
Usuwa zduplikowane ciągi znaków.
Usuwanie skasowanych komentarzy¶
- ID dodatku:
weblate.removal.comments- Konfiguracja:
ageDni do zachowania
- Wyzwalacze:
Ustaw przedział czasowy na usunięcie komentarzy.
Może to być przydatne do usuwania starych komentarzy, które mogły stać się nieaktualne. Używaj z rozwagą, ponieważ starzenie się komentarzy nie oznacza, że straciły one na znaczeniu.
Usuwanie nieaktualnych sugestii¶
- ID dodatku:
weblate.removal.suggestions- Konfiguracja:
ageDni do zachowania
votesPróg głosowania
Próg do usunięcia. Pozostaw puste, aby usunąć sugestie bez względu na głosy. To pole nie ma wpływu na wyłączone głosowanie.
- Wyzwalacze:
Ustaw przedział czasowy na usunięcie sugestii.
Can be very useful in connection with suggestion voting (see Ocena koleżeńska) to remove suggestions which don’t receive enough positive votes in a given timeframe.
Zaktualizuj pliki RESX¶
- ID dodatku:
weblate.resx.update- Konfiguracja:
Ten dodatek nie ma konfiguracji.
- Wyzwalacze:
Zaktualizuj wszystkie pliki tłumaczeń, aby pasowały do jednojęzycznego pliku podstawowego. Nieużywane ciągi są usuwane, a nowe są dodawane jako kopie ciągu źródłowego.
Podpowiedź
Użyj Wyczyść pliki tłumaczenia jeśli chcesz usunąć tylko nieaktualne klucze tłumaczeń.
Webhooki Slack¶
Dodane w wersji 5.12.
- ID dodatku:
weblate.webhook.slack- Konfiguracja:
webhook_urlAdres URL webhooka
event_filterZmień zdarzenia do wyzwolenia
Choose which change events should trigger this add-on. Zmień zdarzenia do wyzwolenia
eventsZdarzenia wybranych zmian
- Wyzwalacze:
Wysyła powiadomienia do kanału Slack na podstawie wybranych zdarzeń.
Ostrzeżenie
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.
Podpowiedź
To obtain a webhook URL, follow the steps outlined in the Slack Incoming Webhooks documentation
Webhook¶
Dodane w wersji 5.11.
Zmienione w wersji 5.15: Compliance of the secret length with the specification is now validated.
- ID dodatku:
weblate.webhook.webhook- Konfiguracja:
webhook_urlAdres URL webhooka
secretTajny klucz webhooka
Tajny klucz standardowych webhooków to ciąg zakodowany w standardzie base64.
event_filterZmień zdarzenia do wyzwolenia
Choose which change events should trigger this add-on. Zmień zdarzenia do wyzwolenia
eventsZdarzenia wybranych zmian
- Wyzwalacze:
Wysyła powiadomienia do usług zewnętrznych na podstawie wybranych zdarzeń, zgodnie ze specyfikacją Standard Webhooks.
The request payload complies with the Weblate Messaging schema. The
action field uses the action name listed in Zdarzenia wybranych zmian.
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"
]
}
Przykładowe nagłówki żądań:
{
"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 Tłumaczenie automatyczne 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 Wykrycie komponentów 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.
Obsolete add-ons¶
Komentarz współautora¶
Removed in version 2026.10: Replaced by Komentarze współautora.
Existing installations of weblate.gettext.authors are migrated to the
gettext value of the po_contributor_comments file format parameter for
each affected PO component. This includes components covered by category-,
project-, and site-wide installations. New components default to disabled unless
their file format parameters are copied from another component.
Remove weblate.addons.gettext.GettextAuthorComments from custom
WEBLATE_ADDONS lists and weblate.gettext.authors entries from
DEFAULT_ADDONS. Configure Komentarze współautora instead.
Dostosuj wyjście XML¶
Dodane w wersji 4.15.
Removed in version 5.13: Replaced by Parametry formatu pliku.
Dostosuj wyjście YAML¶
Removed in version 5.13: Replaced by Parametry formatu pliku.
Common add-on parameters¶
Silniki tłumaczenia maszynowego¶
|
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 |
|
Pamięć tłumaczeniowa Weblate |
|
Yandex |
|
Yandex v2 |
|
Youdao Zhiyun |
|
tmserver |
Format pliku¶
|
XLIFF 1.2 z rozszerzeniami Apple’a |
|
Pliki metadanych sklepu z aplikacjami |
|
Plik ARB |
|
Zasób ciągów Android |
|
Plik AsciiDoc |
|
Plik napisów Advanced SubStation Alpha |
|
Haiku catkeys |
|
Zasób Compose Multiplatform |
|
Plik CSV |
|
Wielowartościowy plik CSV |
|
Zwykły plik CSV |
|
Plik tekstowy DokuWiki |
|
Plik DTD |
|
Jednolity plik XML |
|
Plik Fluent |
|
Plik JSON Format.JS |
|
Plik JSON go-i18n v1 |
|
Plik JSON go-i18n v2 |
|
Plik TOML go-i18n |
|
Plik gotext JSON |
|
Właściwości GWT |
|
Plik HTML |
|
Plik JSON i18next v3 |
|
Plik JSON i18next v4 |
|
Plik IDML |
|
Plik INI |
|
Plik Inno Setup INI |
|
Plik języka Joomla |
|
Plik JSON |
|
Plik o zagnieżdżonej strukturze JSON |
|
Ciągi znaków Laravel PHP |
|
Plik Markdown |
|
Plik MDX |
|
Plik tekstowy MediaWiki |
|
Plik językowy @draggable/i18n |
|
Mobile Kotlin Resource |
|
Plik JSON Nextcloud |
|
Plik typu OpenDocument |
|
Ciągi PHP |
|
Plik gettext PO |
|
Plik gettext PO (jednojęzyczny) |
|
XLIFF 1.2 z rozszerzeniami gettext |
|
Właściwości Java |
|
Plik RC |
|
Plik RESJSON |
|
Plik ResourceDictionary |
|
Plik zasobów .Net |
|
Plik Ruby YAML |
|
Plik napisów SubRip |
|
Plik napisów SubStation Alpha |
|
Ciągi iOS |
|
Plik Stringsdict |
|
Plik napisów MicroDVD |
|
Plik TermBase eXchange |
|
Plik TOML |
|
Plik tłumaczenia Qt Linguist (wersja 2) |
|
Plik tłumaczenia Qt Linguist (wersja 1) |
|
Zwykły plik tekstowy |
|
Plik JSON WebExtension |
|
Plik WixLocalization |
|
Plik tłumaczenia XLIFF 1.2 |
|
Plik tłumaczenia XLIFF 2.0 |
|
Excel Open XML |
|
XWiki Full Page |
|
XWiki Java Properties |
|
XWiki Page Properties |
|
Plik YAML |
Zmień zdarzenia do wyzwolenia¶
|
Zdarzenia treści tłumaczenia |
|
Zdarzenia wszystkich zmian |
|
Zdarzenia wybranych zmian |
Zdarzenia wybranych zmian¶
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 |
Nazwa |
Opis |
|---|---|---|---|
|
|
Zaktualizowano zasób |
Plik tłumaczenia został zsynchronizowany ze swoim repozytorium. |
|
|
Zakończono tłumaczenie |
Przekład językowy został w pełni przetłumaczony po indywidualnej edycji. Automatyczne tłumaczenie, przesyłanie i zbiorcze edycje nie generują tego zdarzenia. |
|
|
Zmieniono tłumaczenie |
Istniejące tłumaczenie zostało edytowane przez użytkownika. |
|
|
Dodano komentarz |
Dodano komentarz do ciągu. |
|
|
Dodano sugestię |
Dodano propozycję tłumaczenia. |
|
|
Dodano tłumaczenie |
Użytkownik przetłumaczył wcześniej nieprzetłumaczony ciąg. |
|
|
Przetłumaczono automatycznie |
Tłumaczenie zostało dodane lub zmienione przez automatyczne tłumaczenie. Komunikat ten jest wyświetlany zamiast komunikatu „Dodano tłumaczenie” lub „Zmieniono tłumaczenie”. |
|
|
Zaakceptowano sugestię |
Sugestia tłumaczenia została przyjęta jako tłumaczenie. |
|
|
Przywrócono tłumaczenie |
Tłumaczenie zostało przywrócone do poprzedniej wartości. |
|
|
Wysłano tłumaczenie |
Tłumaczenie zostało dodane lub zmienione poprzez przesłanie pliku tłumaczenia. Komunikat ten jest wyświetlany zamiast komunikatu „Dodano tłumaczenie” lub „Zmieniono tłumaczenie”. |
|
|
Dodano ciąg źródłowy |
Dodano ciąg źródłowy poza repozytorium lub przesłano aktualizacje. |
|
|
Zablokowano komponent |
Komponent został zablokowany do tłumaczenia. |
|
|
Odblokowano komponent |
Komponent został odblokowany do tłumaczenia. |
|
|
Scommitowano zmiany |
Zatwierdzono oczekujące zmiany komponentów. |
|
|
Wypchnięto zmiany |
Zmiany w repozytorium zostały przesłane do repozytorium głównego. |
|
|
Zresetowano repozytorium |
Repozytorium zostało przywrócone do stanu pierwotnego. |
|
|
Scalono repozytorium |
Zmiany w repozytorium źródłowym zostały scalone. |
|
|
Wykonano rebase repozytorium |
Zmiany w repozytorium zostały przesłane do repozytorium źródłowego. |
|
|
Nie udało się scalić repozytorium |
Scalenie zmian w repozytorium źródłowym nie powiodło się. |
|
|
Nie udało się wykonać rebase repozytorium |
Wykonanie rebase repozytorium nie powiodło się. |
|
|
Nie udało się przetworzyć |
Weblate nie mógł przeanalizować pliku tłumaczenia. |
|
|
Usunięto tłumaczenie |
Przekład językowy został usunięty. |
|
|
Usunięto sugestię |
Usunięto sugestię tłumaczenia. |
|
|
Zastąpiono tłumaczenie |
Tłumaczenie zostało zmienione przez operację wyszukiwania i zamiany. Wyświetlany jest komunikat „Tłumaczenie zostało zmienione”. |
|
|
Nie udało się wypchnąć repozytorium |
Nie udało się przesłać zmian do repozytorium. |
|
|
Usunięto sugestię podczas czyszczenia |
Podczas czyszczenia usunięto nieaktualną sugestię tłumaczenia. |
|
|
Zmieniono ciąg źródłowy |
Ciąg źródłowy został edytowany w Weblate. |
|
|
Dodano ciąg |
Dodano nowy ciąg w Weblate. |
|
|
Zmieniono zbiorczy status |
Stan tłumaczenia jednego lub większej liczby ciągów został zmieniony hurtowo.. |
|
|
Zmieniono widoczność |
Zmieniono widoczność projektu lub komponentu. |
|
|
Dodano użytkownika |
Użytkownikowi przyznano dostęp. |
|
|
Usunięto użytkownika |
Dostęp użytkownika został usunięty. |
|
|
Tłumaczenie zatwierdzone |
Tłumaczenie zostało zatwierdzone podczas przeglądu. |
|
|
Oznaczono do edycji |
Tłumaczenie zostało oznaczone jako wymagające edycji. |
|
|
Usunięto komponent |
Usunięto komponent tłumaczenia. |
|
|
Usunięto projekt |
Projekt tłumaczenia został usunięty. |
|
|
Zmieniono nazwę projektu |
Zmieniono nazwę projektu tłumaczenia. |
|
|
Zmieniono nazwę komponentu |
Zmieniono nazwę komponentu tłumaczenia. |
|
|
Przeniesiono komponent |
Komponent został przeniesiony w ramach projektu. |
|
|
Dołączył współtwórca |
Użytkownik po raz pierwszy przyczynił się do tłumaczenia. |
|
|
Opublikowano ogłoszenie |
Opublikowano ogłoszenie. |
|
|
Wyzwolono alert |
Został wyzwolony alert komponentu. |
|
|
Dodano język |
Dodano przekład językowy. |
|
|
Zażądano języka |
Użytkownik poprosił o nowy język. |
|
|
Utworzono projekt |
Utworzono projekt tłumaczenia. |
|
|
Utworzono komponent |
Utworzono komponent tłumaczenia. |
|
|
Zaproszono użytkownika |
Użytkownik został zaproszony do projektu. |
|
|
Otrzymano powiadomienie o repozytorium |
Weblate otrzymał powiadomienie o repozytorium od hosta kodu. |
|
|
Zastąpiono tłumaczenie przesłanym plikiem |
Plik tłumaczenia został zastąpiony przesłanym plikiem. |
|
|
Zmieniono licencję |
Zmieniono informacje o licencji projektu lub komponentu. |
|
|
Zmieniono umowę licencyjną dla współtwórców |
Zmieniono umowę licencyjną współautora. |
|
|
Dodano zrzutu ekranu |
Zrzut ekranu był powiązany z ciągiem. |
|
|
Przesłano zrzut ekranu |
Został przesłany zrzut ekranu. |
|
|
Zaktualizowano ciąg w repozytorium |
Podczas synchronizacji z repozytorium zmieniono ciąg. |
|
|
Zainstalowano dodatek |
Dodatek został zainstalowany. |
|
|
Zmieniono konfigurację dodatku |
Zmieniono konfigurację dodatku. |
|
|
Odinstalowano dodatek |
Dodatek został odinstalowany. |
|
|
Usunięto ciąg |
Usunięto ciąg z tłumaczenia. |
|
|
Usunięto komentarz |
Usunięto komentarz do ciągu. |
|
|
Rozwiązano komentarz |
Komentarz do ciągu został oznaczony jako rozwiązany. |
|
|
Zaktualizowane wyjaśnienie |
Zaktualizowano wyjaśnienie ciągu źródłowego. |
|
|
Usunięto kategorię |
Usunięto kategorię komponentów. |
|
|
Zmieniono nazwę kategorii |
Zmieniono nazwę kategorii komponentów. |
|
|
Przeniesiono kategorię |
Przeniesiono kategorię komponentów. |
|
|
Zapisywanie ciągu nie powiodło się |
Weblate nie mógł zapisać zmienionego ciągu. |
|
|
Dodano ciąg w repozytorium |
Znaleziono nowy ciąg podczas synchronizacji z repozytorium. |
|
|
Zaktualizowano ciąg w przesłanym pliku |
Podczas przetwarzania przesłanego pliku nastąpiła zmiana ciągu. |
|
|
Dodano ciąg w przesłanym pliku |
Podczas przetwarzania przesłanego pliku znaleziono nowy ciąg. |
|
|
Zaktualizowano tłumaczenie przez przesłanie źródło |
Tłumaczenie zostało zsynchronizowane po przesłaniu pliku źródłowego. |
|
|
Zakończono tłumaczenie komponentu |
Wszystkie przekłady językowe w komponencie zostały w pełni przetłumaczone po indywidualnej edycji. Automatyczne tłumaczenie, przesyłanie i zbiorcze edycje nie generują tego zdarzenia. |
|
|
Zastosowano wymuszone sprawdzenie |
Tłumaczenie zostało oznaczone jako wymagające edycji w wyniku wymuszonego sprawdzenia. |
|
|
Propagowana zmiana |
Edycja tłumaczenia została rozpropagowana do innego pasującego ciągu. |
|
|
Przesłano plik |
Plik został przesłany do tłumaczenia. |
|
|
Zaktualizowano dodatkowe flagi |
Zaktualizowano dodatkowe flagi ciągu źródłowego. |
|
|
Przesłano czcionkę |
Czcionka została przesłana. |
|
|
Zmieniono czcionkę |
Zmieniono przesłaną czcionkę. |
|
|
Usunięto czcionkę |
Przesłana czcionka została usunięta. |
|
|
Wymuszono synchronizację tłumaczeń |
Pliki tłumaczeń zostały przymusowo zsynchronizowane z repozytorium. |
|
|
Wymuszono ponowne skanowanie tłumaczeń |
Pliki tłumaczeń zostały ponownie przeskanowane w celu wykrycia zmian. |
|
|
Usunięto zrzut ekranu |
Zrzut ekranu został usunięty. |
|
|
Dodano etykietę |
Do ciągu dodano etykietę. |
|
|
Usunięto etykietę |
Usunięto etykietę z ciągu. |
|
|
Czyszczenie repozytorium |
Drzewo robocze repozytorium zostało uporządkowane. |
|
|
Dodano ciąg źródłowy w przesłanym pliku |
Podczas przetwarzania przesłanego pliku dodano ciąg źródłowy. |
|
|
Dodano ciąg źródłowy do repozytorium |
Ciąg źródłowy został dodany podczas synchronizacji z repozytorium. |
|
|
Wykonano kopię zapasową projektu |
Utworzono kopię zapasową projektu. |
|
|
Przywrócono projekt |
Projekt został przywrócony z kopii zapasowej. |
|
|
Przywrócono komponent |
Komponent został przywrócony z kopii zapasowej. |
|
|
Przywrócono edycję użytkownika |
Wszystkie wybrane edycje użytkownika zostały cofnięte. |
|
|
Zmieniono ustawienie projektu |
Zmieniono ustawienie projektu. |
|
|
Zmieniono ustawienie komponentu |
Zmieniono ustawienie komponentu. |
|
|
Zmieniono dostęp użytkownika |
Zmieniono uprawnienia dostępu użytkownika. |
|
|
Utworzono obszar roboczy |
Utworzono obszar roboczy. |
|
|
Zmieniono ustawienie obszaru roboczego |
Zmieniono ustawienie obszaru roboczego. |
|
|
Przeniesiono projekt |
Projekt został przeniesiony do lub z obszaru roboczego. |
|
|
Zdalne repozytorium zaktualizowane |
Zakończono aktualizację zdalnego repozytorium. |
|
|
Aktualizacja zdalnego repozytorium nie powiodła się |
Aktualizacja zdalnego repozytorium nie powiodła się. |
|
|
Alert odrzucony |
Alert komponentu został odrzucony. |
|
|
Alert ponownie otwarty |
Alert komponentu został ponownie otwarty po zmianie kontekstu. |
Dostosowywanie listy dodatków¶
Listę dodatków konfiguruje się poprzez WEBLATE_ADDONS. Aby dodać kolejny dodatek, po prostu podaj w tym ustawieniu bezwzględną nazwę klasy.
Pisanie dodatku¶
Możesz także napisać własne dodatki, utworzyć podklasę weblate.addons.base.BaseAddon w celu zdefiniowania metadanych dodatku, a następnie zaimplementować wywołanie zwrotne w celu wykonania przetwarzania.
Zobacz także
Wykonywanie skryptów z dodatku¶
Dodatków można także używać do wykonywania zewnętrznych skryptów. Kiedyś było to zintegrowane z Weblate, ale teraz musisz napisać kod, aby go wykonać dodatkiem.
# 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"
Aby uzyskać instrukcje instalacji, zobacz Custom quality checks, add-ons, automatic suggestions and auto-fixes.
Skrypt jest wykonywany z bieżącym katalogiem ustawionym na katalog główny repozytorium VCS dla dowolnego komponentu.
Dodatkowo dostępne są następujące zmienne środowiskowe:
- WL_VCS¶
Używany system kontroli wersji.
- WL_REPO¶
Adres URL repozytorium nadrzędnego.
- WL_PATH¶
Ścieżka bezwzględna do repozytorium VCS.
- WL_BRANCH¶
Gałąź repozytorium skonfigurowana w bieżącym komponencie.
- WL_FILEMASK¶
Maska pliku dla bieżącego komponentu.
- WL_TEMPLATE¶
Nazwa pliku szablonu dla tłumaczeń jednojęzycznych (może być pusta).
- WL_NEW_BASE¶
Nazwa pliku użytego do tworzenia nowych tłumaczeń (może być pusta).
- WL_FILE_FORMAT¶
Format pliku używany w bieżącym komponencie.
- WL_LANGUAGE¶
Język aktualnie przetwarzanego tłumaczenia (niedostępny dla komponentów niskiego poziomu).
- 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¶
Nazwa komponentu.
- WL_PROJECT_NAME¶
Nazwa projektu.
- WL_COMPONENT_URL¶
URL komponentu.
- WL_ENGAGE_URL¶
Adres URL zaangażowania projektu.
Zobacz także
Przetwarzanie repozytorium po aktualizacji¶
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
Przetwarzanie tłumaczeń przed scommitowaniem¶
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.