Skip to content

Commit

Permalink
Feat/mn 616/damage type i18n (#844)
Browse files Browse the repository at this point in the history
* Removed console log added by mistake in the SentryMonitoringAdapter class

* Added translations for damage types
  • Loading branch information
souyahia-monk authored Sep 11, 2024
1 parent 3328f9e commit 0892aa0
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
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';

0 comments on commit 0892aa0

Please sign in to comment.