description format from config
This commit is contained in:
parent
5f5beada4e
commit
a0ded66f85
@ -69,8 +69,11 @@ def make_event(person, year):
|
||||
|
||||
lang_params = {'language': event_config['language']}
|
||||
|
||||
if 'birthday_no_year' not in person:
|
||||
description += ', %d %s' % (age(person, year), zodiac_sign(person))
|
||||
if 'birthday_no_year' in person:
|
||||
description = description.replace('{age}', '')
|
||||
|
||||
description = description.format(
|
||||
age=age(person, year), zodiac=zodiac_sign(person))
|
||||
|
||||
event = Event()
|
||||
event.add('uid', sha1(person['name'] + ' birthday ' + str(year)))
|
||||
|
@ -3,7 +3,7 @@ calname: My friends birthdays!
|
||||
timezone: UTC
|
||||
|
||||
events:
|
||||
description: Happy birthday
|
||||
description: Happy birthday, {age} {zodiac}
|
||||
categories: birthday
|
||||
|
||||
scale:
|
||||
|
Loading…
Reference in New Issue
Block a user