You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is common to have positional placeholders when localizing due to differences in word order in different languages.
There exists several different formats for positional placeholders. For example:
// ICU format:'{0, number} files exist on disk {1} at this time'// jquery.i18n format:'$1 files exist on disk $2 at this time'// PHP printf format'%1$d files exist on disk %2$s at this time'
Since sprintf and vsprintf are currently being used, the last format already works.
It would be nice to support the jquery.i18n format by parsing the strings and converting the placeholders to printf-style placeholders. However since it does not specify type for its placeholders (string, number, etc.), they would be assumed string by default. A possible improvement would be to look for {{PLURAL to determine if the placeholder could be an integer.
The text was updated successfully, but these errors were encountered:
It is common to have positional placeholders when localizing due to differences in word order in different languages.
There exists several different formats for positional placeholders. For example:
Since
sprintf
andvsprintf
are currently being used, the last format already works.It would be nice to support the jquery.i18n format by parsing the strings and converting the placeholders to printf-style placeholders. However since it does not specify type for its placeholders (string, number, etc.), they would be assumed string by default. A possible improvement would be to look for
{{PLURAL
to determine if the placeholder could be an integer.The text was updated successfully, but these errors were encountered: