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

Added translations for "edited" label in chats #4776

Merged
merged 8 commits into from
Aug 27, 2021

Conversation

akshayasalvi
Copy link
Contributor

@Julesssss PR for the review.

Details

Add translation for "(edited)" label

Fixed Issues

$ #4518

Tests

  • Tested by switching the language for edited messages
  • Tested for Links (HTML content)

QA Steps

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

english-web

web

Mobile Web

mobile-web

Desktop

desktop

iOS

ios

Android

android

@akshayasalvi akshayasalvi requested a review from a team as a code owner August 21, 2021 02:50
@MelvinBot MelvinBot requested review from Julesssss and removed request for a team August 21, 2021 02:50
@akshayasalvi
Copy link
Contributor Author

@Julesssss I found that the same label is hardcoded in BaseHTMLEngineProvider as well. I've fixed it there too.

But I need a little help here. How should I pass withLocalizePropTypes to the EditRenderer?

Options:

  1. I leave it as per what I've done right now
  2. I create a named component and then passed propTypes. But in this what would be the other propTypes for the renderer component?

@Julesssss
Copy link
Contributor

Hi @akshayasalvi, I'm not sure about this. I asked in our open source slack channel here for some help. Please feel free to add your own comments, or to follow along here

@akshayasalvi
Copy link
Contributor Author

akshayasalvi commented Aug 23, 2021

Hi @Julesssss,
I am unable to access the link and I don't have a slack account. I've found two more functions in src/libs/translate. I feel translateLocal might help in this case. I've tested and it works. Can we use that? I've updated the PR to reflect the changes. Let me know if it has to be changed to some other way.

image

@Julesssss
Copy link
Contributor

Hi @akshayasalvi, transalateLocal seems to be a valid solution here. I would suggest joining our Slack channel for better communication and updates about new jobs, ect.

@akshayasalvi
Copy link
Contributor Author

Thank you. Then any other changes from my side?

I'll try to join the channel. How do I join it?

@Julesssss
Copy link
Contributor

Instructions are here. I'll review the PR now.

Copy link
Contributor

@Julesssss Julesssss left a comment

Choose a reason for hiding this comment

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

One issue: I noticed that the HTML edited does not update when changing language. Perhaps this is due to translateLocal... If you are stuck here I think we should continue the discussion I started in the Slack thread

Screenshot 2021-08-24 at 12 35 18

@akshayasalvi
Copy link
Contributor Author

Ohh yeah, that's right. It doesn't change.

@akshayasalvi
Copy link
Contributor Author

@Julesssss I have sent the request to join slack.

I've checked and my previous solution of adding withLocalize to EditedRenderer is working fine. Should we think on those lines?

@Julesssss
Copy link
Contributor

Julesssss commented Aug 25, 2021

I've checked and my previous solution of adding withLocalize to EditedRenderer is working fine.

Yeah, lets do that. I was a bit worried about the performance hit from adding a new subscription to a Commonly used component, but apparently it is fine 👍

@akshayasalvi
Copy link
Contributor Author

PR updated

@@ -129,6 +129,7 @@ export default {
fileUploadFailed: 'Subida fallida. El archivo no es compatible.',
roomIsArchived: 'Esta sala de chat ha sido eliminada',
localTime: ({user, time}) => `Son las ${time} para ${user}`,
edited: '(editar)',
Copy link
Contributor

@aldo-expensify aldo-expensify Aug 26, 2021

Choose a reason for hiding this comment

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

This should be (editado), not (editar).

Edit -> Editar
Edited -> Editado/a (depending on the gender of what we edited).

Julesssss
Julesssss previously approved these changes Aug 27, 2021
Copy link
Contributor

@Julesssss Julesssss left a comment

Choose a reason for hiding this comment

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

LGTM, just need to make the fix @aldo-expensify suggested

@akshayasalvi
Copy link
Contributor Author

Is there a function to know the gender of the person who edited ?

@Julesssss
Copy link
Contributor

Is there a function to know the gender of the person who edited?

We don't have a way of doing this yet. Maybe we could use their pronouns which are optional, but that's out of scope of this issue.

@akshayasalvi
Copy link
Contributor Author

Then I'll just change to editado

@akshayasalvi
Copy link
Contributor Author

@Julesssss @aldo-expensify PR updated

@aldo-expensify
Copy link
Contributor

aldo-expensify commented Aug 27, 2021

Is there a function to know the gender of the person who edited?

We don't have a way of doing this yet. Maybe we could use their pronouns which are optional, but that's out of scope of this issue.

heh I may have caused some confusion here. It is the genre of what is being edited: the message (input), not the person. It really depends on how we refer to each "input" of a chat (report) in Spanish. Anyway, I think editado is the right one!

Update: Looking at other translations, I see that we refer to each input as "Comentario", so, editado is the correct one.

@akshayasalvi
Copy link
Contributor Author

Ohh. Thanks for the clarification @aldo-expensify. Sorry for the confusion :)

Copy link
Contributor

@aldo-expensify aldo-expensify left a comment

Choose a reason for hiding this comment

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

Looks good to me, I leave it to you @Julesssss

@Julesssss Julesssss merged commit d845aba into Expensify:main Aug 27, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @Julesssss in version: 1.0.88-3 🚀

platform result
🤖 android 🤖 cancelled 🔪
🖥 desktop 🖥 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Sep 1, 2021

🚀 Deployed to production by @roryabraham in version: 1.0.90-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

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.

4 participants