App icon indicating copy to clipboard operation
App copied to clipboard

[Hold for Payment] Translation Inconsistency between balance in Settings page & payments page

Open Santhosh-Sellavel opened this issue 5 years ago • 29 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


https://expensify.slack.com/archives/C01GTK53T8Q/p1628198667040500

Action Performed:

  1. Select preferred language to Español in Settings -> preferences.
  2. In Settings Page Near payments option, we show a balance as $0.00 for English, but in Spanish, we show 0,00 US$. But when we open the payments page, In there we show the balance as $0.00 for both languages.
  3. On Mobile for both pages we show $0.00 for Spanish, without any locale formatting.

Expected Result:

Should be consistent on all pages. @marklouisdeshaun

Actual Result:

Payments page: English Screenshot 2021-08-06 at 2 46 13 AM

Payments page: Espanol Screenshot 2021-08-06 at 2 46 33 AM

Settings page balance: English Screenshot 2021-08-06 at 2 46 02 AM

Settings page balance: Espanol Screenshot 2021-08-06 at 2 46 26 AM

Workaround:

Can the user still use Expensify without this being fixed? Yes

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Proposal

Based on @marklouisdeshaun inputs. Need to decide where changes need to be done.

Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL:

View all open jobs on Upwork

Santhosh-Sellavel avatar Aug 06 '21 09:08 Santhosh-Sellavel

Triggered auto assignment to @alexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Aug 06 '21 09:08 MelvinBot

This is actually a bit difficult since currency formatting varies by locale and not by language, i.e. among Spanish-speaking countries, the formatting can vary. This means they'll use commas or decimals as separators differently and place the currency symbol or abbreviation either before or after the amount.

For example, in Spain, the currency would be formatted to 1.205,34 € whereas in Mexico it would be $ 1,205.34.

To my knowledge, right now, we are not localizing at a country-specific level. (cc: @iwiznia to confirm)

Here's the formatting for Spanish-speaking countries (reference): es_GT = Q1,205.34 es_IC = 1.205,34 € es_AR = $1.205,34 es_PR = $1,205.34 es_NI = C$1,205.34 es_ES = 1.205,34 € es_PY = ₲ 1.205 es_UY = $ 1.205,34 es_DO = $1,205.34 es_CL = $1.205 es_VE = Bs.1.205,34 es_HN = L1,205.34 es_CO = $1.205 es_PA = B/.1,205.34 es_SV = US$1,205.34 es_CR = ₡1.205 es_PE = S/.1,205.34 es_CU = $1,205.34 es_BO = Bs1.205,34 es_EC = $1.205,34 es_GQ = FCFA1.205 es_MX = $1,205.34

The majority place the currency symbol to the left. There's almost an even split between using commas or decimals as separators for grouping and fractions. 10 comma grouping/decimal fraction (1,205.34) vs 12 decimal grouping/comma fraction (1.205,34).

If we are not locale-specific and need to choose one format and want to go with the majority, then it appears we would need to go with: currency symbol left decimal for number groupings comma for fractions = $0,00 , $1,23 , $3.500,00 etc.

marklouisdeshaun avatar Aug 06 '21 17:08 marklouisdeshaun

I drafted a PR based on the discussion we had earlier here.

One thing is clear here either the settings page or payment page needs a change. Waiting for confirmation, what needs to be done. I'll put PR on hold for now.

@marklouisdeshaun @iwiznia

Santhosh-Sellavel avatar Aug 06 '21 18:08 Santhosh-Sellavel

IMO given @marklouisdeshaun post we should just standardize on US formatting ($123,456.78) in both places since the wallet is always in USD for now

stitesExpensify avatar Aug 06 '21 18:08 stitesExpensify

Posting in the slack thread to get more discussion

stitesExpensify avatar Aug 06 '21 18:08 stitesExpensify

Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Aug 06 '21 18:08 MelvinBot

@marklouisdeshaun we only added Spanish (Spain) as a translation and locale, but the library already has configured all the number formatting options for every location in the world.

The fact that the currency is always USD does not mean that the format should always be the one in USA. So, the fix should be to use the locale aware methods to print the amount in both places.

iwiznia avatar Aug 09 '21 10:08 iwiznia

@iwiznia thanks for confirming. So, if we do have the ability to format numbers/dates/currencies at the locale-specific level, then we should definitely do so.

marklouisdeshaun avatar Aug 09 '21 15:08 marklouisdeshaun

@TomatoToaster proposed changes are available in https://github.com/Expensify/App/pull/4461. I'll mark PR as ready for review once you say go ahead. Thanks

Santhosh-Sellavel avatar Aug 09 '21 17:08 Santhosh-Sellavel

Ah sorry, I thought this was already marked for exported. Marking it so the job could be made/proposal can be properly evaluated.

TomatoToaster avatar Aug 10 '21 20:08 TomatoToaster

Triggered auto assignment to @dylanexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Aug 10 '21 20:08 MelvinBot

Working on this now

dylanexpensify avatar Aug 11 '21 10:08 dylanexpensify

Upwork job issue: https://www.upwork.com/jobs/~01c99cb1728a0bcc52

dylanexpensify avatar Aug 11 '21 10:08 dylanexpensify

Triggered auto assignment to @johnmlee101 (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Aug 11 '21 10:08 MelvinBot

@dylanexpensify applied for the job.

Santhosh-Sellavel avatar Aug 11 '21 10:08 Santhosh-Sellavel

Proposal

Using the locale aware formatter as below, Screenshot_20210812-023822_GitHub.jpg

es locale formatting was missing in mobile, changes to for that are below, Screenshot_20210812-023839_GitHub.jpg

Santhosh-Sellavel avatar Aug 11 '21 21:08 Santhosh-Sellavel

Proposal looks good to me. Feel free to hire away if you haven't already @dylanexpensify !

stitesExpensify avatar Aug 12 '21 16:08 stitesExpensify

@stitesExpensify sent offer!

dylanexpensify avatar Aug 12 '21 16:08 dylanexpensify

Thanks, accepted the offer! Opened a PR is ready for review, #4461 @stitesExpensify @dylanexpensify

Santhosh-Sellavel avatar Aug 12 '21 16:08 Santhosh-Sellavel

@johnmlee101 Huh... This is 4 days overdue. Who can take care of this?

MelvinBot avatar Aug 16 '21 19:08 MelvinBot