File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
components/parameters/common/limitreductions Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 5
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
*/
7
7
8
- import { FormattedMessage } from 'react-intl' ;
8
+ import { FormattedMessage , useIntl } from 'react-intl' ;
9
9
import { ITemporaryLimitReduction } from './columns-definitions' ;
10
10
11
11
type LimitReductionsLabelColumnProps = {
12
12
limits : ITemporaryLimitReduction ;
13
13
} ;
14
14
15
15
export function LimitReductionsToolTipColumn ( { limits } : Readonly < LimitReductionsLabelColumnProps > ) {
16
+ const intl = useIntl ( ) ;
16
17
const lowBound = `${ Math . trunc ( limits . limitDuration . lowBound / 60 ) } min` ;
17
18
const highBoundValue = Math . trunc ( limits . limitDuration . highBound / 60 ) ;
18
19
const highBound = highBoundValue === 0 ? '∞' : `${ Math . trunc ( limits . limitDuration . highBound / 60 ) } min` ;
19
- const lowerBoundClosed = limits . limitDuration . lowClosed ? '[' : ']' ;
20
- const higherBoundClosed = limits . limitDuration . highClosed || null ? ']' : '[' ;
20
+ const lowerBoundClosed = limits . limitDuration . lowClosed ? '[' : intl . formatMessage ( { id : 'leftOpenBracket' } ) ;
21
+ const higherBoundClosed =
22
+ limits . limitDuration . highClosed || null ? ']' : intl . formatMessage ( { id : 'rightOpenBracket' } ) ;
21
23
return (
22
24
< FormattedMessage
23
25
id = "LimitDurationInterval"
Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ export const parametersEn = {
61
61
LimitVoltageAfterIST : 'Between PATL and TATL{highBound}' ,
62
62
LimitDurationInterval : 'Duration {lowerBoundClosed}{lowBound}, {highBound}{higherBoundClosed}' ,
63
63
voltageRange : 'Voltage range' ,
64
- VoltageRangeInterval : 'Voltage interval ]{lowBound} kV,{highBound} kV]' ,
64
+ VoltageRangeInterval : 'Voltage interval ({lowBound} kV, {highBound} kV]' ,
65
+ leftOpenBracket : '(' ,
66
+ rightOpenBracket : ')' ,
65
67
66
68
Provider : 'Provider' ,
67
69
LimitReduction : 'Limit reduction' ,
Original file line number Diff line number Diff line change @@ -61,9 +61,11 @@ export const parametersFr = {
61
61
IST : 'IST' ,
62
62
LimitVoltageInterval : 'Entre IT{lowBound} et IT{highBound}' ,
63
63
LimitVoltageAfterIST : 'Entre IST et IT{highBound}' ,
64
- LimitDurationInterval : 'Tempo {lowerBoundClosed}{lowBound}, {highBound}{higherBoundClosed}' ,
64
+ LimitDurationInterval : 'Tempo {lowerBoundClosed}{lowBound}; {highBound}{higherBoundClosed}' ,
65
65
voltageRange : 'Niveau de tension' ,
66
- VoltageRangeInterval : 'Plage de tension ]{lowBound} kV,{highBound} kV]' ,
66
+ VoltageRangeInterval : 'Plage de tension ]{lowBound} kV; {highBound} kV]' ,
67
+ leftOpenBracket : ']' ,
68
+ rightOpenBracket : '[' ,
67
69
68
70
Provider : 'Simulateur' ,
69
71
LimitReduction : 'Abattement des seuils' ,
You can’t perform that action at this time.
0 commit comments