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
The motivation behind #8497 was to suppress warnings when site authors translate words or phrases that do not require pluralization, using this construct:
i18n/es.toml
[contact]
other = "contacto"
and then invoke the translation without specifying a quantity: {{ i18n "contact" }}
Ideally, all i18n files should have this structure:
# Items without pluralization rules.contact = "contacto"help = "ayuda"# Items with pluralization rules.
[day]
one = "día"other = "días"
Approach
Detect when the i18n function has been passed a quantity (including zero). If there's a quantity (including zero), perform the i18n lookup and emit warnings as needed. If there's not a quantity, do what we're doing now.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Details
Pluralization warnings were eliminated during the implementation of #8497.
i18n/pl.toml
{{ i18n "day" }}
{{ i18n "day" 0 }}
{{ i18n "day" 1 }}
{{ i18n "day" 2 }}
{{ i18n "day" "1.5" }}
Ref: https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.html
Background
The motivation behind #8497 was to suppress warnings when site authors translate words or phrases that do not require pluralization, using this construct:
i18n/es.toml
and then invoke the translation without specifying a quantity:
{{ i18n "contact" }}
Ideally, all i18n files should have this structure:
Approach
Detect when the
i18n
function has been passed a quantity (including zero). If there's a quantity (including zero), perform the i18n lookup and emit warnings as needed. If there's not a quantity, do what we're doing now.The text was updated successfully, but these errors were encountered: