Skip to content

Commit

Permalink
✨ Add vehicle no. + passenger rights tag (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
jheubuch authored Nov 30, 2023
1 parent 3a537f3 commit c8f3d2c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
14 changes: 14 additions & 0 deletions app/src/main/kotlin/de/hbch/traewelling/api/models/status/Tag.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ enum class TagType {
override val key = "trwl:locomotive_class"
override val example = R.string.tag_locomotive_class_example
},
@SerializedName("trwl:vehicle_number")
VEHICLE_NUMBER {
override val icon = R.drawable.ic_vehicle_number
override val title = R.string.tag_vehicle_number_title
override val key = "trwl:vehicle_number"
override val example = R.string.tag_vehicle_number_example
},
@SerializedName("trwl:wagon_class")
WAGON_CLASS {
override val icon = R.drawable.ic_wagon_class
Expand All @@ -62,6 +69,13 @@ enum class TagType {
override val key = "trwl:role"
override val example = R.string.tag_staff_role_example
},
@SerializedName("trwl:passenger_rights")
PASSENGER_RIGHTS {
override val icon = R.drawable.ic_passenger_claim
override val title = R.string.tag_passenger_rights_title
override val key = "trwl:passenger_rights"
override val example = R.string.tag_passenger_rights_example
},
UNKNOWN {
override val icon = R.drawable.ic_unknown
override val title = R.string.unknown
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_passenger_claim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M14,2H6C4.9,2 4.01,2.9 4.01,4L4,20c0,1.1 0.89,2 1.99,2H18c1.1,0 2,-0.9 2,-2V8L14,2zM15,12h-4v1h3c0.55,0 1,0.45 1,1v3c0,0.55 -0.45,1 -1,1h-1v1h-2v-1H9v-2h4v-1h-3c-0.55,0 -1,-0.45 -1,-1v-3c0,-0.55 0.45,-1 1,-1h1V9h2v1h2V12zM13,8V3.5L17.5,8H13z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_vehicle_number.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C8,2 4,2.5 4,6v9.5C4,17.43 5.57,19 7.5,19L6,20v1h12v-1l-1.5,-1c1.93,0 3.5,-1.57 3.5,-3.5V6C20,2.5 16.42,2 12,2zM8.5,16C7.67,16 7,15.33 7,14.5S7.67,13 8.5,13s1.5,0.67 1.5,1.5S9.33,16 8.5,16zM11,10H6V7h5V10zM15.5,16c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5s1.5,0.67 1.5,1.5S16.33,16 15.5,16zM18,10h-5V7h5V10z"/>
</vector>
8 changes: 6 additions & 2 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,17 @@
<string name="tag_coach_example">z.B. 7</string>
<string name="tag_seat_title">Platz</string>
<string name="tag_seat_example">z.B. 142</string>
<string name="tag_locomotive_class_title">Fahrzeug</string>
<string name="tag_locomotive_class_example">z.B. BR 412, Tz 304 🌈, …</string>
<string name="tag_locomotive_class_title">Baureihe</string>
<string name="tag_locomotive_class_example">z.B. BR 412, 612, …</string>
<string name="tag_vehicle_number_title">Fahrzeugnummer</string>
<string name="tag_vehicle_number_example">z.B. Tz 304 🌈, 633 032/532, …</string>
<string name="tag_wagon_class_title">Wagengattung</string>
<string name="tag_wagon_class_example">z.B. Avmz, Bimmdzf, …</string>
<string name="tag_unknown">Unbekannt</string>
<string name="tag_staff_role_title">Funktion im Dienst</string>
<string name="tag_staff_role_example">Tf, Zf, Gastro, …</string>
<string name="tag_passenger_rights_title">Fahrgastrechte</string>
<string name="tag_passenger_rights_example">z.B. Beantragt, Ausgezahlt, Fall-ID, …</string>
<string name="add_tag">Tag hinzufügen</string>
<string name="edit_tag">Tag bearbeiten</string>
<string name="select_tag_type">Tagart auswählen</string>
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,16 @@
<string name="tag_seat_title">Seat</string>
<string name="tag_seat_example">i.e. 142</string>
<string name="tag_locomotive_class_title">Vehicle class</string>
<string name="tag_locomotive_class_example">i.e. BR 412, Tz 304 🌈, …</string>
<string name="tag_locomotive_class_example">i.e. BR 412, 101, …</string>
<string name="tag_vehicle_number_title">Vehicle number</string>
<string name="tag_vehicle_number_example">i.e. Tz 304 🌈, 633 032/532, …</string>
<string name="tag_wagon_class_title">Wagon class</string>
<string name="tag_wagon_class_example">i.e. Avmz, Bimmdzf, …</string>
<string name="tag_unknown">Unknown</string>
<string name="tag_staff_role_title">Staff role</string>
<string name="tag_staff_role_example">Driver, conductor, …</string>
<string name="tag_passenger_rights_title">Passenger rights claim</string>
<string name="tag_passenger_rights_example">i.e. Requested, paid out, ID of claim, …</string>
<string name="add_tag">Add tag</string>
<string name="edit_tag">Edit tag</string>
<string name="select_tag_type">Select tag type</string>
Expand Down

0 comments on commit c8f3d2c

Please sign in to comment.