diff -r 53ee9e945673 -r e27c18f080d1 busroute.py --- a/busroute.py Thu Apr 26 16:12:23 2018 +0300 +++ b/busroute.py Tue May 01 13:21:00 2018 +0300 @@ -9,9 +9,11 @@ else: return 0 -def simplify_name(region_name): +def simplify_name(region_name, replace = False): region = regions.get(region_name) if region: + if replace and 'replacement' in region and region['replacement'] != region_name: + return simplify_name(region['replacement']) return region.get('short_name', region_name) else: return region_name