Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmd/tx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,14 @@ func Main() {
)
}

if arguments.Pseudo && arguments.Source {
return cli.Exit(errorColor(
"It doesn't make sense to use the '--pseudo' flag with the "+
"CLI in \"source pull\" mode ('--source' flag). Please use with "+
" translation files.",
), 1)
}

if arguments.Source && !arguments.Translations &&
(arguments.All || len(arguments.Languages) > 0) {
return cli.Exit(errorColor(
Expand Down
8 changes: 8 additions & 0 deletions internal/txlib/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ func (task *ResourcePullTask) Run(send func(string), abort func()) {
return
}
fileFilter := setFileTypeExtensions(args.FileType, cfgResource.FileFilter)
if args.Pseudo {
fileFilter = strings.Replace(
fileFilter,
"<lang>",
"<lang>_pseudo",
-1,
)
}
localFiles := searchFileFilter(".", fileFilter)

for localLanguageCode, filePath := range cfgResource.Overrides {
Expand Down