Skip to content

Commit

Permalink
Refactor intl.formatMessage calls for import and copy board dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
RodriSanchez1 committed Aug 26, 2024
1 parent 51fb0a5 commit 13bb6cc
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/components/Board/Board.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,7 @@ export class BoardContainer extends Component {
improvedPhrase,
speak
} = this.props;
const { isCbuilderBoard } = this.state;

if (!this.state.translatedBoard) {
return (
Expand Down Expand Up @@ -1622,11 +1623,19 @@ export class BoardContainer extends Component {
aria-describedby="dialog-copy-desc"
>
<DialogTitle id="dialog-copy-board-title">
{this.props.intl.formatMessage(messages.copyPublicBoardTitle)}
{this.props.intl.formatMessage(
isCbuilderBoard
? messages.importCbuilderBoardTitle
: messages.copyPublicBoardTitle
)}
</DialogTitle>
<DialogContent>
<DialogContentText id="dialog-copy-board-desc">
{this.props.intl.formatMessage(messages.copyPublicBoardDesc)}
{this.props.intl.formatMessage(
isCbuilderBoard
? messages.importCbuilderBoardDesc
: messages.copyPublicBoardDesc
)}
</DialogContentText>
</DialogContent>
<DialogActions>
Expand Down Expand Up @@ -1662,11 +1671,19 @@ export class BoardContainer extends Component {
aria-describedby="dialog-blocked-desc"
>
<DialogTitle id="dialog-blocked-board-title">
{this.props.intl.formatMessage(messages.blockedPrivateBoardTitle)}
{this.props.intl.formatMessage(
isCbuilderBoard
? messages.importCbuilderBoardTitle
: messages.blockedPrivateBoardTitle
)}
</DialogTitle>
<DialogContent>
<DialogContentText id="dialog-blocked-board-desc">
{this.props.intl.formatMessage(messages.blockedPrivateBoardDesc)}
{this.props.intl.formatMessage(
isCbuilderBoard
? messages.loginToImport
: messages.blockedPrivateBoardDesc
)}
</DialogContentText>
</DialogContent>
<DialogActions>
Expand Down

0 comments on commit 13bb6cc

Please sign in to comment.