<a id="glossary"></a>

# Glossari

Each project can include one or more glossaries for storing terms and their
preferred translations. Glossaries help keep translations consistent by showing
matching terms in the translation editor.

Glossaries are regular translation components with special behavior. The source
language stores the terms Weblate searches for in source strings. Each glossary
translation stores the preferred term, forbidden term, or untranslatable entry
for one target language.

Terms from the glossary containing words from the currently translated source
string are displayed in the sidebar of the translation editor.

#### HINT
Els termes del glossari no s’utilitzen en les comprovacions de qualitat tret que ho habiliteu, vegeu [No s’ajusta al glossari](https://docs.weblate.org/ca/latest/user/checks.md#check-check-glossary) per a més informació.

## How glossary matching works

When you translate a regular component, Weblate searches the source string for
terms from the source language of the project glossaries. When a term matches,
Weblate looks up the corresponding glossary entry for the language currently
being translated and shows it in the editor.

This means glossary entries need to exist in the target glossary language to be
shown while translating that target language. A source-language-only glossary
can still store definitions and context, but it will not provide target-language
matches for languages that do not have glossary entries.

If you want a term to be present in every glossary language, mark the source
entry as [Terminologia](#glossary-terminology). If the term should stay unchanged in every
language, use [Untranslatable terms](#glossary-untranslatable); combine it with terminology only
when you want Weblate to create and maintain entries for all glossary languages.

## Gestió de glossaris

#### Versionchanged
Canviat a la versió 4.5: Els glossaris són ara components de traducció habituals i podeu utilitzar-hi totes les funcions de Weblate: comentar, emmagatzemar en un repositori remot o afegir explicacions.

Use any component as a glossary by turning on [Utilitza com a glossari](https://docs.weblate.org/ca/latest/admin/projects.md#component-is-glossary).
You can create multiple glossaries for one project.

Restricted components are not used as glossaries. Their terms are not shown in
other components, included in glossary quality checks, synchronized as
terminology, or sent to translation services. Weblate displays a diagnostic
when both [Accés restringit](https://docs.weblate.org/ca/latest/admin/projects.md#component-restricted) and [Utilitza com a glossari](https://docs.weblate.org/ca/latest/admin/projects.md#component-is-glossary) are
enabled. Remove restricted access to use the glossary project-wide, or disable
Use as a glossary to keep an ordinary restricted component.

Amb el projecte es crea automàticament un glossari buit per a un projecte determinat. Els glossaris es comparteixen entre tots els components del mateix projecte i, opcionalment, amb altres projectes utilitzant [Comparteix en projectes](https://docs.weblate.org/ca/latest/admin/projects.md#component-links) del component de glossari respectiu.

El component del glossari s’assembla a qualsevol altre component de Weblate amb una etiqueta de color afegida:

![image](screenshots/glossary-component.webp)

You can browse all glossary terms:

![image](screenshots/glossary-browse.webp)

or edit them as any translations.

## Glossary terms

Els termes del glossari es tradueixen de la mateixa manera que les cadenes normals. Podeu alternar funcions addicionals utilitzant el menú Eines per a cada terme.

![image](screenshots/glossary-tools.webp)

#### SEE ALSO
[Adding new strings](https://docs.weblate.org/ca/latest/devel/translations.md#adding-strings)

#### Glossary entry types

| Tipus                                                                 | Purpose                                                                                                             |
|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Regular glossary term                                                 | Preferred translation or explanation for a term in one or more<br/>languages.                                       |
| [Terminologia](#glossary-terminology)           | Source term Weblate keeps present in every glossary language so missing<br/>translations can be tracked and filled. |
| [Untranslatable terms](#glossary-untranslatable)   | Term that should stay unchanged or should not be translated.                                                        |
| [Forbidden translations](#glossary-forbidden) | Translation that should not be used for the source term.                                                            |
| [Variants](#glossary-variants)               | Alternative wording, abbreviation, or shorter form grouped with another<br/>glossary term.                          |

<a id="glossary-choosing-terms"></a>

### Choosing glossary terms

Choose glossary terms for meaning and audience, not only for literal word
shape. If a source term is ambiguous, add an explanation so translators know
which meaning applies in the project.

Glossary entries are especially useful for brand names, acronyms, product
features, technical terms, and newly coined or transliterated words. Use
variants for abbreviations or shorter wording, mark important cross-language
terms as [Terminologia](#glossary-terminology), mark terms that should stay unchanged as
[Untranslatable terms](#glossary-untranslatable), and mark misleading translations as
[Forbidden translations](#glossary-forbidden).

<a id="glossary-untranslatable"></a>

### Untranslatable terms

#### Versionadded
Afegit a la versió 4.5.

Flagging certain glossary term translations `read-only` by bulk-editing,
typing in the flag, or by using Tools ↓
Mark this translation as untranslatable means they cannot be translated. Use this
for brand names, product names, domains, technology names, or other terms that
should not be changed in other languages. Such terms are visually highlighted
in the glossary sidebar.

To keep a term unchanged in every language, use
Mark as untranslatable for all languages. If the current translation
is already untranslatable, Make untranslatable apply to all languages
moves that flag to the source. Forbidden translations are language-specific;
terminology remains source-wide.

The `read-only` flag is enough when the glossary entry already exists in the
languages where it should be shown. Add the [Terminologia](#glossary-terminology) flag as
well only when Weblate should create and maintain the untranslatable entry in
every glossary language.

#### SEE ALSO
[Personalització del comportament mitjançant banderes](https://docs.weblate.org/ca/latest/admin/checks.md#custom-checks)

<a id="glossary-forbidden"></a>

### Forbidden translations

#### Versionadded
Afegit a la versió 4.5.

Marcar certes traduccions de termes de glossari com a `prohibidas` mitjançant l’edició massiva, escrivint el senyalador o utilitzant Eines ↓ Marca com a traducció prohibida significa que **no** s’han d’utilitzar. Utilitzeu-ho per aclarir la traducció quan algunes paraules són ambigües o poden tenir significats inesperats.

Use forbidden entries for translations that should be avoided. Use regular
glossary entries for preferred translations.

#### SEE ALSO
[Personalització del comportament mitjançant banderes](https://docs.weblate.org/ca/latest/admin/checks.md#custom-checks)

<a id="glossary-terminology"></a>

### Terminologia

#### Versionadded
Afegit a la versió 4.5.

Flagging certain source-language glossary terms as `terminology` by
bulk-editing, typing in the flag, or by using Tools ↓
Mark as terminology for all languages adds entries for them to all languages in the
glossary. Use this for important terms that should be well thought out, and
retain a consistent meaning across all languages.

Adding terminology through forms, flag edits, bulk edits, or uploaded files
requires the Add glossary terminology permission.

Enable [Gestiona les cadenes](https://docs.weblate.org/ca/latest/admin/projects.md#component-manage-units) on the glossary component to synchronize
terminology. When it is disabled, Weblate does not create missing language
entries, even for terms marked as terminology.

Weblate shows a dismissible [diagnostic](https://docs.weblate.org/ca/latest/devel/alerts.md#alerts) when string management is
disabled for a glossary with no remote repository, or for another glossary that
contains terminology. Enable string management to add terms directly in Weblate
and synchronize terminology, or dismiss the warning if you maintain the glossary
files separately.

The terminology flag is ongoing state, not just a one-time action. While the
flag remains on the source term, Weblate treats it as terminology and keeps an
entry for it in every glossary language. If a language entry is removed, the
next glossary synchronization creates it again.

L’eliminació de la marca `terminologia` atura aquest manteniment automàtic, però no elimina ni reverteix les entrades que ja es van crear. Continuen sent entrades habituals de glossari.

A regular glossary term can also have translations in every language. The
difference is that Weblate does not recreate missing language entries for a
regular term after they are removed.

#### SEE ALSO
[Personalització del comportament mitjançant banderes](https://docs.weblate.org/ca/latest/admin/checks.md#custom-checks)

<a id="glossary-variants"></a>

### Variants

Les variants són una manera genèrica d’agrupar cadenes. Totes les variants de termes s’enumeren a la barra lateral del glossari quan es tradueixen.

#### HINT
Podeu utilitzar-lo per afegir abreviatures o expressions més curtes per a un terme.

#### SEE ALSO
[Variants de corda](https://docs.weblate.org/ca/latest/devel/translations.md#variants)

## Glossary import

Similar to regular translation components, you can upload existing glossaries
to Weblate. Formats like [Fitxers CSV](https://docs.weblate.org/ca/latest/formats/csv.md) or [Format TermBase eXchange](https://docs.weblate.org/ca/latest/formats/tbx.md) are
supported and can be uploaded, see [Càrrega de traduccions](https://docs.weblate.org/ca/latest/user/files.md#upload).

TBX files can include explanations, read-only metadata, and glossary flags; see
[Format TermBase eXchange](https://docs.weblate.org/ca/latest/formats/tbx.md#tbx) for the exact metadata mapping.

Even though TBX can contain multiple languages, Weblate still maps component
files to languages using the component file mask and language settings. For a
TBX glossary component, keep the component source language as the source term
language and name translation files for the target language they represent.
Avoid naming a translation file with the same language as the component source
language, because the source language already exists in Weblate and this can
lead to duplicate language detection.

#### SEE ALSO
* [Àlies de llengua](https://docs.weblate.org/ca/latest/admin/projects.md#project-language-aliases)
* [Filtre de llengua](https://docs.weblate.org/ca/latest/admin/projects.md#component-language-regex)

<a id="glossary-language-sync"></a>

## Language files and synchronization

Glossary components follow the languages used by the regular components in the
same project. When a language is added to a regular component, Weblate adds the
missing glossary language as well so glossary matches can be shown for that
language.

This automatic language synchronization is intentional. Filtering glossary
language files with [Filtre de llengua](https://docs.weblate.org/ca/latest/admin/projects.md#component-language-regex) can reduce the number of
managed files, but it also means Weblate has no glossary entries to show for
filtered-out target languages.

Terminology entries are also synchronized. When a source glossary term is marked
as terminology, Weblate creates missing entries in all glossary languages and
recreates them if they are removed while the flag is still set.

Weblate can clean up stale glossary translations only for Weblate-managed
glossaries, only when no regular component in the project still uses that
language, and only when the stale glossary translation has no translated terms.
If the stale glossary language still contains terms, Weblate keeps it and
reports it as an unused glossary language.

## Common setup patterns

English-only explanatory glossary
: Add source-language glossary terms with explanations. This works as a
  maintained term list, but it will not show target-language glossary matches
  unless you also create entries in the target glossary languages.

Required terminology
: Add terms in the source glossary language, mark them as
  [Terminologia](#glossary-terminology), and let translators fill the created entries
  in each target language. Use explanations to document the intended meaning.

Non-translatable terms
: Mark terms as [Untranslatable terms](#glossary-untranslatable) when they should stay
  unchanged. Add [Terminologia](#glossary-terminology) only when the term should be
  present in every glossary language for matching and review.

Forbidden translations
: Add the misleading translation as a [Forbidden translations](#glossary-forbidden) entry. Add
  the preferred wording as a separate regular glossary entry when translators
  should use a specific translation instead.

<a id="glossary-mt"></a>

## Glossaries in translation services

#### Versionadded
Afegit a la versió 5.3.

Some translation services utilize glossaries during the translation,
please consult their documentation in [Serveis de traducció](https://docs.weblate.org/ca/latest/admin/machine.md) to see the support.

El glossari es processa abans d’exposar-se al servei:

* Duplicate source entries are skipped for services that require unique source
  terms. LLM-based services can receive duplicates with explanations to
  disambiguate them.
* S’eliminen els caràcters de control i els espais en blanc inicials i finals.
* [Forbidden translations](#glossary-forbidden) s’han omès.

#### NOTE
Molts serveis emmagatzemen glossaris al costat del servidor i imposen un límit al nombre de glossaris desats. Weblate sempre esborra el glossari més antic si es queda sense espai.
