locale/fr.py: Use spaces instead of tabs.

This commit is contained in:
Valentin Lorentz 2012-08-05 20:23:15 +02:00
parent 22befe3d61
commit 08382d1bfe

View File

@ -37,40 +37,40 @@ def pluralize(s):
""" """
lowered = s.lower() lowered = s.lower()
if lowered.endswith('ou') and \ if lowered.endswith('ou') and \
lowered in ['bijou', 'caillou', 'chou', 'genou', 'hibou', 'joujou', lowered in ['bijou', 'caillou', 'chou', 'genou', 'hibou', 'joujou',
'pou']: 'pou']:
return s + 'x' return s + 'x'
elif lowered.endswith('al') and \ elif lowered.endswith('al') and \
lowered not in ['bal', 'carnaval', 'chacal', 'festival', 'récital', lowered not in ['bal', 'carnaval', 'chacal', 'festival', 'récital',
'régal', 'cal', 'étal', 'aval', 'caracal', 'val', 'choral', 'régal', 'cal', 'étal', 'aval', 'caracal', 'val', 'choral',
'corral', 'galgal', 'gayal']: 'corral', 'galgal', 'gayal']:
return s[0:-2] + 'aux' return s[0:-2] + 'aux'
elif lowered.endswith('ail') and \ elif lowered.endswith('ail') and \
lowered not in ['bail', 'corail', 'émail', 'soupirail', 'travail', lowered not in ['bail', 'corail', 'émail', 'soupirail', 'travail',
'ventail', 'vitrail', 'aspirail', 'fermail']: 'ventail', 'vitrail', 'aspirail', 'fermail']:
return s[0:-3] + 'aux' return s[0:-3] + 'aux'
elif lowered.endswith('eau'): elif lowered.endswith('eau'):
return s + 'x' return s + 'x'
elif lowered == 'pare-feu': elif lowered == 'pare-feu':
return s return s
elif lowered.endswith('eu') and \ elif lowered.endswith('eu') and \
lowered not in ['bleu', 'pneu', 'émeu', 'enfeu']: lowered not in ['bleu', 'pneu', 'émeu', 'enfeu']:
# Note: when 'lieu' is a fish, it has a 's' ; else, it has a 'x' # Note: when 'lieu' is a fish, it has a 's' ; else, it has a 'x'
return s + 'x' return s + 'x'
else: else:
return s + 's' return s + 's'
def depluralize(s): def depluralize(s):
"""Returns the singular of s.""" """Returns the singular of s."""
lowered = s.lower() lowered = s.lower()
if lowered.endswith('aux') and \ if lowered.endswith('aux') and \
lowered in ['baux', 'coraux', 'émaux', 'soupiraux', 'travaux', lowered in ['baux', 'coraux', 'émaux', 'soupiraux', 'travaux',
'ventaux', 'vitraux', 'aspiraux', 'fermaux']: 'ventaux', 'vitraux', 'aspiraux', 'fermaux']:
return s[0:-3] + 'ail' return s[0:-3] + 'ail'
elif lowered.endswith('aux'): elif lowered.endswith('aux'):
return s[0:-3] + 'al' return s[0:-3] + 'al'
else: else:
return s[0:-1] return s[0:-1]
def ordinal(i): def ordinal(i):
"""Returns i + the ordinal indicator for the number. """Returns i + the ordinal indicator for the number.
@ -79,9 +79,9 @@ def ordinal(i):
""" """
i = int(i) i = int(i)
if i == 1: if i == 1:
return '1er' return '1er'
else: else:
return '%sème' % i return '%sème' % i
def be(i): def be(i):
"""Returns the form of the verb 'être' based on the number i.""" """Returns the form of the verb 'être' based on the number i."""