Skip to content

Instantly share code, notes, and snippets.

@ulikoehler
Created October 21, 2015 22:18
Show Gist options
  • Save ulikoehler/758e476112ab30ec2793 to your computer and use it in GitHub Desktop.
Save ulikoehler/758e476112ab30ec2793 to your computer and use it in GitHub Desktop.
KA PO patch
diff --git a/poentry_linter.py b/poentry_linter.py
index e748d35..251555b 100644
--- a/poentry_linter.py
+++ b/poentry_linter.py
@@ -136,6 +136,9 @@ def _assert_same(po_entry, regexp, ka_locale, munge_fn=None):
for s in set(english_singular_counts.keys() +
english_plural_counts.keys() +
translated_counts.keys()):
+ # Hotfix for '"" occurs n times [...]' bug
+ if not s:
+ continue
# Find the match from the regexp in which the number of times
# it occurred in the translated version differs from either the
# singular or plural.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment