Skip to content

Commit

Permalink
mmgotool/i18n: Write json file even if there isn't empty translations…
Browse files Browse the repository at this point in the history
… to cleanup empty plural forms

Signed-off-by: Nicolas Le Cam <[email protected]>
  • Loading branch information
KuSh committed Dec 29, 2022
1 parent 33f9ccd commit f0addd7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mmgotool/commands/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,9 @@ func clean(translationDir string, file string, dryRun bool, check bool) (*string
}
newList, count := removeEmptyTranslations(oldList)
result := ""
if count == 0 {
return &result, nil
if count != 0 {
result = fmt.Sprintf("%v has %v empty translations\n", file, count)
}
result = fmt.Sprintf("%v has %v empty translations\n", file, count)
if dryRun || check {
return &result, nil
}
Expand Down

0 comments on commit f0addd7

Please sign in to comment.