Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD] Fix translation for (edited) label in chat #4679

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ export default {
deleteComment: 'Delete Comment',
deleteConfirmation: 'Are you sure you want to delete this comment?',
},
reportActionItemFragment: {
edited: '(edited)',
},
reportActionsView: {
beFirstPersonToComment: 'Be the first person to comment',
},
Expand Down
3 changes: 3 additions & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ export default {
deleteComment: 'Eliminar Comentario',
deleteConfirmation: '¿Estás seguro de que quieres eliminar este comentario?',
},
reportActionItemFragment: {
edited: '(editado)',
},
reportActionsView: {
beFirstPersonToComment: 'Sé el primero en comentar',
},
Expand Down
11 changes: 9 additions & 2 deletions src/pages/home/report/ReportActionItemFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import Tooltip from '../../../components/Tooltip';
import {isSingleEmoji} from '../../../libs/ValidationUtils';
import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions';
import canUseTouchScreen from '../../../libs/canUseTouchscreen';
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize';
import compose from '../../../libs/compose';

const propTypes = {
/** The message fragment needing to be displayed */
Expand All @@ -30,6 +32,8 @@ const propTypes = {
isSingleLine: PropTypes.bool,

...windowDimensionsPropTypes,

...withLocalizePropTypes,
};

const defaultProps = {
Expand Down Expand Up @@ -76,7 +80,7 @@ class ReportActionItemFragment extends React.PureComponent {
>
{/* Native devices do not support margin between nested text */}
<Text style={styles.w1}>{' '}</Text>
(edited)
{this.props.translate('reportActionItemFragment.edited')}
</Text>
)}
</Text>
Expand Down Expand Up @@ -117,4 +121,7 @@ ReportActionItemFragment.propTypes = propTypes;
ReportActionItemFragment.defaultProps = defaultProps;
ReportActionItemFragment.displayName = 'ReportActionItemFragment';

export default withWindowDimensions(ReportActionItemFragment);
export default compose(
withLocalize,
withWindowDimensions,
)(ReportActionItemFragment);