goi18n merge creates plural versions only
maberer opened this issue · comments
Running goi18n merge active.en.toml translate.de.toml
on https://github.com/nicksnyder/go-i18n/blob/main/v2/example/active.en.toml
inserts everything in plural. See below for "one" and "other" both are plural versions...
[MyUnreadEmails]
description = "The number of unread emails I have"
hash = "sha1-9bed04915e80e0ac6b2304a03710e9d6b5749b47"
one = "I have {{.PluralCount}} unread emails"
other = "I have {{.PluralCount}} unread emails"
is this intended?
Yes. This makes it clear to the translator what they need to translate and in which plural forms for that language.
This is really weird, to be honest. Is there a way to change this behaviour?
There is not a way to change this behavior. If you could change this behavior, what would you want to happen instead?
There is not a way to change this behavior. If you could change this behavior, what would you want to happen instead?
For the "one" field in translations.*.toml
to match the "one" field in the *i18n.Message
and not the "other" field
The reason that I originally implemented it this way was because it wasn't clear to me that one
in one language is equivalent to one
in another language. This is probably a safe assumption though, so will re-open this issue and I would review a PR if you want to make one to change this behavior.
PR Done. Please review @nicksnyder