Rename hiking-beta profile to hiking-mountain
- remove " (beta)" in locale text, stick to plain "Hiking" as long as we have only one and base parameters stay the same - map hash for old URLs
This commit is contained in:
parent
84fa50b5c2
commit
5cc64015b9
4 changed files with 17 additions and 4 deletions
|
|
@ -54,9 +54,14 @@
|
||||||
'vm-forum-velomobil-schnell',
|
'vm-forum-velomobil-schnell',
|
||||||
'fastbike-lowtraffic',
|
'fastbike-lowtraffic',
|
||||||
'fastbike-asia-pacific',
|
'fastbike-asia-pacific',
|
||||||
'hiking-beta',
|
'hiking-mountain',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Map old, renamed legacy profile to new name (from hash of shared or bookmarked URLs)
|
||||||
|
BR.conf.profilesRename = {
|
||||||
|
'hiking-beta': 'hiking-mountain',
|
||||||
|
};
|
||||||
|
|
||||||
// Removes default base layers when 'true'. Useful for only having custom layers (see below).
|
// Removes default base layers when 'true'. Useful for only having custom layers (see below).
|
||||||
BR.conf.clearBaseLayers = false;
|
BR.conf.clearBaseLayers = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ L.BRouter = L.Class.extend({
|
||||||
opts.alternative = params.alternativeidx;
|
opts.alternative = params.alternativeidx;
|
||||||
}
|
}
|
||||||
if (params.profile) {
|
if (params.profile) {
|
||||||
opts.profile = params.profile;
|
opts.profile = this._parseProfile(params.profile);
|
||||||
}
|
}
|
||||||
if (params.pois) {
|
if (params.pois) {
|
||||||
opts.pois = this._parseLonLatNames(params.pois);
|
opts.pois = this._parseLonLatNames(params.pois);
|
||||||
|
|
@ -498,6 +498,14 @@ L.BRouter = L.Class.extend({
|
||||||
return nogos;
|
return nogos;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_parseProfile: function (profile) {
|
||||||
|
if (BR.conf.profilesRename?.[profile]) {
|
||||||
|
return BR.conf.profilesRename[profile];
|
||||||
|
}
|
||||||
|
|
||||||
|
return profile;
|
||||||
|
},
|
||||||
|
|
||||||
// formats L.LatLng object as lng,lat string
|
// formats L.LatLng object as lng,lat string
|
||||||
_formatLatLng: function (latLng) {
|
_formatLatLng: function (latLng) {
|
||||||
var s = '';
|
var s = '';
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@
|
||||||
"fastbike": "Fastbike",
|
"fastbike": "Fastbike",
|
||||||
"fastbike-asia-pacific": "Fastbike (Asia Pacific)",
|
"fastbike-asia-pacific": "Fastbike (Asia Pacific)",
|
||||||
"fastbike-lowtraffic": "Fastbike (low traffic)",
|
"fastbike-lowtraffic": "Fastbike (low traffic)",
|
||||||
"hiking-beta": "Hiking (beta)",
|
"hiking-mountain": "Hiking",
|
||||||
"moped": "Moped",
|
"moped": "Moped",
|
||||||
"rail": "Rail",
|
"rail": "Rail",
|
||||||
"river": "River",
|
"river": "River",
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ i18next.t('navbar.profile.fastbike');
|
||||||
i18next.t('navbar.profile.fastbike-asia-pacific');
|
i18next.t('navbar.profile.fastbike-asia-pacific');
|
||||||
i18next.t('navbar.profile.fastbike-asia-pacific');
|
i18next.t('navbar.profile.fastbike-asia-pacific');
|
||||||
i18next.t('navbar.profile.fastbike-lowtraffic');
|
i18next.t('navbar.profile.fastbike-lowtraffic');
|
||||||
i18next.t('navbar.profile.hiking-beta');
|
i18next.t('navbar.profile.hiking-mountain');
|
||||||
i18next.t('navbar.profile.moped');
|
i18next.t('navbar.profile.moped');
|
||||||
i18next.t('navbar.profile.rail');
|
i18next.t('navbar.profile.rail');
|
||||||
i18next.t('navbar.profile.river');
|
i18next.t('navbar.profile.river');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue