proximiio-js-library 1.17.1 → 1.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -203,12 +203,22 @@ export default class GuidanceStepsGenerator {
203
203
  return '';
204
204
  const t = translations[this.language];
205
205
  if (direction === 'FINISH') {
206
- return [
207
- this.capitalize(t.IN),
208
- step.totalDistance ? step.totalDistance.toFixed(0) : 0,
209
- t.METERS,
210
- this.getDirectionInstruction(direction),
211
- ].join(' ');
206
+ if (this.language === 'fi') {
207
+ return [
208
+ step.totalDistance ? step.totalDistance.toFixed(0) : 0,
209
+ t.METERS,
210
+ this.capitalize(t.IN),
211
+ this.getDirectionInstruction(direction),
212
+ ].join(' ');
213
+ }
214
+ else {
215
+ return [
216
+ this.capitalize(t.IN),
217
+ step.totalDistance ? step.totalDistance.toFixed(0) : 0,
218
+ t.METERS,
219
+ this.getDirectionInstruction(direction),
220
+ ].join(' ');
221
+ }
212
222
  }
213
223
  const floorName = ((_a = step.destinationFloor) === null || _a === void 0 ? void 0 : _a.name)
214
224
  ? getFloorName({ floor: step.destinationFloor, language: this.language })
@@ -238,20 +248,40 @@ export default class GuidanceStepsGenerator {
238
248
  return this.getDirectionInstruction(direction);
239
249
  }
240
250
  if (direction === Direction.Finish) {
241
- return [
242
- this.capitalize(t.IN),
243
- distanceFromLastStep.toFixed(0),
244
- t.METERS + ',',
245
- this.getDirectionInstruction(direction),
246
- ].join(' ');
251
+ if (this.language === 'fi') {
252
+ return [
253
+ step.totalDistance ? step.totalDistance.toFixed(0) : 0,
254
+ t.METERS,
255
+ this.capitalize(t.IN),
256
+ this.getDirectionInstruction(direction),
257
+ ].join(' ');
258
+ }
259
+ else {
260
+ return [
261
+ this.capitalize(t.IN),
262
+ step.totalDistance ? step.totalDistance.toFixed(0) : 0,
263
+ t.METERS,
264
+ this.getDirectionInstruction(direction),
265
+ ].join(' ');
266
+ }
247
267
  }
248
268
  if (distanceFromLastStep > 0) {
249
- return [
250
- this.capitalize(t.IN),
251
- distanceFromLastStep.toFixed(0),
252
- t.METERS + ',',
253
- this.getDirectionInstruction(direction),
254
- ].join(' ');
269
+ if (this.language === 'fi') {
270
+ return [
271
+ step.totalDistance ? step.totalDistance.toFixed(0) : 0,
272
+ t.METERS,
273
+ this.capitalize(t.IN),
274
+ this.getDirectionInstruction(direction),
275
+ ].join(' ');
276
+ }
277
+ else {
278
+ return [
279
+ this.capitalize(t.IN),
280
+ step.totalDistance ? step.totalDistance.toFixed(0) : 0,
281
+ t.METERS,
282
+ this.getDirectionInstruction(direction),
283
+ ].join(' ');
284
+ }
255
285
  }
256
286
  if (this.levelChangersSteps && step.levelChangerId) {
257
287
  return this.generateLevelChangerStepInstruction({ step, t });
@@ -65,8 +65,8 @@ export const translations = {
65
65
  DOWN: 'alas',
66
66
  TO_FLOOR: 'kerrokseen',
67
67
  YOU_ARE_HERE: 'Olet täällä',
68
- IN: 'sisään',
69
- METERS: 'metriä',
68
+ IN: 'päästä',
69
+ METERS: 'metrin',
70
70
  START: 'Matkasi alku.',
71
71
  DESTINATION: 'saavut määränpäähäsi.',
72
72
  STRAIGHT: 'jatka suoraan.',