Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

i18n TfL provider

  • Loading branch information...
commit d965c3ecfbbdaa7c20b540f34a9be6214416f97b 1 parent 3f945ac
@cnorthwood cnorthwood authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 molly/apps/places/providers/tfl.py
View
5 molly/apps/places/providers/tfl.py
@@ -3,6 +3,8 @@
from collections import defaultdict
import threading
+from django.utils.translation import ugettext_lazy as _
+
from molly.apps.places.providers import BaseMapsProvider
class TubeRealtimeProvider(BaseMapsProvider):
@@ -69,7 +71,8 @@ def get_times(self, entity):
services.sort(key=lambda s: s['etas'][0])
for service in services:
etas = [round(e/60) for e in service['etas']]
- etas = ['DUE' if e == 0 else '%d mins' % e for e in etas]
+ # Translators: This refers to arrival times of trains, in minutes
+ etas = [_('DUE') if e == 0 else _('%d mins') % e for e in etas]
service['next'] = etas[0]
service['following'] = etas[1:]
entity.metadata['real_time_information']['services'] = services
Please sign in to comment.
Something went wrong with that request. Please try again.