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
On Mac. Installed goi18n command following the README.
go version go1.14.6 darwin/amd64
Steps to reproduce:
follow the steps in README to extract messages, translate, and load new langauge's file into bundle. Verify the new language worked. I could reproduce this using the code from the example for this exercise.
Add a new message. In my case, I added:
newMsg := localizer.MustLocalize(&i18n.LocalizeConfig{
DefaultMessage: &i18n.Message{
ID: "NewMsg",
Description: "A new message",
One: "This is a new message",
},
PluralCount: 0,
})
After go extract, I verified the EN message file had the new message. At this moment, my EN and ES message files look like the following:
active.en.toml:
HelloPerson = "Hello {{.Name}}"
[MyUnreadEmails]
description = "The number of unread emails I have"
one = "I have {{.PluralCount}} unread email."
other = "I have {{.PluralCount}} unread emails."
[PersonUnreadEmails]
description = "The number of unread emails a person has"
one = "{{.Name}} has {{.UnreadEmailCount}} unread email."
other = "{{.Name}} has {{.UnreadEmailCount}} unread emails."
[NewMsg]
description = "A new message"
one = "This is a new message"
active.es.toml:
[HelloPerson]
hash = "sha1-5b49bfdad81fedaeefb224b0ffc2acc58b09cff5"
other = "Hola {{.Name}}"
[MyUnreadEmails]
description = "The number of unread emails I have"
hash = "sha1-6a65d17f53981a3657db1897630e9cb069053ea8"
one = "Tengo {{.PluralCount}} correo electrónico sin leer"
other = "Tengo {{.PluralCount}} correos electrónicos no leídos"
[PersonUnreadEmails]
description = "The number of unread emails a person has"
hash = "sha1-3a672fa89c5c8564bb233c907638004983792464"
one = "{{.Name}} tiene {{.UnreadEmailCount}} correo electrónico no leído"
other = "{{.Name}} tiene {{.UnreadEmailCount}} correos electrónicos no leídos"
On Mac. Installed goi18n command following the README.
go version go1.14.6 darwin/amd64
Steps to reproduce:
follow the steps in README to extract messages, translate, and load new langauge's file into bundle. Verify the new language worked. I could reproduce this using the code from the example for this exercise.
Add a new message. In my case, I added:
After
go extract
, I verified the EN message file had the new message. At this moment, my EN and ES message files look like the following:active.en.toml:
active.es.toml:
Now run
goi18n merge active.*.toml
.Got:
The text was updated successfully, but these errors were encountered: