Comprobaciones y correcciones

The quality checks help catch common translator errors, ensuring the translation is in good shape. The checks can be ignored in case of false positives.

Once submitting a translation with a failing check, this is immediately shown to the user:

../_images/checks.png

Correcciones automáticas

In addition to Comprobaciones de calidad, Weblate can fix some common errors in translated strings automatically. Use it with caution to not have it add errors.

Ver también

AUTOFIX_LIST

Comprobaciones de calidad

Weblate employs a wide range of quality checks on strings. The following section describes them all in further detail. There are also language specific checks. Please file a bug if anything is reported in error.

Comprobaciones de traducción

Executed upon every translation change, helping translators maintain good quality translations.

Marcación BBcode

BBcode in translation does not match source

BBCode represents simple markup, like for example highlighting important parts of a message in bold font, or italics.

This check ensures they are also found in translation.

Nota

El método de detección de BBcode actualmente es bastante sencillo, por lo que es posible que esta comprobación emita falsos positivos.

Palabras consecutivas duplicadas

Text contains the same word twice in a row:

Nuevo en la versión 4.1.

Comprueba que no haya palabras consecutivas duplicadas en una traducción. Esto a menudo señala un error en la traducción.

Consejo

Esta comprobación incluye algunas reglas lingüísticas para evitar falsos positivos. Si encuentra uno, háganoslo saber. Vea Informar de problemas en Weblate.

No se ajusta al glosario

Nuevo en la versión 4.5.

La traducción no sigue los términos definidos en un glosario.

Esta comprobación se debe activar mediante el indicador check-glossary (vea Personalizar el comportamiento mediante indicadores). Considere lo siguiente antes de activarla:

  • It does exact string matching, the glossary is expected to contain terms in all variants.

  • Checking each string against glossary is expensive, it will slow down any operation in Weblate which involves running checks like importing strings or translating.

Espacio duplicado

Translation contains double space

Checks that double space is present in translation to avoid false positives on other space-related checks.

La comprobación se anula cuando se encuentran espacios duplicados en la cadena de origen, lo que indica que son intencionales.

Cadenas formateadas

Comprueba que el formato en las cadenas esté reproducido tal cual tanto en el origen como en la traducción. Omitir el formato en las traducciones por lo general provoca problemas graves; por esta razón el formato de las cadenas casi siempre debe coincidir con el origen.

Weblate supports checking format strings in several languages. The check is not enabled automatically, only if a string is flagged appropriately (e.g. c-format for C format). Gettext adds this automatically, but you will probably have to add it manually for other file formats or if your PO files are not generated by xgettext.

This can be done per unit (see Información adicional sobre las cadenas de origen) or in Configuración de componentes. Having it defined per component is simpler, but can lead to false positives in case the string is not interpreted as a formatting string, but format string syntax happens to be used.

Consejo

In case specific format check is not available in Weblate, you can use generic Sustitutorios.

Besides checking, this will also highlight the formatting strings to easily insert them into translated strings:

../_images/format-highlight.png

Cadena de interpolación de AngularJS

AngularJS interpolation strings do not match source

Named format string

Su saldo es de {{amount}} {{ currency }}

Indicador que activar

angularjs-format

Formato C

C format string does not match source

Simple format string

Hay %d manzanas

Position format string

Su saldo es de %1$d %2$s

Indicador que activar

c-format

Formato C#

C# format string does not match source

Position format string

Hay {0} manzanas

Indicador que activar

c-sharp-format

Ver también

C# String Format

Literales de plantilla ECMAScript

ECMAScript template literals do not match source

Interpolación

Hay ${number} manzanas

Indicador que activar

es-format

Ver también

Template literals

Interpolación con i18next

The i18next interpolation does not match source

Nuevo en la versión 4.0.

Interpolación

There are {{number}} apples

Nesting

There are $t(number) apples

Indicador que activar

i18next-interpolation

Ver también

i18next interpolation

Formato Java

Java format string does not match source

Simple format string

Hay %d manzanas

Position format string

Su saldo es de %1$d %2$s

Indicador que activar

java-format

Ver también

Java Format Strings

MessageFormat de Java

Java MessageFormat string does not match source

Position format string

Hay {0} manzanas

Indicador que activar

java-messageformat enables the check unconditionally

auto-java-messageformat enables check only if there is a format string in the source

Ver también

Java MessageFormat

Formato JavaScript

JavaScript format string does not match source

Simple format string

Hay %d manzanas

Indicador que activar

javascript-format

Formato Lua

Lua format string does not match source

Simple format string

Hay %d manzanas

Indicador que activar

lua-format

Ver también

Lua formatting strings

Sustitutorios con signo de porcentaje

The percent placeholders do not match source

Nuevo en la versión 4.0.

Simple format string

There are %number% apples

Indicador que activar

percent-placeholders

Formato Perl

Perl format string does not match source

Simple format string

Hay %d manzanas

Position format string

Su saldo es de %1$d %2$s

Indicador que activar

perl-format

Formato PHP

PHP format string does not match source

Simple format string

Hay %d manzanas

Position format string

Su saldo es de %1$d %2$s

Indicador que activar

php-format

Formato de llaves de Python

Python brace format string does not match source

Simple format string

There are {} apples

Named format string

Your balance is {amount} {currency}

Indicador que activar

python-brace-format

Formato Python

Python format string does not match source

Simple format string

Hay %d manzanas

Named format string

Your balance is %(amount) %(currency)

Indicador que activar

python-format

Formato Qt

Qt format string does not match source

Position format string

There are %1 apples

Indicador que activar

qt-format

Ver también

Qt QString::arg()

Formato de plurales de Qt

Qt plural format string does not match source

Plural format string

There are %Ln apple(s)

Indicador que activar

qt-plural-format

Ver también

Qt i18n guide

Formato Ruby

Ruby format string does not match source

Simple format string

Hay %d manzanas

Position format string

Your balance is %1$f %2$s

Named format string

Your balance is %+.2<amount>f %<currency>s

Named template string

Your balance is %{amount} %{currency}

Indicador que activar

ruby-format

Ver también

Ruby Kernel#sprintf

Formato Scheme

Scheme format string does not match source

Simple format string

Hay ~d manzanas

Indicador que activar

scheme-format

Formato de Vue I18n

The Vue I18n formatting does not match source

Named formatting

There are {count} apples

Rails i18n formatting

There are %{count} apples

Linked locale messages

@:message.dio @:message.the_world!

Indicador que activar

vue-format

Se había traducido

This string has been translated in the past

Means a string has been translated already. This can happen when the translations have been reverted in VCS or lost otherwise.

Incoherente

Esta cadena tiene más de una traducción en este proyecto o no se ha traducido en algunos componentes.

Weblate comprueba las traducciones de la misma cadena en todas sus ocurrencias dentro de un proyecto para ayudarle a mantener la coherencia.

The check fails on differing translations of one string within a project. This can also lead to inconsistencies in displayed checks. You can find other translations of this string on the Other occurrences tab.

Nota

This check also fires in case the string is translated in one component and not in another. It can be used as a quick way to manually handle strings which are not translated in some components just by clicking on the Use this translation button displayed on each line in the Other occurrences tab.

You can use Traducción automática addon to automate translating of newly added strings which are already translated in another component.

Kashida utilizado

The decorative kashida letters should not be used

Nuevo en la versión 3.5.

The decorative Kashida letters should not be used in translation. These are also known as Tatweel.

Ver también

Kashida on Wikipedia

Referencias de Markdown

Markdown link references do not match source

Nuevo en la versión 3.5.

Markdown link references do not match source.

Ver también

Markdown links

Sintaxis de Markdown

Markdown syntax does not match source

Nuevo en la versión 3.5.

La sintaxis de Markdown no coincide con la de origen

Ver también

Markdown span elements

Longitud máxima de la traducción

Translation should not exceed given length

Checks that translations are of acceptable length to fit available space. This only checks for the length of translation characters.

Unlike the other checks, the flag should be set as a key:value pair like max-length:100.

Consejo

This check looks at number of chars, what might not be the best metric when using proportional fonts to render the text. The Tamaño máximo de la traducción check does check actual rendering of the text.

The replacements: flag might be also useful to expand placeables before checking the string.

Tamaño máximo de la traducción

Translation rendered text should not exceed given size

Nuevo en la versión 3.7.

Translation rendered text should not exceed given size. It renders the text with line wrapping and checks if it fits into given boundaries.

This check needs one or two parameters - maximal width and maximal number of lines. In case the number of lines is not provided, one line text is considered.

You can also configure used font by font-* directives (see Personalizar el comportamiento mediante indicadores), for example following translation flags say that the text rendered with ubuntu font size 22 should fit into two lines and 500 pixels:

max-size:500:2, font-family:ubuntu, font-size:22

Consejo

You might want to set font-* directives in Configuración de componentes to have the same font configured for all strings within a component. You can override those values per string in case you need to customize it per string.

The replacements: flag might be also useful to expand placeables before checking the string.

\n desiguales

Number of \n in translation does not match source

Por lo general, los saltos de renglón codificados con escape son importantes para dar formato a la salida de un programa. La comprobación emite un error si la cantidad de literales \n en la traducción difiere de la cantidad en la cadena de origen.

Dos puntos desiguales

Source and translation do not both end with a colon

Checks that colons are replicated between both source and translation. The presence of colons is also checked for various languages where they do not belong (Chinese or Japanese).

Ver también

Colon on Wikipedia

Puntos suspensivos desiguales

Source and translation do not both end with an ellipsis

Comprueba que tanto la cadena de origen como la traducción terminen con puntos suspensivos. Observe que se comprueba solo el carácter real de puntos suspensivos (), no una secuencia de tres puntos (...).

El carácter real de puntos suspensivos a menudo tiene un mejor espaciado al imprimirlo y suena mejor cuando el texto se procesa en un conversor de texto a voz.

Ver también

Ellipsis on Wikipedia

Signo de exclamación desigual

Source and translation do not both end with an exclamation mark

Checks that exclamations are replicated between both source and translation. The presence of exclamation marks is also checked for various languages where they do not belong (Chinese, Japanese, Korean, Armenian, Limbu, Myanmar or Nko).

Punto final desigual

Source and translation do not both end with a full stop

Checks that full stops are replicated between both source and translation. The presence of full stops is checked for various languages where they do not belong (Chinese, Japanese, Devanagari or Urdu).

Ver también

Full stop on Wikipedia

Signo de interrogación desigual

Source and translation do not both end with a question mark

Comprueba que tanto la cadena de origen como la traducción tengan signos de interrogación. La presencia de estos signos también se comprueba en varios idiomas que no los utilizan (armenio, árabe, chino, coreano, japonés, etíope, vai y copto).

Punto y coma desigual

Source and translation do not both end with a semicolon

Comprueba que los punto y coma al final de las oraciones de la cadena de origen y de la traducción sean una réplica mutua. Esto puede resultar útil para garantizar un buen formato de cadenas tales como las de los archivos .desktop.

Ver también

Semicolon on Wikipedia

Saltos de renglón desiguales

Number of new lines in translation does not match source

Por lo general, los saltos de renglón son importantes para dar formato a la salida de un programa. La comprobación emite un error si la cantidad de literales \n en la traducción difiere de la cantidad en la cadena de origen.

Faltan plurales

Some plural forms are not translated

Checks that all plural forms of a source string have been translated. Specifics on how each plural form is used can be found in the string definition.

Failing to fill in plural forms will in some cases lead to displaying nothing when the plural form is in use.

Sustitutorios

Translation is missing some placeholders:

Nuevo en la versión 3.9.

Distinto en la versión 4.3: Puede utilizar expresiones regulares como sustitutorio.

Translation is missing some placeholders. These are either extracted from the translation file or defined manually using placeholders flag, more can be separated with colon, strings with space can be quoted:

placeholders:$URL$:$TARGET$:"some long text"

In case you have some syntax for placeholders, you can use a regular expression:

placeholders:r"%[^% ]%"

Espaciado de puntuación

Missing non breakable space before double punctuation sign

Nuevo en la versión 3.9.

Comprueba que haya un espacio indivisible delante de un signo de puntuación de componente doble (a saber: signo de exclamación, signo de interrogación, punto y coma y dos puntos). Esta regla se utiliza solamente en algunos idiomas, como el francés y el bretón, en los que la presencia de este espacio es una norma de microtipografía.

Expresión regular

Translation does not match regular expression:

Nuevo en la versión 3.9.

Translation does not match regular expression. The expression is either extracted from the translation file or defined manually using regex flag:

regex:^foo|bar$

Mismos plurales

Some plural forms are translated in the same way

Esta comprobación emite un error si se han duplicado algunas formas de plural. En la mayoría de los idiomas deben ser diferentes.

Salto de renglón al inicio

Source and translation do not both start with a newline

Newlines usually appear in source strings for good reason, omissions or additions can lead to formatting problems when the translated text is put to use.

Espacios iniciales

Source and translation do not both start with same number of spaces

Normalmente, si hay un espacio al inicio de una cadena es para crear sangrías en la interfaz; por esta razón es importante preservarlos.

Salto de renglón al final

Source and translation do not both end with a newline

Newlines usually appear in source strings for good reason, omissions or additions can lead to formatting problems when the translated text is put to use.

Espacio al final

Source and translation do not both end with a space

Checks that trailing spaces are replicated between both source and translation.

Trailing space is usually utilized to space out neighbouring elements, so removing it might break layout.

Traducción no modificada

Source and translation are identical

Happens if the source and corresponding translation strings is identical, down to at least one of the plural forms. Some strings commonly found across all languages are ignored, and various markup is stripped. This reduces the number of false positives.

This check can help find strings mistakenly untranslated.

The default behavior of this check is to exclude words from the built-in blacklist from the checking. These are words which are frequently not being translated. This is useful to avoid false positives on short strings, which consist only of single word which is same in several languages. This blacklist can be disabled by adding strict-same flag to string or component.

HTML inseguro

The translation uses unsafe HTML markup

Nuevo en la versión 3.9.

The translation uses unsafe HTML markup. This check has to be enabled using safe-html flag (see Personalizar el comportamiento mediante indicadores). There is also accompanied autofixer which can automatically sanitize the markup.

Ver también

The HTML check is performed by the Bleach library developed by Mozilla.

URL

The translation does not contain an URL

Nuevo en la versión 3.5.

The translation does not contain an URL. This is triggered only in case the unit is marked as containing URL. In that case the translation has to be a valid URL.

Marcación XML

XML tags in translation do not match source

This usually means the resulting output will look different. In most cases this is not a desired result from changing the translation, but occasionally it is.

Checks that XML tags are replicated between both source and translation.

Sintaxis XML

The translation is not valid XML

Nuevo en la versión 2.8.

The XML markup is not valid.

Espacio de anchura cero

Translation contains extra zero-width space character

Zero-width space (<U+200B>) characters are used to break messages within words (word wrapping).

As they are usually inserted by mistake, this check is triggered once they are present in translation. Some programs might have problems when this character is used.

Source checks

Source checks can help developers improve the quality of source strings.

Puntos suspensivos

The string uses three dots (…) instead of an ellipsis character (…)

This fails when the string uses three dots (...) when it should use an ellipsis character ().

Using the Unicode character is in most cases the better approach and looks better rendered, and may sound better with text-to-speech.

Ver también

Ellipsis on Wikipedia

Largamente no traducida

The string has not been translated for a long time

Nuevo en la versión 4.1.

When the string has not been translated for a long time, it is can indicate problem in a source string making it hard to translate.

Varias comprobaciones fallidas

The translations in several languages have failing checks

Numerous translations of this string have failing quality checks. This is usually an indication that something could be done to improve the source string.

This check failing can quite often be caused by a missing full stop at the end of a sentence, or similar minor issues which translators tend to fix in translation, while it would be better to fix it in the source string.

Varias variables sin nombre

There are multiple unnamed variables in the string, making it impossible for translators to reorder them

Nuevo en la versión 4.1.

There are multiple unnamed variables in the string, making it impossible for translators to reorder them.

Consider using named variables instead to allow translators to reorder them.

No pluralizada

The string is used as plural, but not using plural forms

The string is used as a plural, but does not use plural forms. In case your translation system supports this, you should use the plural aware variant of it.

For example with Gettext in Python it could be:

from gettext import ngettext

print ngettext("Selected %d file", "Selected %d files", files) % files