CF CLI v6.3.0 is crashed with stracktrace when non-existing locale is used
$ cf -v panic: no language found in "ru_RU.all.json"
goroutine 1 [running]: runtime.panic(0x873100, 0xc210036420) /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6 github.com/nicksnyder/go-i18n/i18n/bundle.(*Bundle).MustLoadTranslationFile(0xc210000018, 0xc210050100, 0x36) /home/ubuntu/go/src/github.com/cloudfoundry/cli/Godeps/_workspace/src/github.com/nicksnyder/go-i18n/i18n/bundle/bundle.go:35 +0x71 github.com/nicksnyder/go-i18n/i18n.MustLoadTranslationFile(0xc210050100, 0x36) /home/ubuntu/go/src/github.com/cloudfoundry/cli/Godeps/_workspace/src/github.com/nicksnyder/go-i18n/i18n/i18n.go:89 +0x3e github.com/cloudfoundry/cli/cf/i18n.loadFromAsset(0x951f50, 0x8, 0xc21000a200, 0x11, 0xc210000038, ...) /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/i18n/init.go:117 +0x4cb github.com/cloudfoundry/cli/cf/i18n.initWithUserLocale(0x951f50, 0x8, 0xc21000a200, 0x11, 0xc21000a200, ...) /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/i18n/init.go:66 +0x153 github.com/cloudfoundry/cli/cf/i18n.Init(0x951f50, 0x8, 0xc21000a200, 0x11, 0xc210000018) /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/i18n/init.go:41 +0x51 github.com/cloudfoundry/cli/cf/trace.init·1() /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/trace/i18n_init.go:11 +0x4e github.com/cloudfoundry/cli/cf/trace.init() /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/trace/trace.go:70 +0x8b main.init() /home/ubuntu/go/src/github.com/cloudfoundry/cli/main/main.go:162 +0x3d
$ export LANG=C
$ cf --version cf version 6.3.0-053b818-2014-07-14T21:30:56+00:00
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/75021420.
Thanks for filing this bug! This is rather important since it crashes by default on the ru_RU locale. Luckily it's just this one (as far as we know) because a library we use has no notion of ru_RU.
We're Doing some similar work this week, hopefully we can address this at the same time!
Sent From A Very Small Keyboard
On Jul 15, 2014, at 3:23, Evgeniy Kostenko [email protected] wrote:
$ cf -v panic: no language found in "ru_RU.all.json"
goroutine 1 [running]: runtime.panic(0x873100, 0xc210036420) /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6 github.com/nicksnyder/go-i18n/i18n/bundle.(*Bundle).MustLoadTranslationFile(0xc210000018, 0xc210050100, 0x36) /home/ubuntu/go/src/github.com/cloudfoundry/cli/Godeps/_workspace/src/github.com/nicksnyder/go-i18n/i18n/bundle/bundle.go:35 +0x71 github.com/nicksnyder/go-i18n/i18n.MustLoadTranslationFile(0xc210050100, 0x36) /home/ubuntu/go/src/github.com/cloudfoundry/cli/Godeps/_workspace/src/github.com/nicksnyder/go-i18n/i18n/i18n.go:89 +0x3e github.com/cloudfoundry/cli/cf/i18n.loadFromAsset(0x951f50, 0x8, 0xc21000a200, 0x11, 0xc210000038, ...) /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/i18n/init.go:117 +0x4cb github.com/cloudfoundry/cli/cf/i18n.initWithUserLocale(0x951f50, 0x8, 0xc21000a200, 0x11, 0xc21000a200, ...) /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/i18n/init.go:66 +0x153 github.com/cloudfoundry/cli/cf/i18n.Init(0x951f50, 0x8, 0xc21000a200, 0x11, 0xc210000018) /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/i18n/init.go:41 +0x51 github.com/cloudfoundry/cli/cf/trace.init·1() /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/trace/i18n_init.go:11 +0x4e github.com/cloudfoundry/cli/cf/trace.init() /home/ubuntu/go/src/github.com/cloudfoundry/cli/tmp/cli_gopath/src/github.com/cloudfoundry/cli/cf/trace/trace.go:70 +0x8b main.init() /home/ubuntu/go/src/github.com/cloudfoundry/cli/main/main.go:162 +0x3d
$ export LANG=C
$ cf --version cf version 6.3.0-053b818-2014-07-14T21:30:56+00:00
— Reply to this email directly or view it on GitHub.
@n0guest So it looks like the the nicksnyder/go-i18n library that we use for ID/translation swapping doesn't support Russian ATM. When we have the time, we will try and write a pull request to nicksnyder to add support for it.
Until then, we've figured the least confusing thing to do is to remove all support for it on our end so that people do not try and translate the CLI strings and then are unable to use them.
I am very sorry that this has to be our course of action, but hopefully we can add support for Russian in the near future. We are currently retooling our i18n infrastructure in order to make it easier for everyone to edit and add to our translations.
It's not so important to have Russian translation. I guess "don't crash" under unknown locale is more desirable. BTW, how to get updated CF cli without waiting next release?
Normally if a story is in the delivered state, that means it should be the edge builds (accessible from the readme in the top of this repository). Once it has been set to accepted, that means someone has verified that the feature or fix is in and correct.
We've had some build pipeline problems, so things have not been getting delivered. Hopefully this will be cleared up very soon and this fix will be there. We also plan to get a 6.3.1 release out with this fix as soon as the pipeline clears.