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

[Broken functionality] Entering currency amount in cs_CZ locale does not behave correctly #7537

Open
weinfurt opened this issue Sep 12, 2024 · 3 comments · May be fixed by #7625
Open

[Broken functionality] Entering currency amount in cs_CZ locale does not behave correctly #7537

weinfurt opened this issue Sep 12, 2024 · 3 comments · May be fixed by #7625
Labels
type: bug Existing functionality is broken

Comments

@weinfurt
Copy link

weinfurt commented Sep 12, 2024

User Story

I am using GiveWP plugin in the Czech Republic (cs_CZ locale) and currency is CZK (Czech Koruna) which is placed after the amount value. I'd like to type in the desired amount normally (digit by digit) without any issues.

Details

Currently, when I type in first digit, then the cursor immediately moves to the end of the input field string. That is after the "Kč" currency label. Then next digit pressed immediately generates NaN error.
Other weird issue is, that when I enter the currency field with some value already there (like the predefined amounts in the Builder), and then just leave the field by clicking elsewhere, the field value is updated with extra "000" ... so from "1 000 Kč" string is suddenly "1 000 000 Kč". The same happens when pressing Delete button.
I've seen this behavior so far in the Builder under the Donation Options and also in the Custom Amount field

Expected Behavior

The currency input fields should work correctly in all locales no matter if the currency name is before or after the value.

Steps to Reproduce

Use the latest Give WP plugin with the locale where its currency name is after the value. In my case it is czech locale (cs_CZ).

Visuals

Zaznam.obrazovky.2024-09-12.180443.mp4

Additional Context

System Information

Details

Give WP 3.16.1

@weinfurt weinfurt added the type: bug Existing functionality is broken label Sep 12, 2024
@dvlprlat
Copy link

dvlprlat commented Oct 3, 2024

I'm getting the same error, but 6 zeros are added at the end of any amount. So if someone's trying to donate 100 USD the field will be updated with 6 additional zeros resulting in 100,000,000. I've been trying to debug the issue, deactivating all of my other plugins, changing theme and nothing seems to be working. Help please

Copy link

github-actions bot commented Dec 5, 2024

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.

@github-actions github-actions bot added the Stale label Dec 5, 2024
@kjohnson kjohnson removed the Stale label Dec 5, 2024
@kjohnson
Copy link
Member

kjohnson commented Dec 5, 2024

@weinfurt @dvlprlat we've identified a similar issue with the Swedish langauge/currency.

The input is parsing the letter k in the abbreviation to mean thousand (1k as 1,000).

We have a fix currently being tested, see #7625.

@kjohnson kjohnson linked a pull request Dec 5, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Existing functionality is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants