cmd/gotext: actually use -dir flag

gotext has the read -dir flag but is not used.
The dir parameter should be passed to pipeline.Config

Fixes golang/go#61507

Change-Id: I242a768964fe56c4c7877de9dc487777c6815dae
Auto-Submit: Ian Lance Taylor <>
TryBot-Result: Gopher Robot <>
Reviewed-by: Heschi Kreinick <>
Run-TryBot: Ian Lance Taylor <>
Reviewed-by: Ian Lance Taylor <>
Run-TryBot: Ian Lance Taylor <>
diff --git a/cmd/gotext/main.go b/cmd/gotext/main.go
index f69ea93..ed0f7ec 100644
--- a/cmd/gotext/main.go
+++ b/cmd/gotext/main.go
@@ -53,6 +53,7 @@
 		Supported:           getLangs(),
 		TranslationsPattern: `messages\.(.*)\.json$`,
 		GenFile:             *out,
+		Dir:                 *dir,
 	}, nil