-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Update the reviews section to use this design pattern:
This removes the complexity of pluralization and localization of the "reviews" string.
Context:
(Creating based on discussions here and here)
-
In some languages translators may want/need to change the word order when translating UI labels, and when a text string is concatenated from 2 or more strings, this sometimes makes it impossible.
-
Concatenation should also be avoided when dealing with variables (e.g. concatenating variable+text). Example:
86 reviews
In this case, if the string is generated as a result of the 'variable'+'text' concatenation, and only the text part is sent for translation, translators will not be able to change the word order (which is often required in some languages).
Instead, it is advisable to use the variable as part of the string, which will then be sent to translation as a whole:
"string": "$reviews_count$ reviews"
Ideally, concatenation should always be avoided in localization, as reversed word order is quite common in many languages.