O Crowdin suporta sintaxe de Mensagem ICU, que é usada para ajudar a expressar as subtilezas da ortografia, gramática e formatação específicas do idioma nas traduções.
Strings that are formatted in the ICU Message syntax can have different types of replacements that are called arguments. Cada argumento é colocado entre chaves ( {} ) e refere-se a um valor nos dados de entrada. Os argumentos dos seguintes tipos são suportados no Crowdin: número, data, hora, seleção e plural.
Os argumentos de sintaxe ICU são sempre destacados no Editor, para que possa saber qual parte da frase não deve ser traduzida. Altera a posição dos argumentos na tradução para seguir a ordem natural das palavras no idioma de destino. Altera a posição dos argumentos na tradução para seguir a ordem natural das palavras no idioma de destino. Há também um modo de visualização, que permite que você veja como a tradução será exibida na interface do usuário para garantir que todos os elementos traduzíveis sejam traduzidos.
Plural type is used to handle plural category variations, as each language has its own set of plural categories (for example, English has “one” and “other”, while Ukrainian has “one”, “few”, “many”, and “other”).
As seguintes etiquetas curtas são usadas para determinar as categorias plurais:
In the Editor, you don’t have to manually add or delete plural categories to the translations you are making. Basta clicar em Copiar Origem e o texto de origem será copiado para o campo de tradução com o número correto de categorias plurais para o idioma de destino atual.
Read more about Language Plural Rules.
The purpose of the select ordinal type is to choose output based on the ordinal pluralization rules (1st, 2nd, 3rd, etc.) of the current target language. It is very similar to the plural type except the value is mapped to an ordinal plural category.
Select type is mostly used to represent the right gender-based inflections in the message.
The purpose of the number type is to display different number values such as percentage, currency, and decimal numbers independently from the locale conventions for those. This enables adjustment of the message output to the number formats used in different locales. ICU Number Skeletons are also supported.
Date and time types show date and time values according to the formats preferred in the specified locales. These types can also have a style – an extra information on how the value will be formatted. The following 4 styles can be used: short, medium, long, and full.
Syntax error detection significantly reduces confusion during translation of ICU Message syntax, as the platform automatically identifies potential mistakes in the translation. If a syntax error is found, you’ll see a “Syntax error” message with a suggestion of what should be fixed.