#37822 [W&A-Insight] insight incorrect amounts displayed to foreign users
Was this helpful?
Was this helpful?
Submitted on Dec 16th 2024 at 18:39:10 UTC by @Blockian for
Report ID: #37822
Report Type: Websites and Applications
Report severity: Insight
Target: https://github.com/Swaylend/swaylend-monorepo/tree/develop/apps/frontend
Impacts:
Temporarily disabling user to access target site, such as:
Locking up the victim from login
Cookie bombing, etc.
Displaying Incorrect Information To Users
An issue has been found in the Swaylend frontend where currency symbols are incorrectly displayed when the page is translated into different languages.
In all areas of the frontend where amounts are displayed, the $
symbol is hardcoded. However, the wrapping HTML element does not include the notranslate
class. This oversight causes Google Translate to replace the $
symbol with a currency sign that matches the selected language, leading to confusion.
For instance, if a European user visits the site (a highly likely scenario) and uses Google Translate to view the site in Dutch, all instances of the $
symbol will be converted into €
symbols. The underlying numeric values remain unchanged, which misrepresents the actual currency.
This discrepancy creates a misleading user experience by displaying incorrect amounts. Users may make incorrect assumptions about the values presented, potentially leading to erroneous transactions and a loss of trust in the system.
To replicate the issue, follow these steps:
Enable Google Translate and select a language (e.g., Dutch).
Observe that all $
symbols are replaced with €
symbols while the numeric values remain unchanged.
Adding the notranslate
class is a simple and effective fix to ensure currency symbols remain accurate across all translated versions of the site, preserving user trust and preventing potential errors.
To resolve this issue, include the notranslate
class (as recommended in the ) for all elements displaying currency amounts. This will prevent Google Translate from altering the currency symbols.
Navigate to .