Skip to content

Commit

Permalink
New swiss backend, the changes from smurfy/fahrplan#289
Browse files Browse the repository at this point in the history
  • Loading branch information
poetaster committed Jun 10, 2022
1 parent aa3ef6d commit 2ed54f5
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 20 deletions.
42 changes: 22 additions & 20 deletions fahrplan2.pro
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,21 @@ INCLUDEPATH += src
unix:!symbian: LIBS += -lz

HEADERS += \
src/parser/parser_hafasxml.h \
src/parser/parser_abstract.h \
src/parser/parser_definitions.h \
src/parser/parser_xmlrejseplanendk.h \
src/parser/parser_xmloebbat.h \
src/parser/parser_xmlvasttrafikse.h \
src/fahrplan.h \
src/fahrplan_backend_manager.h \
src/parser/parser_mobilebahnde.h \
src/calendarthreadwrapper.h \
src/calendar_sfos_wrapper.h \
src/parser/parser_xmlnri.h \
src/parser/parser_hafasbinary.h \
src/fahrplan_parser_thread.h \
src/fahrplan_calendar_manager.h \
src/models/backends.h \
src/models/stationslistmodel.h \
src/models/favorites.h \
src/models/stationsearchresults.h \
src/models/timetable.h \
src/models/trainrestrictions.h \
src/parser/parser_xmlnri.h \
src/parser/parser_hafasbinary.h \
src/parser/parser_mobilebahnde.h \
src/parser/parser_ptvvicgovau.h \
src/parser/parser_efa.h \
src/parser/parser_ireland_efa.h \
Expand All @@ -132,29 +127,30 @@ HEADERS += \
src/parser/parser_resrobot.h \
src/parser/parser_finland_matka.h \
src/parser/parser_vrr_efa.h \
src/models/backends.h
src/parser/parser_hafasxml.h \
src/parser/parser_abstract.h \
src/parser/parser_definitions.h \
src/parser/parser_xmlrejseplanendk.h \
src/parser/parser_xmloebbat.h \
src/parser/parser_xmlvasttrafikse.h \
src/parser/parser_search_ch.h

SOURCES += src/main.cpp \
src/parser/parser_hafasxml.cpp \
src/parser/parser_abstract.cpp \
src/parser/parser_definitions.cpp \
src/parser/parser_xmlrejseplanendk.cpp \
src/parser/parser_xmloebbat.cpp \
src/parser/parser_xmlvasttrafikse.cpp \
src/fahrplan.cpp \
src/fahrplan_backend_manager.cpp \
src/parser/parser_mobilebahnde.cpp \
src/calendarthreadwrapper.cpp \
src/calendar_sfos_wrapper.cpp \
src/parser/parser_xmlnri.cpp \
src/parser/parser_hafasbinary.cpp \
src/fahrplan_parser_thread.cpp \
src/fahrplan_calendar_manager.cpp \
src/models/backends.cpp
src/models/stationslistmodel.cpp \
src/models/favorites.cpp \
src/models/stationsearchresults.cpp \
src/models/timetable.cpp \
src/models/trainrestrictions.cpp \
src/parser/parser_mobilebahnde.cpp \
src/parser/parser_xmlnri.cpp \
src/parser/parser_hafasbinary.cpp \
src/parser/parser_ptvvicgovau.cpp \
src/parser/parser_efa.cpp \
src/parser/parser_ireland_efa.cpp \
Expand All @@ -165,7 +161,13 @@ SOURCES += src/main.cpp \
src/parser/parser_resrobot.cpp \
src/parser/parser_finland_matka.cpp \
src/parser/parser_vrr_efa.cpp \
src/models/backends.cpp
src/parser/parser_hafasxml.cpp \
src/parser/parser_abstract.cpp \
src/parser/parser_definitions.cpp \
src/parser/parser_xmlrejseplanendk.cpp \
src/parser/parser_xmloebbat.cpp \
src/parser/parser_xmlvasttrafikse.cpp \
src/parser/parser_search_ch.cpp \

LIBS += $$PWD/3rdparty/gauss-kruger-cpp/gausskruger.cpp

Expand Down
1 change: 1 addition & 0 deletions src/fahrplan_backend_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ QStringList FahrplanBackendManager::getParserList()
result.append(ParserResRobot::getName());
result.append(ParserFinlandMatka::getName());
result.append(ParserVRREFA::getName());
result.append(ParserSearchCH::getName());

// Make sure the index is in bounds
if (currentParserIndex > (result.count() - 1) || currentParserIndex < 0) {
Expand Down
3 changes: 3 additions & 0 deletions src/fahrplan_parser_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ void FahrplanParserThread::run()
case 13:
m_parser = new ParserVRREFA();
break;
case 14:
m_parser = new ParserSearchCH();
break;
}

m_name = m_parser->name();
Expand Down
1 change: 1 addition & 0 deletions src/fahrplan_parser_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "parser/parser_resrobot.h"
#include "parser/parser_finland_matka.h"
#include "parser/parser_vrr_efa.h"
#include "parser/parser_search_ch.h"

class FahrplanParserThread : public QThread
{
Expand Down
189 changes: 189 additions & 0 deletions translations/fahrplan_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,195 @@ Von der Fahrplan-App hinzugefügt. Bitte überprüfen Sie diese Informationen vo
<translation>Salzburg</translation>
</message>
</context>
<context>
<name>ParserSearchCH</name>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="223"/>
<source>All</source>
<translation>Alle</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="224"/>
<source>Train</source>
<translation>Zug</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="225"/>
<source>Tram</source>
<translation>Tram</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="226"/>
<location filename="../src/parser/parser_search_ch.cpp" line="482"/>
<source>Ship</source>
<translation>Schiff</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="227"/>
<location filename="../src/parser/parser_search_ch.cpp" line="646"/>
<source>Bus</source>
<translation>Bus</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="228"/>
<source>Cableway</source>
<translation>Seilbahn</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="375"/>
<location filename="../src/parser/parser_search_ch.cpp" line="377"/>
<source>Train station</source>
<translation>Bahnhof</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="379"/>
<source>Tram stop</source>
<translation>Tramhaltestelle</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="381"/>
<source>Port</source>
<translation>Hafen</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="383"/>
<source>Bus stop</source>
<translation>Bushaltestelle</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="385"/>
<location filename="../src/parser/parser_search_ch.cpp" line="484"/>
<source>Funicular</source>
<translation>Standseilbahn</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="387"/>
<location filename="../src/parser/parser_search_ch.cpp" line="488"/>
<source>Gondola</source>
<translation>Gondel</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="389"/>
<location filename="../src/parser/parser_search_ch.cpp" line="486"/>
<source>Cablecar</source>
<translation>Seilbahn</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="410"/>
<location filename="../src/parser/parser_search_ch.cpp" line="562"/>
<location filename="../src/parser/parser_search_ch.cpp" line="763"/>
<source>Cannot parse reply from the server</source>
<translation>Kann Antwort vom Server nicht verarbeiten</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="499"/>
<location filename="../src/parser/parser_search_ch.cpp" line="501"/>
<location filename="../src/parser/parser_search_ch.cpp" line="648"/>
<location filename="../src/parser/parser_search_ch.cpp" line="650"/>
<location filename="../src/parser/parser_search_ch.cpp" line="652"/>
<source>Bus %1</source>
<translation>Bus %1</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="503"/>
<location filename="../src/parser/parser_search_ch.cpp" line="654"/>
<source>Tram %1</source>
<translation>Tram %1</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="548"/>
<source>Cancelled</source>
<translation>Ausfall</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="550"/>
<location filename="../src/parser/parser_search_ch.cpp" line="698"/>
<source>Departure delayed: %1&apos;</source>
<translation>Abfahrtsverspätung: %1&apos;</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="669"/>
<location filename="../src/parser/parser_search_ch.cpp" line="689"/>
<source>Track %1</source>
<translation>Gleis %1</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="696"/>
<source>Train cancelled</source>
<translation>Zugausfall</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="804"/>
<source>No journey details found.</source>
<translation>Verbindungsdetails nicht gefunden.</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.h" line="62"/>
<source>Switzerland</source>
<translation>Schweiz</translation>
</message>
</context>
<context>
<name>parser_search_ch::JourneyConnection</name>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="154"/>
<source>Walk</source>
<translation>Fussweg</translation>
</message>
</context>
<context>
<name>parser_search_ch::JourneySearchResult</name>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="191"/>
<source>Arrivals %1</source>
<translation>Ankünfte %1</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="193"/>
<source>Departures %1</source>
<translation>Abfahrten %1</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="196"/>
<source>ddd MMM d, HH:mm</source>
<translation>ddd MMM d, HH:mm</translation>
</message>
</context>
<context>
<name>parser_search_ch::TrainTypeList</name>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="52"/>
<location filename="../src/parser/parser_search_ch.cpp" line="54"/>
<source>Bus</source>
<translation>Bus</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="56"/>
<source>Tram</source>
<translation>Tram</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="58"/>
<source>Funi</source>
<translation>Funi</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="60"/>
<source>Gondola</source>
<translation>Gondel</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="62"/>
<source>Cableway</source>
<translation>Seilbahn</translation>
</message>
<message>
<location filename="../src/parser/parser_search_ch.cpp" line="64"/>
<source>Ship</source>
<translation>Schiff</translation>
</message>
<message>
</context>
<context>
<name>ParserSydneyEFA</name>
<message>
Expand Down

0 comments on commit 2ed54f5

Please sign in to comment.