Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
$ go version go version go1.11.2 linux/amd64
go env
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/fgm/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/fgm/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build766242374=/tmp/go-build -gno-record-gcc-switches"
//go:generate gotext -srclang=en update -out=catalog/catalog.go -lang=fr
message.lookupAndFormat()
if p.catContext.Execute(id) == catalog.ErrNotFound { if p.catContext.Execute(msg) == catalog.ErrNotFound { p.Render(msg) return }
id == msg
p.catContext(msg)
catalog.ErrNotFound
p.catContext.Execute(id)
p.catContext.Execute(msg)
if p.catContext.Execute(id) == catalog.ErrNotFound { if id == msg || p.catContext.Execute(msg) == catalog.ErrNotFound { p.Render(msg) return } }
The text was updated successfully, but these errors were encountered:
CC: @mpvl
Sorry, something went wrong.
Still present in v0.3.2 (12/2018) and current master HEAD. I could prepare a PR if you so wish.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
//go:generate gotext -srclang=en update -out=catalog/catalog.go -lang=fr
message.lookupAndFormat()
until this fragment:What did you expect to see?
id == msg
, skip the second execution ofp.catContext(msg)
if the first execution returnedcatalog.ErrNotFound
What did you see instead?
p.catContext.Execute(id)
returnedcatalog.ErrNotFound
, code performs the same work a second time asp.catContext.Execute(msg)
id == msg
, maybe like:The text was updated successfully, but these errors were encountered: