Skip to content

Commit

Permalink
revert change in ctx key check
Browse files Browse the repository at this point in the history
  • Loading branch information
donseba committed Feb 9, 2024
1 parent 21cd858 commit 74c373f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,13 @@ func (t *Translator) addToPotFileIfNotExists(key translationKey) error {
return t.addToPotFile(key.ctx, uniqueKey{singular: key.value})
}

for potKey, _ := range ctr[key.ctx] {
if key.value == potKey {
for _, potKey := range ctr[key.ctx] {
if key.value == potKey.ID {
return nil
}

return t.addToPotFile(key.ctx, uniqueKey{singular: key.value})
}

return nil
return t.addToPotFile(key.ctx, uniqueKey{singular: key.value})
}

func (t *Translator) FuncMap() template.FuncMap {
Expand Down

0 comments on commit 74c373f

Please sign in to comment.