ctucx.git: oeffisearch

[nimlang] fast and simple tripplanner

commit 6d33fbe0a55b16e677193140fa5ec5ac4bb63a09
parent 10f607cbc3553de6db5424ef2b9f9462e1129a7b
Author: Milan Pässler <me@pbb.lc>
Date: Fri, 7 Feb 2020 21:34:32 +0100

client: transfers have no distance
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/client/js/app_functions.js b/client/js/app_functions.js
@@ -95,7 +95,7 @@ export const t = (key, params) => {
 		language = dataStorage.settings.language;
 	}
 
-	if (languages['de'][key] !== undefined) {
+	if (languages[language][key] !== undefined) {
 		return vsprintf(languages[language][key], params);
 	} else {
 		return key;
diff --git a/client/js/journeyView.js b/client/js/journeyView.js
@@ -40,7 +40,7 @@ const legTemplate = (element) => {
 		<p class="walk">${t('walkinfo', [parseName(element.arrival.point), element.distance])}</p>
 		` : html`
 			${element.isTransfer ? html`
-				<p class="transfer">${t('transferinfo', [parseName(element.arrival.point), element.distance])}</p>
+				<p class="transfer">${t('transferinfo', [parseName(element.arrival.point)])}</p>
 			` : html`
 				<table>
 					<thead>
diff --git a/client/js/languages.js b/client/js/languages.js
@@ -11,8 +11,8 @@ export const languages = {
 		'time':               'Uhrzeit',
 		'station':            'Station',
 		'platform':           'Gleis',
-		'walkinfo':           'Laufe nach %s. (ca. %s Meter)',
-		'transferinfo':       'Reise nach %s. (ca. %s Meter)',
+		'walkinfo':           'Laufe nach %s (ca. %s Meter)',
+		'transferinfo':       'Reise nach %s',
 		'swap':               'Von/Nach tauschen',
 		'settings':           'Einstellungen',
 		'search':             'Suchen',

@@ -58,8 +58,8 @@ export const languages = {
 		'time':              'Time',
 		'station':           'Station',
 		'platform':          'Platform',
-		'walkinfo':          'Walk to %s. (apprx. %s meters)',
-		'transferinfo':      'Transfer to %s. (apprx. %s meters)',
+		'walkinfo':          'Walk to %s (apprx. %s meters)',
+		'transferinfo':      'Travel to %s',
 		'swap':              'Swap from/to',
 		'settings':          'Settings',
 		'search':            'Search',
diff --git a/src/backend/hafas/parse/leg.nim b/src/backend/hafas/parse/leg.nim
@@ -47,7 +47,6 @@ proc mkParseLeg*(common: CommonData): proc =
 
     elif typeStr == "DEVI":
       result.isTransfer = true
-      result.distance = some(l{"gis"}{"dist"}.getInt())
 
     else:
       raise newException(CatchableError, "Unimplemented hafas leg type: " & typeStr)