Add i18n and fix method declaration
Add i18n entries for rotating images; fix the way `getName` is defined Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
This commit is contained in:
parent
9bd1ba60f5
commit
1cbbe5f31f
2 changed files with 6 additions and 4 deletions
|
@ -88,13 +88,13 @@ export default class ImageView extends React.Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
getName = () => {
|
getName() {
|
||||||
let name = this.props.name;
|
let name = this.props.name;
|
||||||
if (name && this.props.link) {
|
if (name && this.props.link) {
|
||||||
name = <a href={ this.props.link } target="_blank" rel="noopener">{ name }</a>;
|
name = <a href={ this.props.link } target="_blank" rel="noopener">{ name }</a>;
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
};
|
}
|
||||||
|
|
||||||
rotateCounterClockwise = () => {
|
rotateCounterClockwise = () => {
|
||||||
const cur = this.state.rotationDegrees;
|
const cur = this.state.rotationDegrees;
|
||||||
|
@ -196,10 +196,10 @@ export default class ImageView extends React.Component {
|
||||||
<div className="mx_ImageView_labelWrapper">
|
<div className="mx_ImageView_labelWrapper">
|
||||||
<div className="mx_ImageView_label">
|
<div className="mx_ImageView_label">
|
||||||
<AccessibleButton className="mx_ImageView_rotateCounterClockwise" onClick={ this.rotateCounterClockwise }>
|
<AccessibleButton className="mx_ImageView_rotateCounterClockwise" onClick={ this.rotateCounterClockwise }>
|
||||||
<img src={require("../../../../res/img/rotate-ccw.svg")} alt={ 'Rotate counter-clockwise' } width="18" height="18" />
|
<img src={require("../../../../res/img/rotate-ccw.svg")} alt={ _t('Rotate counter-clockwise') } width="18" height="18" />
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
<AccessibleButton className="mx_ImageView_rotateClockwise" onClick={ this.rotateClockwise }>
|
<AccessibleButton className="mx_ImageView_rotateClockwise" onClick={ this.rotateClockwise }>
|
||||||
<img src={require("../../../../res/img/rotate-cw.svg")} alt={ 'Rotate clockwise' } width="18" height="18" />
|
<img src={require("../../../../res/img/rotate-cw.svg")} alt={ _t('Rotate clockwise') } width="18" height="18" />
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
<AccessibleButton className="mx_ImageView_cancel" onClick={ this.props.onFinished }>
|
<AccessibleButton className="mx_ImageView_cancel" onClick={ this.props.onFinished }>
|
||||||
<img src={require("../../../../res/img/cancel-white.svg")} width="18" height="18" alt={ _t('Close') } />
|
<img src={require("../../../../res/img/cancel-white.svg")} width="18" height="18" alt={ _t('Close') } />
|
||||||
|
|
|
@ -958,6 +958,8 @@
|
||||||
"Home": "Home",
|
"Home": "Home",
|
||||||
"You cannot delete this image. (%(code)s)": "You cannot delete this image. (%(code)s)",
|
"You cannot delete this image. (%(code)s)": "You cannot delete this image. (%(code)s)",
|
||||||
"Uploaded on %(date)s by %(user)s": "Uploaded on %(date)s by %(user)s",
|
"Uploaded on %(date)s by %(user)s": "Uploaded on %(date)s by %(user)s",
|
||||||
|
"Rotate counter-clockwise": "Rotate counter-clockwise",
|
||||||
|
"Rotate clockwise": "Rotate clockwise",
|
||||||
"Download this file": "Download this file",
|
"Download this file": "Download this file",
|
||||||
"Integrations Error": "Integrations Error",
|
"Integrations Error": "Integrations Error",
|
||||||
"Manage Integrations": "Manage Integrations",
|
"Manage Integrations": "Manage Integrations",
|
||||||
|
|
Loading…
Reference in a new issue