Crowdin підтримує синтаксис повідомлень ICU, який використовується для більш точної передачі особливостей орфографії, граматики та правил форматування в різних мовах при перекладі.
Рядки, відформатовані в синтаксисі повідомлень ICU, можуть мати різні типи замін, які називаються аргументами. Кожен аргумент укладений у фігурні дужки і відноситься до значення у вхідних даних. У Crowdin підтримуються наступні типи аргументів: number, date, time, select і plural.
Аргументи синтаксису ICU завжди виділяються в редакторі, тому перекладач відразу бачить, яку частину пропозиції не треба перекладати. При цьому можна змінювати місце аргументу в реченні; це допоможе зберегти природний порядок слів у перекладі на цільовій мові. Також доступний режим перегляду, який дозволяє побачити кінцевий варіант відображення перекладів в інтерфейсі; це дозволить точно перевірити, що всі перекладні елементи перекладені.
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”).
Категорії множини визначаються за допомогою наступних коротких тегів:
In the Editor, you don’t have to manually add or delete plural categories to the translations you are making. Досить скопіювати джерело, і рядок буде скопійовано в поле тексту перекладу з тією кількістю категорій множини, які застосовні для поточної цільової мови.
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.