mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
notify.py: Use a/an correctly when sending request notifications
Will no longer send notifications about "a orphan request", but determine whether to use a/an based on the first character of the request type. Signed-off-by: Lars Rustand <rustand.lars@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
3ac958ac01
commit
a66c7fa615
1 changed files with 3 additions and 2 deletions
|
@ -414,8 +414,9 @@ class RequestOpenNotification(Notification):
|
||||||
(self._user, self._pkgbase, self._merge_into)
|
(self._user, self._pkgbase, self._merge_into)
|
||||||
body += '\n\n' + self._text
|
body += '\n\n' + self._text
|
||||||
else:
|
else:
|
||||||
body = '%s [1] filed a %s request for %s [2]:' % \
|
an = 'an' if self._reqtype[0] in 'aeiou' else 'a'
|
||||||
(self._user, self._reqtype, self._pkgbase)
|
body = '%s [1] filed %s %s request for %s [2]:' % \
|
||||||
|
(self._user, an, self._reqtype, self._pkgbase)
|
||||||
body += '\n\n' + self._text
|
body += '\n\n' + self._text
|
||||||
return body
|
return body
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue