Skip to content
New issue

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

xgettext-go会提取出多余的反引号 #15

Open
nnnewb opened this issue Jun 7, 2022 · 0 comments
Open

xgettext-go会提取出多余的反引号 #15

nnnewb opened this issue Jun 7, 2022 · 0 comments
Labels

Comments

@nnnewb
Copy link

nnnewb commented Jun 7, 2022

xgettext-go 通过 go install github.com/chai2010/gettext-go/cmd/xgettext-go@latest 安装,环境 go 1.18.1 Windows 10

最小重现案例

package terminal

import "github.com/chai2010/gettext-go"

func f() {
	println(gettext.Gettext(`Hello world`))
}

output.pot 内容

#: github.com/nnnewb/qn/internal/terminal/t.go:6
#, go-format
msgid "`Hello world`"
msgstr ""

问题怀疑是在 cmd/xgettext-go/pkg.go 这里,没考虑到反引号包裹的字符串的情况。

@nnnewb nnnewb added the bug label Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant