Example #1
0
 def sms(self):
     return _("{project} starts at {time}. {url}").format(
         project=self.project.joined_title('>'),
         time=time_filter(self.session.start_at_localized),
         url=shortlink(
             self.project.url_for(_external=True,
                                  **self.tracking_tags('sms'))),
     )
Example #2
0
 def test_time_localized_en_full(self):
     with self.app.test_request_context('/',
                                        headers={'Accept-Language': 'en'}):
         assert (filters.time_filter(
             self.time,
             format='full') == '11:59:59 PM Coordinated Universal Time')
Example #3
0
 def test_time_localized_hi_full(self):
     with self.app.test_request_context('/',
                                        headers={'Accept-Language': 'hi'}):
         assert (filters.time_filter(
             self.time, format='full') == '11:59:59 pm समन्वित वैश्विक समय')
Example #4
0
 def test_time_localized_long(self):
     with self.app.test_request_context('/',
                                        headers={'Accept-Language': 'hi'}):
         assert (filters.time_filter(self.datetime,
                                     format='long') == '12:00:00 am UTC')
Example #5
0
 def email_subject(self):
     return self.emoji_prefix + _("{project} starts at {time}").format(
         project=self.project.joined_title(),
         time=time_filter(self.session.start_at_localized),
     )