summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Liao <seankhliao@gmail.com>2021-10-21 19:49:33 +0200
committerIan Lance Taylor <iant@golang.org>2021-11-05 21:10:00 +0000
commit310d592b71f764a238114c372e0ce7db4ecb560a (patch)
tree3104480f51b52bef6849d1e490296d45d690f3ec
parent459fa287ae002e3df243c0bd10ea915f5c64f687 (diff)
downloadgolang-x-text-310d592b71f764a238114c372e0ce7db4ecb560a.tar.gz
cmd/gotext: only match files ending with pattern
Exclude files with other extensions like .json.swp from editors. Fixes golang/go#48983 Change-Id: Id74ca7ae208688cf900661d641e5403d453da33c Reviewed-on: https://go-review.googlesource.com/c/text/+/357734 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org> Trust: Marcel van Lohuizen <mpvl@golang.org> Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
-rw-r--r--cmd/gotext/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/gotext/main.go b/cmd/gotext/main.go
index f31dd4f..c8dc799 100644
--- a/cmd/gotext/main.go
+++ b/cmd/gotext/main.go
@@ -48,7 +48,7 @@ func config() (*pipeline.Config, error) {
return &pipeline.Config{
SourceLanguage: tag,
Supported: getLangs(),
- TranslationsPattern: `messages\.(.*)\.json`,
+ TranslationsPattern: `messages\.(.*)\.json$`,
GenFile: *out,
}, nil
}