Skip to content

Commit

Permalink
Fix typos in comments
Browse files Browse the repository at this point in the history
Also rewrite a bad statement.
  • Loading branch information
Rigas Papathanasopoulos committed Mar 14, 2018
1 parent 7eb0e10 commit fd3caf5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions openformats/formats/indesign.py
Expand Up @@ -96,9 +96,9 @@ def _get_ordered_stories(self, idml):

def _can_skip_content(self, string):
"""
Checks if the contents of an XML files are translateable.
Checks if the contents of an XML files are translatable.
Strings that contain only special characters or can be evaluated
to a nunber are skipped.
to a number are skipped.
"""
stripped_string = self.SPECIAL_CHARACTERS_REGEX.sub('', string).strip()
if not stripped_string:
Expand All @@ -108,9 +108,7 @@ def _can_skip_content(self, string):
return True
except ValueError:
pass
if not self._contains_translatable_character(stripped_string):
return True
return False
return not self._contains_translatable_character(stripped_string)

def _contains_translatable_character(self, string):
"""
Expand Down

0 comments on commit fd3caf5

Please sign in to comment.