Skip to content

Commit

Permalink
Improve tranlations on en.json and no.json files
Browse files Browse the repository at this point in the history
  • Loading branch information
mrica-equinor committed Jan 26, 2024
1 parent 867bb73 commit 70e8762
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,14 @@ const PressureDialog = ({ setIsCheckConfirmed, robot, deckName }: CheckDialogPro
) {
statusText = `${TranslateText('The current pressure level is')} ${
robot.pressureLevel * 1000
} ${TranslateText('which is within the suggested range')}`
} ${TranslateText('which is within the specified range')}`
} else {
statusText = `${TranslateText('Warning')}: ${TranslateText('The current pressure level is')} ${
robot.pressureLevel * 1000
} ${TranslateText('which is NOT within the suggested range')}`
} ${TranslateText('which is NOT within the specified range')}`
}
} else {
statusText = TranslateText(
'The pressure measurement is not currently available, so start the mission at your own risk.'
)
statusText = TranslateText('Pressure measurement currently unavailable, proceed with caution.')
}

return (
Expand All @@ -91,9 +89,9 @@ const PressureDialog = ({ setIsCheckConfirmed, robot, deckName }: CheckDialogPro
<Dialog.Content>
<VerticalContent>
<Typography>
{`${robot.name} (${robot.model.type}) ${TranslateText(
'needs to be have a pressure level of between'
)} ${robot.model.lowerPressureWarningThreshold}
{`${robot.name} (${robot.model.type}) ${TranslateText('must have a pressure level between')} ${
robot.model.lowerPressureWarningThreshold
}
${TranslateText('and')} ${robot.model.upperPressureWarningThreshold} `}
<b>{TranslateText('before')}</b>
{` ${TranslateText('clicking confirm')}. `}
Expand All @@ -106,7 +104,7 @@ const PressureDialog = ({ setIsCheckConfirmed, robot, deckName }: CheckDialogPro
/>
<Typography>
{`${TranslateText('I confirm that')} ${robot.name} (${robot.model.type}) ${TranslateText(
'has a pressure level making it safe for the area it is operating in'
'has a safe pressure level for operation'
)} `}
<b>{deckName}</b>
</Typography>
Expand All @@ -124,17 +122,15 @@ const BatteryDialog = ({ setIsCheckConfirmed, robot, deckName }: CheckDialogProp
if (robot.batteryLevel) {
if (!robot.model.batteryWarningThreshold || robot.batteryLevel > robot.model.batteryWarningThreshold) {
statusText = `${TranslateText('The current battery level is')} ${robot.batteryLevel}
${TranslateText('which is above the suggested minimum')}`
${TranslateText('which is above the specified minimum')}`
} else {
statusText = `${TranslateText('Warning')}: ${TranslateText('The current battery level is')} ${
robot.pressureLevel
}
${TranslateText('which is LOWER than the suggested limit')}`
}
} else {
statusText = TranslateText(
'The battery measurement is not currently available, so start the mission at your own risk.'
)
statusText = TranslateText('Battery measurement is currently unavailable, proceed with caution.')
}

return (
Expand All @@ -146,7 +142,7 @@ const BatteryDialog = ({ setIsCheckConfirmed, robot, deckName }: CheckDialogProp
<VerticalContent>
<Typography>
{`${robot.name} (${robot.model.type}) ${TranslateText(
'needs to be have a battery level greater than'
'must have a battery level greater than'
)} ${robot.model.batteryWarningThreshold} `}
<b>{TranslateText('before')}</b>
{` ${TranslateText('clicking confirm')}. `}
Expand All @@ -159,7 +155,7 @@ const BatteryDialog = ({ setIsCheckConfirmed, robot, deckName }: CheckDialogProp
/>
<Typography>
{`${TranslateText('I confirm that')} ${robot.name} (${robot.model.type}) ${TranslateText(
'has a battery level making it safe for the area it is operating in'
'has a safe battery level for operation'
)} `}
<b>{deckName}</b>
</Typography>
Expand All @@ -176,7 +172,7 @@ const FinalConfirmationDialog = () => {
return (
<>
<Dialog.Header>
<Typography variant="h5">{TranslateText('The robot is ready to run missions')}</Typography>
<Typography variant="h5">{TranslateText('Robot ready to run missions')}</Typography>
</Dialog.Header>
<Dialog.Content>
<VerticalContent>
Expand Down
20 changes: 10 additions & 10 deletions frontend/src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,21 @@
"No predefined missions available": "No predefined missions available",
"No robot available": "No robot available",
"Confirm that you wish to add the selected mission(s) to the robot queue": "Confirm that you wish to add the selected mission(s) to the robot queue",
"The robot is ready to run missions": "The robot is ready to run missions",
"The pressure measurement is not currently available, so start the mission at your own risk.": "The pressure measurement is not currently available, so start the mission at your own risk.",
"Robot ready to run missions": "Robot ready to run missions",
"Pressure measurement currently unavailable, proceed with caution.": "Pressure measurement currently unavailable, proceed with caution.",
"Confirm pressure level of robot": "Confirm pressure level of robot",
"needs to be have a pressure level of between": "needs to be have a pressure level of between",
"must have a pressure level between": "must have a pressure level between",
"and": "and",
"The battery measurement is not currently available, so start the mission at your own risk.": "The battery measurement is not currently available, so start the mission at your own risk.",
"has a pressure level making it safe for the area it is operating in": "has a pressure level making it safe for the area it is operating in",
"has a battery level making it safe for the area it is operating in": "has a battery level making it safe for the area it is operating in",
"needs to be have a battery level greater than": "needs to be have a battery level greater than",
"Battery measurement is currently unavailable, proceed with caution.": "Battery measurement is currently unavailable, proceed with caution.",
"has a safe pressure level for operation": "has a safe pressure level for operation",
"has a safe battery level for operation": "has a safe battery level for operation",
"must have a battery level greater than": "must have a battery level greater than",
"Confirm battery level of robot": "Confirm battery level of robot",
"The current pressure level is": "The current pressure level is",
"which is within the suggested range": "which is within the suggested range",
"which is within the specified range": "which is within the specified range",
"Warning": "Warning",
"which is NOT within the suggested range": "which is NOT within the suggested range",
"which is NOT within the specified range": "which is NOT within the specified range",
"The current battery level is": "The current battery level is",
"which is above the suggested minimum": "which is above the suggested minimum",
"which is above the specified minimum": "which is above the specified minimum",
"Failed to schedule mission ": "Failed to schedule mission "
}
20 changes: 10 additions & 10 deletions frontend/src/language/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,21 @@
"No predefined missions available": "Ingen tilgjengelige forhåndsdefinerte oppdrag",
"No robot available": "Ingen robot tilgjengelig",
"Confirm that you wish to add the selected mission(s) to the robot queue": "Bekreft at du ønsker å legge til de valgte oppdragene i robot køen",
"The robot is ready to run missions": "Roboten er klar til å kjøre oppdrag",
"The pressure measurement is not currently available, so start the mission at your own risk.": "Trykkmålingen er ikke tilgjengelig, så start oppdraget på egen risiko.",
"Robot ready to run missions": "Robot klar til å kjøre oppdrag",
"Pressure measurement currently unavailable, proceed with caution.": "Trykkmåling ikke tilgjengelig, vær klar over risikoen det medfører.",
"Confirm pressure level of robot": "Bekreft trykknivået til roboten",
"needs to be have a pressure level of between": "trenger å ha et trykknivå mellom",
"must have a pressure level between": " ha et trykknivå mellom",
"and": "og",
"The battery measurement is not currently available, so start the mission at your own risk.": "Batterimålingen er ikke tilgjengelig, så start oppdraget på egen risiko.",
"has a pressure level making it safe for the area it is operating in": "har et trykkinivå som gjør det trykt i området den kjører i",
"has a battery level making it safe for the area it is operating in": "har et batterinivå som gjør det trykt i området den kjører i",
"needs to be have a battery level greater than": "trenger å ha et batterinivå større enn",
"Battery measurement is currently unavailable, proceed with caution.": "Batterimåling ikke tilgjengelig, vær klar over risikoen det medfører.",
"has a safe pressure level for operation": "har et tilfredstillende trykkinivå",
"has a safe battery level for operation": "har et tilfredstillende batterinivå",
"must have a battery level greater than": " ha et batterinivå større enn",
"Confirm battery level of robot": "Bekreft batterinivået til roboten",
"The current pressure level is": "Trykknivået er nå",
"which is within the suggested range": "som er innenfor den anbefalte rekkevidden",
"which is within the specified range": "som er tilfredstillende",
"Warning": "Advarsel",
"which is NOT within the suggested range": "som IKKE er innenfor den anbefalte rekkevidden",
"which is NOT within the specified range": "som IKKE er tilfredstillende",
"The current battery level is": "Batterinivået er",
"which is above the suggested minimum": "som er mer enn anbefalt minimum",
"which is above the specified minimum": "som er høyere enn anbefalt minimum",
"Failed to schedule mission ": "Kunne ikke planlegge oppdrag "
}

0 comments on commit 70e8762

Please sign in to comment.