From cb645de5b7248e72a921f2aa632010f111d8d2e3 Mon Sep 17 00:00:00 2001 From: Samy Ouyahia Date: Tue, 10 Sep 2024 11:23:49 +0200 Subject: [PATCH 1/2] Removed console log added by mistake in the SentryMonitoringAdapter class --- packages/sentry/src/adapter.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/sentry/src/adapter.ts b/packages/sentry/src/adapter.ts index cbc2303cf..7aab1818f 100644 --- a/packages/sentry/src/adapter.ts +++ b/packages/sentry/src/adapter.ts @@ -123,7 +123,6 @@ export class SentryMonitoringAdapter extends DebugMonitoringAdapter implements M } override setUserId(id: string): void { - console.log('Hello'); Sentry.setUser({ id }); } From 002e9f7e8230b13f7bb64008f5bc239f06af1289 Mon Sep 17 00:00:00 2001 From: Samy Ouyahia Date: Wed, 11 Sep 2024 14:52:57 +0200 Subject: [PATCH 2/2] Added translations for damage types --- .../common/README/INTERNATIONALIZATION.md | 2 +- .../src/i18n/translations/damageTypes.ts | 67 +++++++++++++++++++ .../common/src/i18n/translations/index.ts | 1 + 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 packages/common/src/i18n/translations/damageTypes.ts diff --git a/packages/common/README/INTERNATIONALIZATION.md b/packages/common/README/INTERNATIONALIZATION.md index f83d88c16..81c8f7d7c 100644 --- a/packages/common/README/INTERNATIONALIZATION.md +++ b/packages/common/README/INTERNATIONALIZATION.md @@ -30,7 +30,7 @@ This wrapped is used by internal monk SDK to wrap the component with I18nextProv ### Example of usage -```ts +```tsx import i18n from '@monkvision/common'; import { i18nMyComponent } from './i18n'; diff --git a/packages/common/src/i18n/translations/damageTypes.ts b/packages/common/src/i18n/translations/damageTypes.ts new file mode 100644 index 000000000..03141ea54 --- /dev/null +++ b/packages/common/src/i18n/translations/damageTypes.ts @@ -0,0 +1,67 @@ +import { DamageType, TranslationObject } from '@monkvision/types'; + +/** + * The translated labels for each damage type available in the SDK. + */ +export const damageTypeLabels: Record = { + [DamageType.SCRATCH]: { + en: 'Scratch', + fr: 'Rayure', + de: 'Kratzer', + nl: 'Kras', + }, + [DamageType.DENT]: { + en: 'Dent', + fr: 'Bosse', + de: 'Beule', + nl: 'Deuk', + }, + [DamageType.BROKEN_GLASS]: { + en: 'Broken Glass', + fr: 'Bris de glace', + de: 'Zerbrochenes Glas', + nl: 'Gebroken glas', + }, + [DamageType.BROKEN_LIGHT]: { + en: 'Broken Light', + fr: 'Feu cassé', + de: 'Kaputtem Licht', + nl: 'Gebroken licht', + }, + [DamageType.HUBCAP_SCRATCH]: { + en: 'Hubcap Scratch', + fr: 'Enjoliveur rayé', + de: 'Zerkratzte Radkappe', + nl: 'Gebroken wieldop', + }, + [DamageType.MISSING_HUBCAP]: { + en: 'Missing Hubcap', + fr: 'Enjoliveur manquant', + de: 'Fehlende Radkappe', + nl: 'Ontbrekende wieldop', + }, + [DamageType.SMASH]: { + en: 'Smash', + fr: 'Collision', + de: 'Zusammenstoß', + nl: 'Botsing', + }, + [DamageType.BODY_CRACK]: { + en: 'Body Crack', + fr: 'Fissure dans la carrosserie', + de: 'Karosserieriss', + nl: 'Carrosseriescheur', + }, + [DamageType.MISSING_PIECE]: { + en: 'Missing Piece', + fr: 'Pièce manquante', + de: 'Fehlendes Teil', + nl: 'Ontbrekend onderdeel', + }, + [DamageType.RUSTINESS]: { + en: 'Rustiness', + fr: 'Rouille', + de: 'Rostigkeit', + nl: 'Roest', + }, +}; diff --git a/packages/common/src/i18n/translations/index.ts b/packages/common/src/i18n/translations/index.ts index 816acc278..94b4d7462 100644 --- a/packages/common/src/i18n/translations/index.ts +++ b/packages/common/src/i18n/translations/index.ts @@ -1,2 +1,3 @@ +export * from './damageTypes'; export * from './vehicleParts'; export * from './image';