-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
computerFileSize(): allow comma as decimal-point #34425
Conversation
Signed-off-by: Ruben Barkow-Kuder <rubo77@users.noreply.github.com>
maybe we should use this instead of replaceAll, which is not supported by oder browsers:
|
Replaceall should be fine IIRC https://caniuse.com/?search=replaceall |
@@ -83,7 +83,7 @@ export default { | |||
return null | |||
} | |||
|
|||
const s = string.toLowerCase().trim() | |||
const s = string.toLowerCase().replaceAll(',', '.').trim() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to test this but what happens if you enter multiple dots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dots stay, only commas are replaced with dots
Firefox 76 is only 2 years old: may 5, 2020. I think, we should still support it |
Please test this with a German or French locale in your browser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR!
I just tested this and it seems to work on the first glance. However after reloading the page, only whole values are applied so this would need an additional fix somewhere else.
@szaimen could you please take over this pr then? I have no idea, where to search for |
I would like to but unfortunately I do not know where to look at either. Maybe someone of @nextcloud/server-frontend knows? |
As there is no feedback since a while I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen. |
This should fix the issue #18468 (Cannot set user quota with uneven values using locales that use a comma as decimal separator)
Signed-off-by: Ruben Barkow-Kuder rubo77@users.noreply.github.com