[Hold for Payment] Translation Inconsistency between balance in Settings page & payments page
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:
- Select preferred language to
Españolin Settings -> preferences. - In Settings Page Near payments option, we show a balance as
$0.00for English, but in Spanish, we show0,00 US$.But when we open the payments page, In there we show the balance as$0.00for both languages. - On Mobile for both pages we show
$0.00for Spanish, without any locale formatting.
Expected Result:
Should be consistent on all pages. @marklouisdeshaun
Actual Result:
Payments page: English

Payments page: Espanol

Settings page balance: English

Settings page balance: Espanol

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:
Triggered auto assignment to @alexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
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.
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
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
Posting in the slack thread to get more discussion
Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
@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 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.
@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
Ah sorry, I thought this was already marked for exported. Marking it so the job could be made/proposal can be properly evaluated.
Triggered auto assignment to @dylanexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Working on this now
Upwork job issue: https://www.upwork.com/jobs/~01c99cb1728a0bcc52
Triggered auto assignment to @johnmlee101 (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@dylanexpensify applied for the job.
Proposal
Using the locale aware formatter as below,

es locale formatting was missing in mobile, changes to for that are below,

Proposal looks good to me. Feel free to hire away if you haven't already @dylanexpensify !
@stitesExpensify sent offer!
Thanks, accepted the offer! Opened a PR is ready for review, #4461 @stitesExpensify @dylanexpensify
@johnmlee101 Huh... This is 4 days overdue. Who can take care of this?