Skip to content

Commit

Permalink
Merge pull request #4521 from mananjadhav/fix/edit-button-i18n
Browse files Browse the repository at this point in the history
Added translation for edit button text
  • Loading branch information
Jag96 authored Aug 10, 2021
2 parents 808a307 + d7fcce8 commit 002dc8a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
add: 'Add',
resend: 'Resend',
save: 'Save',
saveChanges: 'Save Changes',
password: 'Password',
profile: 'Profile',
payments: 'Payments',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
add: 'Agregar',
resend: 'Reenviar',
save: 'Guardar',
saveChanges: 'Guardar cambios',
password: 'Contraseña',
profile: 'Perfil',
payments: 'Pagos',
Expand Down
14 changes: 11 additions & 3 deletions src/pages/home/report/ReportActionItemMessageEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import {editReportComment, saveReportActionDraft} from '../../../libs/actions/Re
import {scrollToIndex} from '../../../libs/ReportScrollManager';
import toggleReportActionComposeView from '../../../libs/toggleReportActionComposeView';
import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions';
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize';
import Button from '../../../components/Button';
import ReportActionComposeFocusManager from '../../../libs/ReportActionComposeFocusManager';
import compose from '../../../libs/compose';

const propTypes = {
/** All the data of the action */
Expand All @@ -28,6 +30,9 @@ const propTypes = {

/** Window Dimensions Props */
...windowDimensionsPropTypes,

/** Localization props */
...withLocalizePropTypes,
};

class ReportActionItemMessageEdit extends React.Component {
Expand Down Expand Up @@ -139,13 +144,13 @@ class ReportActionItemMessageEdit extends React.Component {
<Button
style={[styles.mr2]}
onPress={this.deleteDraft}
text="Cancel"
text={this.props.translate('common.cancel')}
/>
<Button
success
style={[styles.mr2]}
onPress={this.publishDraft}
text="Save Changes"
text={this.props.translate('common.saveChanges')}
/>
</View>
</View>
Expand All @@ -154,4 +159,7 @@ class ReportActionItemMessageEdit extends React.Component {
}

ReportActionItemMessageEdit.propTypes = propTypes;
export default withWindowDimensions(ReportActionItemMessageEdit);
export default compose(
withLocalize,
withWindowDimensions,
)(ReportActionItemMessageEdit);

0 comments on commit 002dc8a

Please sign in to comment.