Skip to content

Commit

Permalink
Merge pull request sap-labs-france#572 from sap-labs-france/connector…
Browse files Browse the repository at this point in the history
…_types

Added missing connector types
  • Loading branch information
LucasBrazi06 authored Nov 29, 2021
2 parents 33f7758 + 47fb14c commit 867827b
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 27 deletions.
9 changes: 6 additions & 3 deletions src/I18n/languages/cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@
"finishing": "Dokončování",
"unknown": "Není známo",
"type2": "Typ 2",
"comboCCS": "Combo",
"chademo": "Chademo",
"domestic": "Domácí"
"comboCCS": "Type 2 - Combo CCS",
"type1": "Type 1",
"chademo": "CHAdeMo",
"domestic": "Domácí",
"type1CCS": "Type 1 - Combo CCS",
"type3C": "Type 3C"
},
"tags": {
"visualID": "Visual ID",
Expand Down
9 changes: 6 additions & 3 deletions src/I18n/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@
"finishing": "Vollendung",
"unknown": "Unbekannt",
"type2": "Type 2",
"comboCCS": "Kombo",
"chademo": "Chademo",
"domestic": "Hausanschluss"
"comboCCS": "Type 2 - kombo CCS",
"type1": "Type 1",
"chademo": "CHAdeMo",
"domestic": "Hausanschluss",
"type1CCS": "Type 1 - Kombo CCS",
"type3C": "Type 3C"
},
"tags": {
"visualID": "Visual ID",
Expand Down
9 changes: 6 additions & 3 deletions src/I18n/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@
"finishing": "Finishing",
"unknown": "Unknown",
"type2": "Type 2",
"comboCCS": "Combo",
"chademo": "Chademo",
"domestic": "Domestic"
"comboCCS": "Type 2 - Combo CCS",
"type1": "Type 1",
"chademo": "CHAdeMo",
"domestic": "Domestic",
"type1CCS": "Type 1 - Combo CCS",
"type3C": "Type 3C"
},
"tags": {
"visualID": "Visual ID",
Expand Down
9 changes: 6 additions & 3 deletions src/I18n/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@
"finishing": "Finalizando",
"unknown": "Desconocido",
"type2": "Tipo 2",
"comboCCS": "Combo",
"chademo": "Chademo",
"domestic": "Doméstico"
"comboCCS": "Type 2 - Combo CCS",
"type1": "Type 1",
"chademo": "CHAdeMo",
"domestic": "Doméstico",
"type1CCS": "Type 1 - Combo CCS",
"type3C": "Type 3C"
},
"tags": {
"visualID": "Visual ID",
Expand Down
9 changes: 6 additions & 3 deletions src/I18n/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@
"finishing": "Finalisation",
"unknown": "Unknown",
"type2": "Type 2",
"comboCCS": "Combo",
"chademo": "Chademo",
"domestic": "Domestique"
"comboCCS": "Type 2 - Combo CCS",
"type1": "Type 1",
"chademo": "CHAdeMo",
"domestic": "Domestique",
"type1CCS": "Type 1 - Combo CCS",
"type3C": "Type 3C"
},
"tags": {
"visualID": "ID Visuel",
Expand Down
9 changes: 6 additions & 3 deletions src/I18n/languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@
"finishing": "Finendo",
"unknown": "Sconosciuto",
"type2": "Tipo 2",
"comboCCS": "Combo",
"chademo": "Chademo",
"domestic": "Domestico"
"comboCCS": "Tipo 2 - Combo CCS",
"type1": "Type 1",
"chademo": "CHAdeMo",
"domestic": "Domestico",
"type1CCS": "Tipo 1 - Combo CCS",
"type3C": "Type 3C"
},
"tags": {
"visualID": "Visual ID",
Expand Down
9 changes: 6 additions & 3 deletions src/I18n/languages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@
"finishing": "Encerrando",
"unknown": "Desconhecido",
"type2": "Tipo 2",
"comboCCS": "Combo",
"chademo": "Chademo",
"domestic": "Domestico"
"comboCCS": "Type 2 - Combo CCS",
"type1": "Type 1",
"chademo": "CHAdeMo",
"domestic": "Domestico",
"type1CCS": "Type 1 - Combo CCS",
"type3C": "Type 3C"
},
"tags": {
"visualID": "Visual ID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Domestic from '../../../../assets/connectorType/domestic-ue.svg';
import NoConnector from '../../../../assets/connectorType/no-connector.svg';
import Type1CCS from '../../../../assets/connectorType/type1-ccs.svg';
import Type1 from '../../../../assets/connectorType/type1.svg';
import Type3C from '../../../../assets/connectorType/type3c.svg';
import Type2 from '../../../../assets/connectorType/type2.svg';
import I18nManager from '../../../I18n/I18nManager';
import BaseProps from '../../../types/BaseProps';
Expand Down Expand Up @@ -190,25 +191,29 @@ export default class ChargingStationConnectorComponent extends React.Component<P
switch (connectorType) {
case ConnectorType.CHADEMO:
return (
<Chademo width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="30" />
<Chademo width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="20%" />
);
case ConnectorType.TYPE_2:
return (
<Type2 width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="10" />
<Type2 width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="8%" />
);
case ConnectorType.COMBO_CCS:
return (
<ComboCCS width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="30" />
<ComboCCS width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="20%" />
);
case ConnectorType.DOMESTIC:
return <Domestic width={style.connectorSVG.width} height={style.connectorSVG.height} fill={commonColor.textColor} />;
return <Domestic width={style.connectorSVG.width} height={style.connectorSVG.height} fill={commonColor.textColor} strokeWidth="2%" />;
case ConnectorType.TYPE_1:
return (
<Type1 width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="10" />
<Type1 width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="2%" />
);
case ConnectorType.TYPE_1_CCS:
return (
<Type1CCS width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="10" />
<Type1CCS width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="2%" />
);
case ConnectorType.TYPE_3C:
return (
<Type3C width={style.connectorSVG.width} height={style.connectorSVG.height} stroke={commonColor.textColor} strokeWidth="2%" />
);
}
return <NoConnector width={style.connectorSVG.width} height={style.connectorSVG.height} fill={commonColor.textColor} />;
Expand Down
1 change: 1 addition & 0 deletions src/types/ChargingStation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export enum ConnectorType {
TYPE_1 = 'T1',
TYPE_1_CCS = 'T1CCS',
DOMESTIC = 'D',
TYPE_3C = 'T3C',
UNKNOWN = 'U'
}

Expand Down
6 changes: 6 additions & 0 deletions src/utils/Utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,12 @@ export default class Utils {
return I18n.t('connector.chademo');
case ConnectorType.DOMESTIC:
return I18n.t('connector.domestic');
case ConnectorType.TYPE_1_CCS:
return I18n.t('connector.type1CCS');
case ConnectorType.TYPE_1:
return I18n.t('connector.type1');
case ConnectorType.TYPE_3C:
return I18n.t('connector.type3C');
default:
return I18n.t('connector.unknown');
}
Expand Down

0 comments on commit 867827b

Please sign in to comment.