Skip to content

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

@nnnewb

Description

@nnnewb

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 这里,没考虑到反引号包裹的字符串的情况。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions