Skip to content

Commit 74c373f

Browse files
committed
revert change in ctx key check
1 parent 21cd858 commit 74c373f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

translator.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,13 @@ func (t *Translator) addToPotFileIfNotExists(key translationKey) error {
293293
return t.addToPotFile(key.ctx, uniqueKey{singular: key.value})
294294
}
295295

296-
for potKey, _ := range ctr[key.ctx] {
297-
if key.value == potKey {
296+
for _, potKey := range ctr[key.ctx] {
297+
if key.value == potKey.ID {
298298
return nil
299299
}
300-
301-
return t.addToPotFile(key.ctx, uniqueKey{singular: key.value})
302300
}
303301

304-
return nil
302+
return t.addToPotFile(key.ctx, uniqueKey{singular: key.value})
305303
}
306304

307305
func (t *Translator) FuncMap() template.FuncMap {

0 commit comments

Comments
 (0)