Shtesa
Të reja në versionin 2.19.
Add-ons provide ways to customize and automate the translation workflow. Admins can add and manage add-ons from the Manage ↓ Add-ons menu of each respective translation component.
Ndihmëz
You can also configure add-ons using API,
DEFAULT_ADDONS
, or install_addon
.

Built-in add-ons
Përkthim i automatizuar
Të reja në versionin 3.9.
- Add-on ID
weblate.autotranslate.autotranslate
- Formësim
mode
Mënyrë përkthim i automatizuar
Available choices:
suggest
– Add as suggestiontranslate
– Add as translationfuzzy
– Add as «Needing edit»filter_type
Filtër kërkimi
Ju lutemi, kini parasysh se përkthimi i krejt vargjeve do të hedhë tej krejt përkthimet ekzistuese.
Available choices:
all
– All stringsnottranslated
– Untranslated stringstodo
– Unfinished stringsfuzzy
– Strings marked for editcheck:inconsistent
– Failing check: Inconsistentauto_source
Source of automated translations
Available choices:
others
– Other translation componentsmt
– Machine translationcomponent
Përbërës
Enter slug of a component to use as source, keep blank to use all components in the current project.
engines
Motorë përkthimi nga makina
threshold
Prag vlerësimi
- Triggers
component update, daily
Përkthen automatikisht vargje duke përdorur përkthim nga makina ose nga përbërës të tjerë.
It is triggered:
When new strings appear in a component.
Once in a month for every component, this can be configured using
BACKGROUND_TASKS
.
CDN përkthimesh JavaScript
Të reja në versionin 4.2.
- Add-on ID
weblate.cdn.cdnjs
- Formësim
threshold
Prag përkthimi
Prag për përfshirje përkthimesh.
css_selector
Përzgjedhës CSS
Përzgjedhës CSS për të pikasur elementë të përkthyeshëm.
cookie_name
Emër për cookie-n e gjuhës
Emër për cookie-n e cila depoziton parapëlqim gjuhe.
files
Përfto vargje prej kartelash HTML
Listë e emrave të kartelave në depon e tanishme ose URL-ra të largëta që duhen kontrolluar për vargje të përkthyeshëm.
- Triggers
daily, repository post-commit, repository post-update
Boton përkthime te një rrjet shpërndarjeje lënde për përdorim në përkthime JavaScript-i ose HTML-je.
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.
Hiqni vargje të zbrazët
Të reja në versionin 4.4.
- Add-on ID
weblate.cleanup.blank
- Formësim
This add-on has no configuration.
- Triggers
repository post-commit, repository post-update
Heq nga kartelat e përkthimit vargje pa përkthim.
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).
Spastro kartela përkthimi
- Add-on ID
weblate.cleanup.generic
- Formësim
This add-on has no configuration.
- Triggers
repository pre-commit, repository post-update
Përditësoni krejt kartelat e përkthimit që të përputhen me kartelën bazë njëgjuhëshe. Për shumicën e formateve të kartelave, kjo do të thotë heqje zërash të ndenjur përkthimi, që s’janë më të pranishëm te kartela bazë.
Shtoni gjuhë që mungojnë
- Add-on ID
weblate.consistency.languages
- Formësim
This add-on has no configuration.
- Triggers
daily, repository post-add
Siguron përdorimin e një grupi të qëndrueshëm gjuhë për krejt përbërësit brenda një projekti.
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.
Ndihmëz
Auto-translate the newly added strings with Përkthim i automatizuar.
Pikasje përbërësish
- Add-on ID
weblate.discovery.discovery
- Formësim
match
Shprehje e rregullt kundrejt të cilës duhen kërkuar përputhje te kartela përkthimi
file_format
Format kartelash
name_template
Përshtatni emrin e përbërësit
base_file_template
Përcaktoni emër kartele bazë njëgjuhëse
Për kartela përkthimi dygjuhëshe, lëreni të zbrazët.
new_base_template
Përcaktoni kartelën bazë për përkthime të reja
Emër kartele i kartelës së përdorur për krijim përkthimesh të reja. Për gettext zgjidhni kartelë .pot.
intermediate_template
Kartelë gjuhe ndërmjetëse
Emër kartele për kartelë ndërmjetëse përkthimi. Në më të shumtën e rasteve kjo është kartela përkthim e furnizuar nga zhvilluesit dhe përdoret gjatë krijimit të vargjeve faktike burim.
language_regex
Filtër gjuhësh
Shprehje e rregullt kundrejt së cilës të filtrohen kartela përkthimi, kur skanohet për maskë kartelash.
copy_addons
Klono shtesa prej përbërësit kryesor te të reja të sapokrijuara
remove
Hiq përbërës për kartela që s’ekzistojnë
confirm
Ripohoj se përputhjet më sipër duken të sakta
- Triggers
repository post-update
Shton ose heq automatikisht përbërës projekti, bazuar te ndryshime kartelash nën sistem kontrolli versionesh.
Triggered each time the VCS is updated, and otherwise similar to
the import_project
management command. This way you can track
multiple translation components within one VCS.
The matching is done using regular expressions enabling complex configuration, but some knowledge is required to do so. Some examples for common use cases can be found in the add-on help section.
Once you hit Save, a preview of matching components will be presented, from where you can check whether the configuration actually matches your needs:

Ndihmëz
Component discovery add-on uses URL të brendshme 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 Depo kodi burim field (in Manage ↓ Settings ↓
Version control system) of each respective component.
This saves time with configuration and system resources too.
Shihni edhe
Përpunim në masë
Të reja në versionin 3.11.
- Add-on ID
weblate.flags.bulk
- Formësim
q
Kërkesë
state
Gjendje për t’u caktuar
Available choices:
-1
– Do not change10
– Needs editing20
– Translated30
– Approvedadd_flags
Flamurka përkthimi për shtim
remove_flags
Flamurka përkthimi për heqje
add_labels
Etiketa për shtim
remove_labels
Etiketa për heqje
- Triggers
component update
Përpunim në masë vargjesh shenjash, etiketash ose gjendjesh.
Automate labeling by starting out with the search query NOT has:label
and add labels till all strings have all required labels.
Other automated operations for Weblate metadata can also be done.
Shembuj:
Search query |
|
---|---|
Etiketa për shtim |
recent |
Search query |
|
---|---|
Flamurka përkthimi për shtim |
|
Shihni edhe
Përpunim në masë, Customizing behavior using flags, Etiketa vargjesh
Vëru shenjë përkthimeve të pandryshuara si “Lyp përditësim”
Të reja në versionin 3.1.
- Add-on ID
weblate.flags.same_edit
- Formësim
This add-on has no configuration.
- Triggers
unit post-create
Kurdo që importohet një varg i ri i përkthyeshëm nga VCS-ja dhe përputhet me vargun burim, në Weblate i vihet shenjë si një që ka nevojë të përpunohet. Kjo është veçanërisht e dobishme për formate kartelash që përfshijnë vargje burim për vargjet e papërkthyer.
Ndihmëz
You might also want to tighthen the Përkthim i pandryshuar check by adding
strict-same
flag to Flamurka përkthimi.
Shihni edhe
Vëru shenjë vargjeve të reja burim si “Lyp përditësim”
- Add-on ID
weblate.flags.source_edit
- Formësim
This add-on has no configuration.
- Triggers
unit post-create
Kurdo që importohet një varg i ri burim nga VCS-ja, në Weblate i vihet shenjë si “Lyp përpunim”. Në këtë mënyrë mund të filtroni lehtësisht dhe përpunoni vargje burim shkruar nga zhvilluesit.
Shihni edhe
Vëru shenjë përkthimeve të reja si “Lyp përditësim”
- Add-on ID
weblate.flags.target_edit
- Formësim
This add-on has no configuration.
- Triggers
unit post-create
Kurdo që importohet një varg i ri i përkthyeshëm nga VCS-ja, në Weblate i vihet shenjë si “Lyp përpunim”. Në këtë mënyrë mund të filtroni lehtësisht dhe përpunoni vargje të përkthyeshëm krijuar nga zhvilluesit.
Shihni edhe
Prodhues statistikash
- Add-on ID
weblate.generate.generate
- Formësim
filename
Emër i kartelës së prodhuar
template
Lëndë e kartelës së prodhuar
- Triggers
repository pre-commit
Prodhon një kartelë që përmban të dhëna të hollësishme rreth gjendjes së përkthimit.
You can use a Django template in both filename and content, see Template markup for a detailed markup description.
For example generating a summary file for each translation:
- Emër i kartelës së prodhuar
locale/{{ language_code }}.json
- Lëndë
{ "language": "{{ language_code }}", "strings": "{{ stats.all }}", "translated": "{{ stats.translated }}", "last_changed": "{{ stats.last_changed }}", "last_author": "{{ stats.last_author }}", }
Shihni edhe
Plotëso paraprakisht përkthimin me burimin
Të reja në versionin 4.11.
- Add-on ID
weblate.generate.prefill
- Formësim
This add-on has no configuration.
- Triggers
component update, daily
Mbush vargjet e përkthimit me vargun burim.
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.
Prodhim pseudovendoreje
Të reja në versionin 4.5.
- Add-on ID
weblate.generate.pseudolocale
- Formësim
source
Vargjet e burimit
target
Përkthimi i synuar
Krejt vargjet në këtë përkthim do të mbishkruhen
prefix
Parashtesë vargjesh e fiksuar
var_prefix
Parashtesë vargjesh e ndryshueshme
suffix
Prapashtesë vargjesh e fiksuar
var_suffix
Prapashtesë vargjesh e ndryshueshme
var_multiplier
Shumëfish i pjesës së ndryshores
Sa herë të përsëritet pjesa e ndryshores, në varësi të gjatësisë së vargut burim.
- Triggers
component update, daily
Prodhon një përkthim duke shtuar automatikisht parashtesë dhe prapashtesë te vargjet burim.
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 parts are repeated by length of the
text multiplied by the multiplier. For example Hello world
with variable
suffix _
and variable multiplier of 1 becomes Hello world___________
-
the suffix is repeated once for each character in the source string.
Vargjet do të prodhohen duke përkthyer rregullsinë vijuese:
Fixed string prefix Variable string prefix Source string Variable string suffix Fixed string suffix
Ndihmëz
You can use real languages for testing, but there are dedicated pseudolocales available in Weblate - en_XA and ar_XB.
Ndihmëz
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.
Kontribues në koment
- Add-on ID
weblate.gettext.authors
- Formësim
This add-on has no configuration.
- Triggers
repository pre-commit
Përditëson pjesën e komentit te kryet e kartelës PO, për të përfshirë emrat e kontribuesve dhe vite kontributi.
The PO file header will look like this:
# Michal Čihař <michal@cihar.com>, 2012, 2018, 2019, 2020.
# Pavel Borecki <pavel@example.com>, 2018, 2019.
# Filip Hron <filip@example.com>, 2018, 2019.
# anonymous <noreply@weblate.org>, 2019.
Përditësoni ndryshoren ALL_LINGUAS te kartela «configure»
- Add-on ID
weblate.gettext.configure
- Formësim
This add-on has no configuration.
- Triggers
repository post-add, daily
Updates the ALL_LINGUAS variable in configure
, configure.in
or any
configure.ac
files, when a new translation is added.
Përshtatni përfundimin e gettext-it
- Add-on ID
weblate.gettext.customize
- Formësim
width
Mbështjellje rreshtash të gjatë
Si parazgjedhje, gettext-i i mbështjell rreshtat kur mbërrihet në 77 shenja dhe rreshta të rinj. Me parametrin
--no-wrap
, mbështjellja kryhet vetëm në rreshta të rinj.Available choices:
77
– Wrap lines at 77 characters and at newlines65535
– Only wrap lines at newlines-1
– No line wrapping- Triggers
storage post-load
Lejon përshtatje të llojit të përfundimeve nga gettext-i, për shembull, mbështjellje rreshtash.
Ofron mundësitë vijuese:
Mbështill rreshtat pas 77 shenjash dhe në rreshta të rinj
Mbështill rreshtat vetëm në rreshta të rinj
Pa mbështjellje rreshtash
Shënim
By default gettext wraps lines at 77 characters and at newlines.
With the --no-wrap
parameter, wrapping is only done at newlines.
Përditëso kartelën LINGUAS
- Add-on ID
weblate.gettext.linguas
- Formësim
This add-on has no configuration.
- Triggers
repository post-add, daily
Përditëson kartelën LINGUAS kur shtohet një përkthim i ri.
Prodho kartela MO
- Add-on ID
weblate.gettext.mo
- Formësim
path
Shteg për te kartela MO e prodhuar
Nëse s’është përcaktuar, do të përdoret vendndodhja e kartelës PO.
- Triggers
repository pre-commit
Prodhon automatikisht një kartelë MO për çdo kartelë PO të ndryshuar.
The location of the generated MO file can be customized and the field for it uses Template markup.
Përditësoni kartela PO, që të përputhen me POT (msgmerge)
- Add-on ID
weblate.gettext.msgmerge
- Formësim
previous
Mbaji msgid-e të mëparshëm të vargjeve të përkthyer
no_location
Hiq vendndodhje vargjesh të përkthyer
fuzzy
Përdor përputhje të turbullt
- Triggers
repository post-update
Updates all PO files (as configured by Maskë kartele) to match the POT file (as configured by Gjedhe për përkthime të reja) using msgmerge.
Triggered whenever new changes are pulled from the upstream repository. Most msgmerge command-line options can be set up through the add-on configuration.
Kryej «squash» për depozitime Git
- Add-on ID
weblate.git.squash
- Formësim
squash
Commit squashing
Available choices:
all
– All commits into onelanguage
– Per languagefile
– Per fileauthor
– Per authorappend_trailers
Append trailers to squashed commit message
Rreshtat mbyllës janë rreshta që duken të ngjashëm me krye RFC 822 email-esh, në fund të pjesës që ndryshe do të ishte në formë të lirë, te një mesazh depozitimi, bie fjala, “Me bashkëautorësinë e: …”.
commit_message
Mesazh depozitimi
This commit message will be used instead of the combined commit messages from the squashed commits.
- Triggers
repository post-commit
Kryej «squash» për depozitime Git, përpara kryerjes së push-it për ndryshimet.
Git commits can be squashed prior to pushing changes in one of the following modes:
Krejt depozitimet në një të tilli
Për gjuhë
Për kartelë
Për autor
Mesazhet origjinale të depozitimeve mbahen, por autorësia humb, veç në qoftë përzgjedhur Për autor, ose mesazhi i depozitimit është përshtatur për ta përmbajtur atë.
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.
Përshtatni përfundim JSON-i
- Add-on ID
weblate.json.customize
- Formësim
sort_keys
Rendit kyçe JSON
indent
Hapësirë kryeradhe JSON
style
Stil hapësirash kryeradhe JSON
Available choices:
spaces
– Spacestabs
– Tabs- Triggers
storage post-load
Lejon përshtatje të sjelljes së JSON-it për përfundimet, për shembull, lidhur me shmangie kryeradhe ose renditje.
Format the Java properties file
- Add-on ID
weblate.properties.sort
- Formësim
This add-on has no configuration.
- Triggers
repository pre-commit
Formats and sorts the Java properties file.
Consolidates newlines to Unix ones.
Uppercase formatting of Unicode escape sequences (in case they are present).
Strips blank lines and comments.
Sorts the strings by the keys.
Drops duplicate strings.
Heqje komentesh të vjetruar
Të reja në versionin 3.7.
- Add-on ID
weblate.removal.comments
- Formësim
age
Ditë për t’u mbajtur
- Triggers
daily
Caktoni kohë për heqje komentesh.
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.
Heqje sugjerimesh të vjetruar
Të reja në versionin 3.7.
- Add-on ID
weblate.removal.suggestions
- Formësim
age
Ditë për t’u mbajtur
votes
Prag votimi
Prag për heqje. Kjo fushë s’do të ketë efekt kur votimi është i çaktivizuar.
- Triggers
daily
Caktoni kohë për heqje sugjerimesh.
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.
Përditësoni kartela RESX
Të reja në versionin 3.9.
- Add-on ID
weblate.resx.update
- Formësim
This add-on has no configuration.
- Triggers
repository post-update
Përditëso krejt kartelat e përkthimit për t’i përputhur me kartelën bazë njëgjuhëshe të upstream-it. Kartelat e papërdorura hiqen, dhe të rejat shtohen si kopje të vargjeve burim.
Ndihmëz
Use Spastro kartela përkthimi if you only want to remove stale translation keys.
Përshtatni përfundim YAML
Të reja në versionin 3.10.2.
- Add-on ID
weblate.yaml.customize
- Formësim
indent
Hapësirë kryeradhe YAML
width
Mbështjellje rreshtash të gjatë
Available choices:
80
– Wrap lines at 80 chars100
– Wrap lines at 100 chars120
– Wrap lines at 120 chars180
– Wrap lines at 180 chars65535
– No line wrappingline_break
Ndërprerje rreshtash
Available choices:
dos
– DOS (\r\n)unix
– UNIX (\n)mac
– MAC (\r)- Triggers
storage post-load
Lejon përshtatje të sjelljes së YAML-it për përfundimet, për shembull, lidhur me gjatësi rreshti ose rreshta të rinj.
Customizing list of add-ons
The list of add-ons is configured by WEBLATE_ADDONS
.
To add another add-on, simply include the absolute class name in this setting.
Writing add-on
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.
Shihni edhe
Executing scripts from add-on
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 © 2012–2022 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
"""Example pre commit script."""
from django.utils.translation import gettext_lazy as _
from weblate.addons.events import EVENT_PRE_COMMIT
from weblate.addons.scripts import BaseScriptAddon
class ExamplePreAddon(BaseScriptAddon):
# Event used to trigger the script
events = (EVENT_PRE_COMMIT,)
# Name of the addon, has to be unique
name = "weblate.example.pre"
# Verbose name and long descrption
verbose = _("Execute script before commit")
description = _("This add-on executes a script.")
# Script to execute
script = "/bin/true"
# File to add in commit (for pre commit event)
# does not have to be set
add_file = "po/{{ language_code }}.po"
For installation instructions see Custom quality checks, add-ons and auto-fixes.
The script is executed with the current directory set to the root of the VCS repository for any given component.
Additionally, the following environment variables are available:
- WL_VCS
Sistem kontrolli versionesh i përdorur.
- WL_REPO
Upstream repository URL.
- WL_PATH
Shteg absolut për te depo VCS.
- WL_BRANCH
Të reja në versionin 2.11.
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
Të reja në versionin 2.14.
Filename of the file used for creating new translations (can be empty).
- WL_FILE_FORMAT
File format used in current component.
- 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
Të reja në versionin 3.9.
Identifikues përbërësi i përdorur për të ndërtuar URL-në.
- WL_PROJECT_SLUG
Të reja në versionin 3.9.
Identifikues projekti i përdorur për të ndërtuar URL-në.
- WL_COMPONENT_NAME
Të reja në versionin 3.9.
Emër përbërësi.
- WL_PROJECT_NAME
Të reja në versionin 3.9.
Emër projekti.
- WL_COMPONENT_URL
Të reja në versionin 3.9.
URL përbërësi.
- WL_ENGAGE_URL
Të reja në versionin 3.9.
Project engage URL.
Shihni edhe
Post-update repository processing
Can be used to update translation files when the VCS upstream source changes. To achieve this, please remember Weblate only sees files committed to the VCS, so you need to commit changes as a part of the script.
For example with Gulp you can do it using following code:
#! /bin/sh
gulp --gulpfile gulp-i18n-extract.js
git commit -m 'Update source strings' src/languages/en.lang.json
Pre-commit processing of translations
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.