Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/mn 616/damage type i18n #844

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/common/README/INTERNATIONALIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
67 changes: 67 additions & 0 deletions packages/common/src/i18n/translations/damageTypes.ts
Original file line number Diff line number Diff line change
@@ -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, TranslationObject> = {
[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',
},
};
1 change: 1 addition & 0 deletions packages/common/src/i18n/translations/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './damageTypes';
export * from './vehicleParts';
export * from './image';
1 change: 0 additions & 1 deletion packages/sentry/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ export class SentryMonitoringAdapter extends DebugMonitoringAdapter implements M
}

override setUserId(id: string): void {
console.log('Hello');
Sentry.setUser({ id });
}

Expand Down