Formato TermBase eXchange

Added in version 4.5.

Alterado na versão 5.12.

TBX é um formato XML para a troca de dados de terminologia.

Recursos suportados

Extensões de ficheiro

.tbx

Lingualidade ⓘ

Bilingue

Suporta plural ⓘ

No

Suporta descrições ⓘ

Yes

Suporta explicação ⓘ

Yes

Suporta contexto ⓘ

Yes

Suporta localização ⓘ

No

Suporta marcadores ⓘ

Yes

Identificador API

tbx

Suporta cadeias de carateres apenas de leitura ⓘ

No

Suporta a remoção de cadeias de careteres obsoletas ⓘ

No

Term alternatives

Each TBX concept is one string with independent lists of source and target alternatives. Weblate reads every direct <tig> in the selected languages; IDs are optional and do not pair alternatives across languages. All source alternatives can match in the glossary, and each permitted target can be copied separately. Term statuses and notes are displayed with their alternatives.

See Multivalue formats for how alternatives are handled by quality checks, automatic fixes, and machine translation.

When editing alternatives, unchanged text is matched first, including duplicate occurrences. Remaining alternatives reuse unmatched terms in their original order, retaining IDs and metadata. Renaming and deleting alternatives together can therefore associate a renamed term with the first unmatched term’s metadata. New alternatives are created without IDs. Term metadata is read-only in Weblate.

A missing target language does not remove a concept whose source exists. DNT terms can use the matching source alternative without creating a translation. Language codes still need to match the component configuration.

Explicações

O Weblate carrega e grava explicações de ficheiros TBX para serem exibidas no Glossário.

  • A explicação da tradução é armazenada como tag <note from="translator"></note>.

  • A explicação da cadeia fonte é armazenada como tag <descrip></descrip>.

  • A descrição da cadeia de carateres fonte é armazenada como etiqueta <descrip type="Usage note"></descrip>.

Concept notes are shared. Language notes are read only for the selected language, and term notes belong to their own alternative. Editing a target explanation does not overwrite notes in other languages.

TBX components offer native and generated TBX downloads. Conversion to formats that use grammatical plurals is unavailable because those formats cannot preserve independent source and target alternatives.

Generated TBX downloads preserve represented flags, explanations, alternative IDs, statuses, and note scopes. Weblate flags use the same weblate-flags attribute as native TBX storage. Native file editing also preserves unrecognized XML and unselected languages; generated exports contain the selected language pair.

Marcadores de glossário e metadados apenas de leitura

O Weblate importa termos com estatuto administrativo forbidden ou obsolete em <termNote type="administrativeStatus"> enquanto Traduções proibidas.

Termos com <descrip type="Translation needed">No</descrip> são importados enquanto cadeias de carateres apenas de leituras, veja Termos intraduzíveis.

Importar ficheiros de glossário

O TBX pode armazenar múltiplos idiomas em um ficheiro XML, mas o Weblate mapeia na mesma cada ficheiro de componente para um idioma de tradução usando a máscara de componente de ficheiro. Para um componente de glossário TBX, o idioma fonte de componente é usado para termos fonte e o idioma analisado do nome de ficheiro é usado enquanto glossário do idioma alvo.

Evite nomear um ficheiro de tradução TBX com o mesmo código de idioma que o componente de idioma fonte, porque o idioma fonte já existe no Weblate e o ficheiro pode ser detetado como um idioma duplicado.

The Add upload method preserves alternative IDs, statuses, and scoped notes when importing TBX into a TBX glossary.

Ficheiro de exemplo

Exemplo de ficheiro:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE martif PUBLIC "ISO 12200:1999A//DTD MARTIF core (DXFcdV04)//EN" "TBXcdv04.dtd">
<martif type="TBX" xml:lang="en">
    <martifHeader>
        <fileDesc>
            <sourceDesc>
                <p>Translate Toolkit</p>
            </sourceDesc>
        </fileDesc>
    </martifHeader>
    <text>
        <body>
            <termEntry>
                <langSet xml:lang="en">
                  <tig>
                    <term>address bar</term>
                  </tig>
                </langSet>
                <langSet xml:lang="cs">
                  <tig>
                    <term>adresní řádek</term>
                  </tig>
                </langSet>
            </termEntry>
            <termEntry weblate-flags="terminology">
                <langSet xml:lang="en">
                  <tig>
                    <term>administrator</term>
                  </tig>
                </langSet>
                <langSet xml:lang="cs">
                  <tig>
                    <term>správce</term>
                  </tig>
                </langSet>
            </termEntry>
            <termEntry>
                <descrip>Example source string explanation text</descrip>
                <descrip type="Usage note">Example source string description text</descrip>
                <langSet xml:lang="en">
                  <tig>
                    <term>administrate</term>
                  </tig>
                </langSet>
                <langSet xml:lang="cs">
                  <tig>
                    <term>spravovat</term>
                    <note from="translator">Example translation string explanation text</note>
                  </tig>
                </langSet>
            </termEntry>
            <termEntry>
                <descrip type="Translation needed">No</descrip> <!-- mark as untranslateable -->
                <langSet xml:lang="en">
                  <tig>
                    <term>Weblate</term>
                  </tig>
                </langSet>
            </termEntry>
            <termEntry>
                <langSet xml:lang="en">
                  <tig>
                    <term>example forbidden term</term>
                    <termNote type="administrativeStatus">forbidden</termNote>
                  </tig>
                </langSet>
                <langSet xml:lang="cs">
                  <tig>
                    <term>příklad zakázaného výrazu</term>
                  </tig>
                </langSet>
            </termEntry>
        </body>
    </text>
</martif>

Configuração do Weblate

Configuração de componente típica do Weblate

Máscara de ficheiros

tbx/*.tbx

Ficheiro de idioma base monolingue

Vazio

Modelo para novas traduções

Vazio

Formato de ficheiro

Ficheiro TermBase eXchange