Skip to content

Commit df27873

Browse files
committed
simplify
1 parent 1363e0e commit df27873

File tree

4 files changed

+39
-15
lines changed

4 files changed

+39
-15
lines changed

config.js

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,36 @@ const config = {
4646
// E.g. the 'bike' entry will add a "bike" profile for which we send a request with the specified 'details' parameter. You can even change the profile itself when you specify
4747
// bike: { profile: 'raw_bike', ... }
4848

49-
// Certain profiles should not appear in the list as it would be too many. Instead they're listed in the settings but still a 'main' profile needs to be shown.
49+
// You can 'collapse' or group certain profiles to reduce the number of profiles in the panel. Instead they're listed in the settings but still a profile icon is shown.
5050
// profile_group_mapping: {
51-
// car_avoid_motorway: 'car',
52-
// car_avoid_ferry: 'car',
53-
// car_avoid_toll: 'car',
51+
// car: {
52+
// options: [
53+
// { profile: 'car', },
54+
// { profile: 'car_avoid_motorway' },
55+
// { profile: 'car_avoid_ferry' },
56+
// { profile: 'car_avoid_toll' }
57+
// ]
58+
// },
59+
// bike: {
60+
// options: [
61+
// { profile: 'bike' },
62+
// { profile: 'mtb' },
63+
// { profile: 'racingbike' },
64+
// { profile: 'ecargobike' }
65+
// ]
66+
// },
67+
// truck: {
68+
// options: [
69+
// { profile: 'small_truck' },
70+
// { profile: 'truck' }
71+
// ]
72+
// },
73+
// foot: {
74+
// options: [
75+
// { profile: 'foot' },
76+
// { profile: 'hike' }
77+
// ]
78+
// }
5479
// }
5580
}
5681

src/sidebar/SettingsBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function SettingsBox({profile}: { profile: RoutingProfile }) {
2323
return (
2424
<div className={styles.parent}>
2525
{groupName && <span className={styles.groupProfileOptionsHeader}>
26-
{tr(group.settings_tr_key)}
26+
{tr(groupName + "_settings")}
2727
</span>}
2828
{groupName && <div className={styles.settingsTable}>
2929
<div className={styles.groupProfileOptions}>
@@ -33,7 +33,7 @@ export default function SettingsBox({profile}: { profile: RoutingProfile }) {
3333
name={groupName} value={option.profile}
3434
onClick={() => setProfile(option.profile)}/>
3535
<label htmlFor={option.profile}>
36-
{tr(group.settings_tr_key + '_' + option.profile)}
36+
{tr(groupName + '_settings_' + option.profile)}
3737
</label>
3838
</div>
3939
))}

src/stores/QueryStore.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class ProfileGroupMap {
4545
}
4646

4747
export interface ProfileGroup {
48-
readonly settings_tr_key: string
4948
readonly options: { profile: string } []
5049
}
5150

src/translation/tr.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@
9595
"motorcycle":"Motorcycle",
9696
"scooter":"Scooter",
9797
"car_settings":"Route options (Car)",
98-
"car_settings_car":"Default",
99-
"car_settings_car_avoid_ferry":"Avoid Ferry",
100-
"car_settings_car_avoid_motorway":"Avoid Motorway",
101-
"car_settings_car_avoid_toll":"Avoid Toll",
98+
"car_settings_car":"Standard",
99+
"car_settings_car_avoid_ferry":"Avoid Ferries",
100+
"car_settings_car_avoid_motorway":"Avoid Motorways",
101+
"car_settings_car_avoid_toll":"Avoid Tolls",
102102
"truck_settings":"Route options (Truck)",
103103
"truck_settings_truck":"Big Truck",
104104
"truck_settings_small_truck":"Delivery Van",
105105
"foot_settings":"Route options (Foot)",
106-
"foot_settings_foot":"Default",
106+
"foot_settings_foot":"Standard",
107107
"foot_settings_hike":"Hike",
108108
"bike_settings":"Route options (Bike)",
109109
"bike_settings_bike":"Standard",
@@ -1896,9 +1896,9 @@
18961896
"scooter":"Roller",
18971897
"car_settings":"Routenoptionen (Auto)",
18981898
"car_settings_car":"Standard",
1899-
"car_settings_car_avoid_ferry":"Vermeide Fähre",
1900-
"car_settings_car_avoid_motorway":"Vermeide Autobahn",
1901-
"car_settings_car_avoid_toll":"Vermeide Maut",
1899+
"car_settings_car_avoid_ferry":"Fähren vermeiden",
1900+
"car_settings_car_avoid_motorway":"Autobahn vermeiden",
1901+
"car_settings_car_avoid_toll":"Maut vermeiden",
19021902
"truck_settings":"Routenoptionen (LKW)",
19031903
"truck_settings_truck":"Großer LKW",
19041904
"truck_settings_small_truck":"Lieferwagen",

0 commit comments

Comments
 (0)