Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moving plural function to library
  • Loading branch information
Klaus Thoden committed Mar 22, 2018
1 parent 5b6182d commit be6266c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 0 additions & 11 deletions fix_tei.py
Expand Up @@ -329,17 +329,6 @@ def fix_tei_header(xml_tree, bibfile_string):
return xml_tree
# def fix_tei_header ends here

def plural(num, noun):
"""Return singular or plural form of noun, depending on num.
Works only when a noun's plural is formed with 's'. """

if num == 1:
return noun
else:
return noun + "s"
# def plural ends here

def evaluate_report(report):
"""Print report of conversion."""

Expand Down
12 changes: 11 additions & 1 deletion libeoaconvert.py
Expand Up @@ -154,7 +154,17 @@ def two_letter_language(language_string):
return "it"
# two_letter_language ends here

# next function adapted from TEI2EOADjango
def plural(num, noun):
"""Return singular or plural form of noun, depending on num.
Works only when a noun's plural is formed with 's'. """

if num == 1:
return noun
else:
return noun + "s"
# def plural ends here

def format_citations(used_citekeys, bibdata, language):
"""Return a formatted xmlstring of the used citations"""

Expand Down

0 comments on commit be6266c

Please sign in to comment.