Skip to content

Commit

Permalink
Add translation for rounds
Browse files Browse the repository at this point in the history
  • Loading branch information
vtm9 committed Jun 8, 2024
1 parent 03edfba commit 80171aa
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ import capitalize from 'lodash/capitalize';

import mapStagesToTitle from '../../config/mapStagesToTitle';

function StageTitle({ stage, stagesLimit, hideDescription = false }) {
if (stage === stagesLimit - 1) {
return hideDescription ? 'Final' : 'Final stage';
}

if (stage === stagesLimit - 2) {
return hideDescription ? 'Semi-final' : 'Semi-final stage';
}
function StageTitle({ stage, _stagesLimit, hideDescription = false }) {
// TODO: fix tmp translation
//
// if (stage === stagesLimit - 1) {
// return hideDescription ? 'Раунд' : 'Раунд';
// }
//
// if (stage === stagesLimit - 2) {
// return hideDescription ? 'Раунд' : '-final stage';
// }

return hideDescription
? capitalize(mapStagesToTitle[stage])
: `Stage ${mapStagesToTitle[stage] || (stage + 1)}`;
: `Раунд ${(stage + 1)}`;
}

export default memo(StageTitle);

0 comments on commit 80171aa

Please sign in to comment.