Merge pull request #4647 from Tainan404/translate-slide-option
Add localization for slides options
This commit is contained in:
commit
697f178b8f
@ -14,6 +14,10 @@ const intlMessages = defineMessages({
|
|||||||
id: 'app.presentation.presentationToolbar.nextSlideLabel',
|
id: 'app.presentation.presentationToolbar.nextSlideLabel',
|
||||||
description: 'Next slide button label',
|
description: 'Next slide button label',
|
||||||
},
|
},
|
||||||
|
goToSlide: {
|
||||||
|
id: 'app.presentation.presentationToolbar.goToSlide',
|
||||||
|
description: 'button for slide select',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
class PresentationToolbar extends Component {
|
class PresentationToolbar extends Component {
|
||||||
@ -114,22 +118,6 @@ class PresentationToolbar extends Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static renderSkipSlideOpts(numberOfSlides) {
|
|
||||||
// Fill drop down menu with all the slides in presentation
|
|
||||||
const optionList = [];
|
|
||||||
for (let i = 1; i <= numberOfSlides; i += 1) {
|
|
||||||
optionList.push(
|
|
||||||
<option
|
|
||||||
value={i}
|
|
||||||
key={i}
|
|
||||||
>
|
|
||||||
Slide {i}
|
|
||||||
</option>,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return optionList;
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -153,6 +141,24 @@ class PresentationToolbar extends Component {
|
|||||||
fitToScreenValue: 'not_implemented_yet',
|
fitToScreenValue: 'not_implemented_yet',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
renderSkipSlideOpts(numberOfSlides) {
|
||||||
|
// Fill drop down menu with all the slides in presentation
|
||||||
|
const { intl } = this.props;
|
||||||
|
const optionList = [];
|
||||||
|
for (let i = 1; i <= numberOfSlides; i += 1) {
|
||||||
|
optionList.push((
|
||||||
|
<option
|
||||||
|
value={i}
|
||||||
|
key={i}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
intl.formatMessage(intlMessages.goToSlide, { 0: i })
|
||||||
|
}
|
||||||
|
</option>));
|
||||||
|
}
|
||||||
|
|
||||||
|
return optionList;
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
@ -170,9 +176,9 @@ class PresentationToolbar extends Component {
|
|||||||
aria-labelledby="prevSlideLabel"
|
aria-labelledby="prevSlideLabel"
|
||||||
aria-describedby="prevSlideDesc"
|
aria-describedby="prevSlideDesc"
|
||||||
disabled={!(currentSlideNum > 1)}
|
disabled={!(currentSlideNum > 1)}
|
||||||
color={'default'}
|
color="default"
|
||||||
icon={'left_arrow'}
|
icon="left_arrow"
|
||||||
size={'md'}
|
size="md"
|
||||||
onClick={actions.previousSlideHandler}
|
onClick={actions.previousSlideHandler}
|
||||||
label={intl.formatMessage(intlMessages.previousSlideLabel)}
|
label={intl.formatMessage(intlMessages.previousSlideLabel)}
|
||||||
hideLabel
|
hideLabel
|
||||||
@ -189,16 +195,16 @@ class PresentationToolbar extends Component {
|
|||||||
onChange={actions.skipToSlideHandler}
|
onChange={actions.skipToSlideHandler}
|
||||||
className={styles.skipSlide}
|
className={styles.skipSlide}
|
||||||
>
|
>
|
||||||
{PresentationToolbar.renderSkipSlideOpts(numberOfSlides)}
|
{this.renderSkipSlideOpts(numberOfSlides)}
|
||||||
</select>
|
</select>
|
||||||
<Button
|
<Button
|
||||||
role="button"
|
role="button"
|
||||||
aria-labelledby="nextSlideLabel"
|
aria-labelledby="nextSlideLabel"
|
||||||
aria-describedby="nextSlideDesc"
|
aria-describedby="nextSlideDesc"
|
||||||
disabled={!(currentSlideNum < numberOfSlides)}
|
disabled={!(currentSlideNum < numberOfSlides)}
|
||||||
color={'default'}
|
color="default"
|
||||||
icon={'right_arrow'}
|
icon="right_arrow"
|
||||||
size={'md'}
|
size="md"
|
||||||
onClick={actions.nextSlideHandler}
|
onClick={actions.nextSlideHandler}
|
||||||
label={intl.formatMessage(intlMessages.nextSlideLabel)}
|
label={intl.formatMessage(intlMessages.nextSlideLabel)}
|
||||||
hideLabel
|
hideLabel
|
||||||
@ -256,7 +262,6 @@ class PresentationToolbar extends Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PresentationToolbar.propTypes = {
|
PresentationToolbar.propTypes = {
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
"app.presentation.presentationToolbar.fitScreenDesc": "Display the whole slide",
|
"app.presentation.presentationToolbar.fitScreenDesc": "Display the whole slide",
|
||||||
"app.presentation.presentationToolbar.zoomLabel": "Zoom",
|
"app.presentation.presentationToolbar.zoomLabel": "Zoom",
|
||||||
"app.presentation.presentationToolbar.zoomDesc": "Change the zoom level of the presentation",
|
"app.presentation.presentationToolbar.zoomDesc": "Change the zoom level of the presentation",
|
||||||
|
"app.presentation.presentationToolbar.goToSlide":"Slide {0}",
|
||||||
"app.presentationUploder.title": "Presentation",
|
"app.presentationUploder.title": "Presentation",
|
||||||
"app.presentationUploder.message": "As a presenter in BigBlueButton, you have the ability of uploading any office document or PDF file. We recommend for the best results, to please upload a PDF file.",
|
"app.presentationUploder.message": "As a presenter in BigBlueButton, you have the ability of uploading any office document or PDF file. We recommend for the best results, to please upload a PDF file.",
|
||||||
"app.presentationUploder.confirmLabel": "Start",
|
"app.presentationUploder.confirmLabel": "Start",
|
||||||
|
Loading…
Reference in New Issue
Block a user