feat: `--keyword` / `--keyword-plural` for `xgotext`
In xgettext-go you have several additional flags like this invocation (pulled from the incus project):
xgettext-go -o po/$(DOMAIN).pot --add-comments-tag=TRANSLATORS: --sort-output --package-name=$(DOMAIN) [email protected] --keyword=i18n.G --keyword-plural=i18n.NG cmd/incus/*.go shared/cliconfig/*.go
I'd like to add the --keyword=... / --keyword-plural=... to xgotext which I personally need for a project.
Just creating this in case there are objections, PR incoming when I get time.
@leonelquinteros would you be able to explain the significance of the the int values in this part? It seems like I just need to inject my --keyword params into this map at some point 🤔
https://github.com/leonelquinteros/gotext/blob/270f280ba5443979a5ddfc6010d874f19b558d1b/cli/xgotext/parser/gofile.go#L28-L38