Use a birthday title which does not require translation because we have no idea about the target device language and forcing English upon all users is kind of bad
This commit is contained in:
parent
51072f742e
commit
fe7103506b
|
@ -123,7 +123,7 @@ class BirthdayService {
|
|||
}
|
||||
$title = str_replace('{name}',
|
||||
strtr((string)$doc->FN, array('\,' => ',', '\;' => ';')),
|
||||
'{name}\'s Birthday'
|
||||
'{name}'
|
||||
);
|
||||
try {
|
||||
$date = new \DateTime($birthday);
|
||||
|
@ -146,7 +146,7 @@ class BirthdayService {
|
|||
$vEvent->DTEND['VALUE'] = 'DATE';
|
||||
$vEvent->{'UID'} = $doc->UID;
|
||||
$vEvent->{'RRULE'} = 'FREQ=YEARLY';
|
||||
$vEvent->{'SUMMARY'} = $title . ' (' . $date->format('Y') . ')';
|
||||
$vEvent->{'SUMMARY'} = $title . ' (*' . $date->format('Y') . ')';
|
||||
$vEvent->{'TRANSP'} = 'TRANSPARENT';
|
||||
$vCal->add($vEvent);
|
||||
return $vCal;
|
||||
|
|
|
@ -59,7 +59,7 @@ class BirthdayServiceTest extends TestCase {
|
|||
$this->assertInstanceOf('Sabre\VObject\Component\VCalendar', $cal);
|
||||
$this->assertTrue(isset($cal->VEVENT));
|
||||
$this->assertEquals('FREQ=YEARLY', $cal->VEVENT->RRULE->getValue());
|
||||
$this->assertEquals('12345\'s Birthday (1900)', $cal->VEVENT->SUMMARY->getValue());
|
||||
$this->assertEquals('12345 (*1900)', $cal->VEVENT->SUMMARY->getValue());
|
||||
$this->assertEquals('TRANSPARENT', $cal->VEVENT->TRANSP->getValue());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue