Skip to content
Open
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
10 changes: 10 additions & 0 deletions message/pipeline/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,16 @@ func (px packageExtracter) addMessage(
comment string,
arguments []argument) {
x := px.x

// Do not extract strings from external dependencies,
// as their files are located in the module cache.
if file := x.conf.Fset.File(pos); file != nil {
filename := filepath.ToSlash(file.Name())
if strings.Contains(filename, "/pkg/mod/") {
return
}
}

fmtMsg := constant.StringVal(c)

ph := placeholders{index: map[string]string{}}
Expand Down
2 changes: 1 addition & 1 deletion message/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func (s *State) Merge() error {
for _, orig := range filtered {
m := *orig
m.Key = ""
m.Position = ""
// m.Position = ""

for _, id := range m.ID {
if t, ok := translations[tag][id]; ok {
Expand Down