Skip to content

[$175] Distance expense - Approver sees waypoint names in submitter’s language #106718

Closed as not planned

Description

@applause-bot

Updated 2026-11-13: Corrected based on feedback from roryabraham.

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.5.37-0
Reproducible in staging?: Yes — original language-switch scenario; approver scenario below has not been independently reverified.
Reproducible in production?: Yes — original language-switch scenario; approver scenario below has not been independently reverified.
If this was caught during regression testing, add the test name, ID and link from BrowserStack: fix: make native map labels follow the app language — original QA context, not a confirmed introducing PR.
Email or phone of affected tester (no customers): applausetester+bk1121@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11 pro /Chrome, Samsung Galaxy s10/ Chrome,IPhone 15 pro/ IOS 27.2
App Component: Money Requests

Scope

Focus this issue on an approver viewing a submitted distance expense created by someone using a different app language, as described in the scope clarification.

The affected text is the saved waypoint/place names shown for the expense's start and stop destinations, not the surrounding Start/Stop captions or Mapbox basemap labels. The original same-user language-switch scenario is background context, not the primary acceptance case.

Action Performed:

  1. Use a submitter and a different approver on a workspace configured for expense submission and approval.
  2. Set the submitter's app language to 日本語 (Japanese).
  3. Create a map-based distance expense. Select London as the start and Paris as the stop from the suggested places, and save the expense.
  4. Submit the expense/report to the approver.
  5. With the approver's app language set to English, open the submitted distance expense and its distance receipt.
  6. Inspect the start and stop place names shown to the approver.

Expected Result:

The approver sees waypoint/place names in their own preferred app language: London and Paris for an English-speaking approver, rather than the submitter's Japanese names. Viewing the expense must not change the submitter's saved expense data.

Actual Result:

As reported in the scope clarification, the approver sees the place names in Japanese, the language used when the submitter selected them, instead of the approver's preferred language.

Workaround:

Unknown

Platforms:

The following coverage comes from the original report; the two-user approver scenario still needs verification on these platforms.

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Original same-user language-switch recording (not a two-user approver verification):

Bug7312298_1794486706516.bandicam_2026-11-12_15-24-54-081.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7312298

Upwork Automation - Do Not Edit

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 12, 2026
  2. applause-bot commented on Nov 12, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/bcadd2278c63315ff1e87e4776a1d4401ba9ec6d12119b3fb946f36dab1cc21e

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 12, 2026
  4. melvin-bot commented on Nov 12, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)

  5. changed the title [-]The map start and stop points doesn't follow the app language[/-] [+][$175] The map start and stop points doesn't follow the app language[/+] on Nov 12, 2026
  6. melvin-bot commented on Nov 12, 2026

    @melvin-bot
  7. MelvinBot commented on Nov 12, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ⚠️ partial

    Saved and reopened the London–Paris expense on web. After switching to English, captions became Start/Stop, but waypoint names remained ロンドン/パリ; Japanese basemap glyphs were unreadable, preventing complete basemap verification.

    English map with Start/Stop labels and retained Japanese waypoint names

    Step Status
    1. App opens signed inAuthenticated Home and Profile were accessible.
    ✅
    2. Open Profile → Preferences → LanguageLanguage settings opened successfully.
    ✅
    3. Select 日本語 and SaveRead-back confirmed 言語, 日本語.
    ✅
    4. Open + → 距離を記録The menu item appeared, but dialog coverage blocked clicking. Home → 距離 opened the equivalent flow.
    ⚠️
    5. Select Map, choose London and Paris suggestions, save expenseSelected London イギリス and Paris フランス and saved the expense successfully.
    ✅
    6. Inspect Japanese map and endpointsRead-back confirmed 開始, ロンドン and 停止, パリ. Basemap characters rendered as boxes, so Japanese city labels could not be verified.
    Japanese route with unreadable basemap glyphs
    ⚠️
    7. Change language back to EnglishPreferences read-back confirmed Language, English.
    ✅
    8. Reopen expense and compare labels — structured analysisRead-back confirmed Start, ロンドン and Stop, パリ. English Brighton and Paris were visible in the screenshot, although basemap text was unavailable to accessibility read-back.

    Proposal

    What is the root cause of that problem?

    Saved waypoint text is independent of map localization. Google Places searches use the current locale in AddressSearch:156–160, and selection stores the returned name/address through saveWaypoint:115–132. Reopening renders the saved name, falling back to address, while translating only the Start/Stop captions in DistanceRequestRenderItem:53–60. This explains the reproduced endpoint-row behavior; it does not establish a basemap-label defect.

    What changes do you think we should make in order to solve the problem?

    First confirm that saved destination names should follow the viewer’s language. If required, design display-only localization with cached/original-text fallback, preserving saved expense data, custom text, coordinates, and offline behavior. The current save path retains no place identity or language metadata, so a reliable lookup/persistence approach still needs validation before implementation.

    What alternative solutions did you explore?

    Changing Mapbox language or remounting the map would not change saved waypoint strings. Overwriting addresses on language changes risks altering expense data. Source comparison found this saved-string behavior already present before the QA-linked PR; that PR is not established as its cause.
    Related: Map: Switch Mapbox map language to the user's preferred app locale concerns basemap localization, a separate rendering path.
    English map with Start/Stop labels and retained Japanese waypoint names
    ⚠️

    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](<accepted-proposal-comment-URL>) to create a draft PR after resolving the localization-design questions above.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run · no recording available

  8. samithreddychinni commented on Nov 12, 2026

    @samithreddychinni

    @situchan I traced the behavior to two separate localization paths.

    AddressSearch sends the current locale to Google Places, then saveWaypoint persists the returned name and address in the transaction. DistanceRequestRenderItem renders that saved text directly. The waypoint data has no Google place ID or source locale, so the app cannot safely re-localize an existing endpoint after a language change. A coordinate-based lookup would break offline behavior, risk replacing custom text, and add network/API dependency.

    The Mapbox basemap is a separate path. Issue #97752 and PR #106598 address basemap label localization.

    Can you confirm the intended behavior for #106718? Should saved endpoint names such as ロンドン and パリ change with the viewer locale, or is the expected fix limited to Mapbox basemap labels? If endpoint names must change, this appears to require place identity or localized variants in the persisted data model rather than a safe App-only render change.

  9. self-assigned this
    on Nov 12, 2026
  10. roryabraham commented on Nov 12, 2026

    @roryabraham
    Contributor

    Joining as CME

  11. situchan commented on Nov 12, 2026

    @situchan
    Contributor

    @roryabraham Should saved waypoint names follow the viewer's language?

    Google Places returns names in the app language when the place is picked (AddressSearch). We save that text on the transaction (saveWaypoint) with no place ID, so a Japanese user's ロンドン stays Japanese after switching to English. The map tiles already follow the language after #106598.

    A fix is possible, but it needs backend support:

    1. Save Google's placeID on each waypoint and send it in waypoints (sanitizeWaypointsForAPI only lets name, address, lat and lng through today).
    2. On display, fetch the name for the current language through Proxy_GooglePlaces (/place/details/json?placeid=...&language=...&fields=name), cache it per session and fall back to the saved name. Saved data never changes.

    Questions:

    • Do we want this, or is the saved name expected behavior?
    • If yes, can the backend accept and return placeID inside waypoints and in the recent waypoints NVP?
    • Is one extra Places Details call per place and language OK cost-wise?

    Old expenses have no place ID and would stay as they are.

  12. roryabraham commented on Nov 12, 2026

    @roryabraham
    Contributor

    Good question for the product team, I'll ask in slack

  13. roryabraham commented on Nov 12, 2026

    @roryabraham
    Contributor

    Asked in slack.

    My take? For the case reported in this issue, it's not worth fixing. But there's another variant of the same bug that I think makes this worth fixing:

    Steps to reproduce:

    1. Switch your app to Japanese.
    2. Create a distance expense, choosing two places on your (Japanese) map to create the distance expense.
    3. Submit the expense.

    Expected result: The approver sees the place names in their preferred language.

    Actual result: The approver sees the place names in Japanese.

  14. situchan commented on Nov 13, 2026

    @situchan
    Contributor

    @MelvinBot update issue title and description as per #106718 (comment) and submit proposal

  15. changed the title [-][$175] The map start and stop points doesn't follow the app language[/-] [+][75] Distance expense - Approver sees waypoint names in submitter's language[/+] on Nov 13, 2026
  16. changed the title [-][75] Distance expense - Approver sees waypoint names in submitter's language[/-] [+][$175] Distance expense - Approver sees waypoint names in submitter’s language[/+] on Nov 13, 2026
  17. MelvinBot commented on Nov 13, 2026

    @MelvinBot
    Contributor

    Updated the title to “[$175] Distance expense - Approver sees waypoint names in submitter’s language” and rewrote the description around the approver scenario. Original QA evidence and automation metadata are preserved.

    Proposal

    What is the root cause of that problem?

    Place names are localized when the submitter selects them, then saved as plain text. The approver’s receipt displays those saved strings directly; only surrounding captions follow the approver’s language.

    Code evidence

    What changes do you think we should make in order to solve the problem?

    The intended solution is viewer-specific display localization, without rewriting shared expense data.

    Internal engineering input is required before implementation: the current App data cannot reliably identify the originally selected place for a localized lookup. An internal engineer should confirm the supported API/persistence contract, lookup costs, and treatment of existing expenses. Backend capabilities have not been verified, so this is not yet an implementation-ready App-only fix.

    Acceptance criteria:

    • A Japanese submitter’s London–Paris expense shows English place names to an English approver.
    • The submitter’s view and saved expense data remain unchanged.
    • Receipt previews and enlarged receipts behave consistently.
    • Offline or failed lookups retain readable saved text.
    • Existing expenses without place identity have an explicitly agreed fallback.

    What alternative solutions did you explore?

    • Mapbox language changes: affect basemap labels, not saved receipt text.
    • Always saving English names: does not satisfy different viewers’ preferred languages.
    • Reverse geocoding coordinates: may resolve a different street or place than the selected destination.

    Validation: The client data flow is verified; the two-account submission scenario was not rerun.


    Next Steps for Contributor+ team:
    To accept: Resolve the API/data-contract prerequisites before requesting a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin’s proposal.


    view run

  18. gorky117-cell commented on Nov 13, 2026

    @gorky117-cell

    Proposal

    What is the root cause of that problem?

    1. In src/components/AddressSearch/index.tsx:156-161, autocomplete queries Google Places passing language: preferredLocale. When a submitter selects a destination in Japanese, details.name and formatted_address are returned as localized Japanese strings.
    2. In src/types/onyx/Transaction.ts and src/libs/actions/Transaction.ts:117-126 (saveWaypoint), only name, address, lat, and lng are saved. The canonical Google Place ID (details.place_id) is discarded.
    3. In src/components/DistanceEReceiptPanel.tsx:91-92, the receipt directly renders the static saved strings (waypoint.name and waypoint.address). Because the transaction does not retain a canonical place identifier or localized resolution fallback, non-author viewers (such as an English-speaking approver) only see the submitter's language.

    What changes do you think we should make in order to solve the problem?

    1. Retain place identity:
      • In src/types/onyx/Transaction.ts, add an optional placeID?: string property to the Waypoint type.
      • In src/components/AddressSearch/index.tsx, pass placeID: details.place_id in the onPress callback.
      • In src/libs/actions/Transaction.ts:saveWaypoint, persist placeID into the transaction's waypoint object in Onyx.
    2. Viewer-specific display localization:
      • In src/libs/TransactionUtils.ts (or via a display helper in DistanceEReceiptPanel.tsx), resolve the localized place name for the current viewer's preferredLocale:
        • If the viewer's language matches the submitter's language, or if offline, render the saved waypoint.name and waypoint.address.
        • If the viewer's language differs and placeID exists, resolve the localized place name using the place cache/API for the viewer's locale without mutating the underlying transaction object in Onyx.
        • If lookup fails or the expense is legacy (no placeID), smoothly fall back to waypoint.name.

    What alternative solutions did you explore? (Optional)

    1. Mutating the transaction record when viewed by an approver:
      • Rejected: Viewing an expense should never alter or overwrite another user's submitted transaction data.
    2. Reverse geocoding coordinates (lat, lng):
      • Rejected: Coordinates often resolve to arbitrary street addresses rather than the specific place or landmark name chosen by the user (e.g. airport or station names). Retaining placeID ensures exact landmark identity across languages.
    3. Forcing all places to save in English:
      • Rejected: Degrades the user experience for non-English users viewing their own receipts.
  19. samithreddychinni commented on Nov 13, 2026

    @samithreddychinni

    @situchan i'm intrested in putting together a more detailed proposal based on the Place ID aoorpch, including viewer locale resolution for both name and formatted_address (since the receipt displays both), with caching and saved values as fallbacks while keeping the submitted transaction unchanged. before i spend time writing it up, do you think this is worth pursuing as a contributor proposal, or should we wait for internal clarification on API support and lookup costs. if yes give me a thumbs up reaction i'll put the proposal together.

  20. roryabraham commented on Nov 13, 2026

    @roryabraham
    Contributor

    from our actual product testing, it sounds like the actual results don't match what I called the "actual results" in this comment: #106718 (comment)

    Going to close this one as not planned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions