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

Localization for Amount, Numbers and Dates. #3021

Merged
merged 13 commits into from
Jun 1, 2021

Conversation

parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented May 19, 2021

Please Review @iwiznia.

Details

Fixed Issues

Fixes #2349
Fixes #3038

Tests / QA Steps

Localization #2349

  1. Open E.cash
  2. All the times and phone numbers should be localized.

Expensify SMS Domain #3038

  1. Create and account in e.cash with a Phone number
  2. Do not set a name or last name in the account.
  3. Log in as another account
  4. Create a new group chat that includes the phone number account.
  5. @expensify.sms should not be visible in any area of the app.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web / Desktop

translations.mp4

IOS

Android

1622059575660.mp4

@parasharrajat parasharrajat changed the title Localization for Amount, Numbers and Dates. [WIP] Localization for Amount, Numbers and Dates. May 24, 2021
@parasharrajat parasharrajat marked this pull request as ready for review May 24, 2021 22:51
@parasharrajat parasharrajat requested a review from a team as a code owner May 24, 2021 22:51
@MelvinBot MelvinBot requested review from Jag96 and removed request for a team May 24, 2021 22:51
@parasharrajat
Copy link
Member Author

Please let me know If it's going in the right direction. I personally looked at all the pages and added changes. If I am missing some parts, please mention that. Thanks.

There are few places where we are already using localization IOUConfirmationList. There are few errors on the IOU details pages so I am not unable to open them. But I will check the code if changes are required there.

@Jag96 Jag96 requested a review from iwiznia May 24, 2021 23:58
Copy link
Contributor

@Jag96 Jag96 left a comment

Choose a reason for hiding this comment

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

This is looking good to me so far, but I'll let @iwiznia comment since he's got more context here

@iwiznia
Copy link
Contributor

iwiznia commented May 25, 2021

There are few errors on the IOU details pages so I am not unable to open them

Oh damn, what errors? Also, make sure to regularly pull main and merge it into your branch, since it is possible some of those are already fixed.

@parasharrajat
Copy link
Member Author

@iwiznia when I click Pay its was crashing the app. I have reported it and I think its being fixed. I will pull in the latest changes and check again.

Copy link
Contributor

@iwiznia iwiznia left a comment

Choose a reason for hiding this comment

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

Looking good

@@ -71,20 +74,20 @@ const DetailsPage = ({personalDetails, route, translate}) => {
/>
</View>
<Text style={[styles.displayName, styles.mt1, styles.mb6]} numberOfLines={1}>
{details.displayName
? details.displayName
: null}
Copy link
Contributor

Choose a reason for hiding this comment

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

So, before when details.displayName was falsy, we would render null, now we would render details.displayName, is that what we want? Are there uninteded consequences of that? Mostly, I am wondering why we had this ternary condition here if there are no other consequences.

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to pull latest changes and I think thus this ternary would change. Why I did this as I believe we will never has a user who don't have a handle. In other words, can you imagine chating with a user who has no name(login | phone number). So if we are ended up null then we are not doing it correctly. Anyways, this issues has been fixed recently. I will pull the changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated it so return as null when there is no displayName.

@parasharrajat parasharrajat force-pushed the parasharrajat/translations branch from d9cd22b to ad470f3 Compare May 26, 2021 19:17
@parasharrajat
Copy link
Member Author

parasharrajat commented May 26, 2021

Ready for review. Also pulled latest changes from Main.

Co-authored-by: Ionatan Wiznia <iwiznia@hotmail.com>
@iwiznia
Copy link
Contributor

iwiznia commented May 26, 2021

Code looks good, can you test in all platforms and remove WIP? I will do a final review then.

@parasharrajat parasharrajat changed the title [WIP] Localization for Amount, Numbers and Dates. Localization for Amount, Numbers and Dates. May 26, 2021
@parasharrajat
Copy link
Member Author

parasharrajat commented May 27, 2021

Updated. Ready to review

@iwiznia
Copy link
Contributor

iwiznia commented May 27, 2021

@parasharrajat did you test on ios? I am not seeing the video for it.

@Jag96 do you want to do one last review?

@parasharrajat
Copy link
Member Author

Yeah, I tested it, I will update the video soon.

@iwiznia
Copy link
Contributor

iwiznia commented May 28, 2021

Oh, @Jag96 is out of office, @parasharrajat if you upload the ios video test, I'll merge.

@parasharrajat
Copy link
Member Author

I am having issues with my mac system but I am try to recover it and hope it will work.

@iwiznia
Copy link
Contributor

iwiznia commented May 31, 2021

Any luck with that @parasharrajat?

@parasharrajat
Copy link
Member Author

@iwiznia I'll update you today.

Copy link
Contributor

@Jag96 Jag96 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, just one question about the format in some places. In the Header, I see we don't show the + and the area code, but in other places we do (example below). Is there a reason it isn't the same in both places?

image

@iwiznia
Copy link
Contributor

iwiznia commented Jun 1, 2021

If I had to guess is because that's text generated in the server and not in the client. Since we don't have I18n in the server, I don't think we can fix that right now.

@parasharrajat
Copy link
Member Author

Yeah. I checked the main data and see that this message is coming from backend. But I can run a search for PH number on text and replace all the instances, if you want this?

@iwiznia
Copy link
Contributor

iwiznia commented Jun 1, 2021

No, I don't think we want that. We will need to solve this at some point when we add internationalization to the backend.

@Jag96 any other concerns? If not, do you mind merging this?

Copy link
Contributor

@Jag96 Jag96 left a comment

Choose a reason for hiding this comment

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

No, I don't think we want that. We will need to solve this at some point when we add internationalization to the backend.

👍

@Jag96 Jag96 merged commit 6cf79ac into Expensify:main Jun 1, 2021
@OSBotify
Copy link
Contributor

OSBotify commented Jun 1, 2021

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

@parasharrajat parasharrajat deleted the parasharrajat/translations branch November 20, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants