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

feat: display language icon for auto translated msgs #5398

Merged

Conversation

jsathu07
Copy link
Contributor

@jsathu07 jsathu07 commented Dec 13, 2023

Proposed changes

When the message is auto translated, renders the ‘language’ icon on the Message’s RightIcons

Issue(s)

closes #4807

How to test or reproduce

Screenshots

Screenshot_1709471692

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

@jsathu07
Copy link
Contributor Author

@diegolmello I've fixed the issue sir. Could you please take a look when you have a chance? Let me know if there are any further changes needed. Thanks.

import { themes } from '../../../../lib/constants';
import styles from '../../styles';

const Translated = memo(({ isTranslated }: { isTranslated: boolean }) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add this component to Storybook

image

	modified:   app/containers/message/Message.stories.tsx
@jsathu07
Copy link
Contributor Author

@reinaldonetof Sir can you review this pr when you are free, Thank you

Copy link
Contributor

@reinaldonetof reinaldonetof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's almost there 🚀

import styles from '../../styles';

const Translated = memo(({ isTranslated }: { isTranslated: boolean }) => {
const { theme } = useTheme();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { theme } = useTheme();
const { colors } = useTheme();


return (
<View style={styles.rightIcons}>
<CustomIcon name='language' size={16} color={themes[theme].auxiliaryText} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<CustomIcon name='language' size={16} color={themes[theme].auxiliaryText} />
<CustomIcon name='language' size={16} color={colors.auxiliaryText} />

@jsathu07
Copy link
Contributor Author

@reinaldonetof I've made the requested changes sir. Please check it out when you have time, Thanks

@jsathu07
Copy link
Contributor Author

@GleidsonDaniel Can you review this pr in your free time? Thanks

@GleidsonDaniel
Copy link
Contributor

Put it before the read receipt

@GleidsonDaniel GleidsonDaniel dismissed stale reviews from reinaldonetof and diegolmello March 4, 2024 10:25

outdated

@GleidsonDaniel GleidsonDaniel merged commit eefb879 into RocketChat:develop Mar 4, 2024
3 of 8 checks passed
@jsathu07 jsathu07 deleted the feat.auto_translate_icon branch March 16, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add auto-translate icon to message
4 participants