Kavita icon indicating copy to clipboard operation
Kavita copied to clipboard

Investigate Pickle Rick's potential culture variant issue with parser

Open majora2007 opened this issue 3 years ago • 7 comments

Issue is occurring with matching or with parsing, in which decimal isn't being matched on. User machine is Italian locale and it is confirmed on non-Italian locale (Windows OS locale) that the parse happens correctly.

What occurs is that "Deku&Bakugo-_Rising_v1_c1.1" will get parsed as Chapter 11 while on English systems, it will be parsed as Chapter 1.1

majora2007 avatar Oct 01 '21 23:10 majora2007

I need a developer with a non-english OS locale to help test this out.

majora2007 avatar Oct 06 '21 00:10 majora2007

I feel that this is what i had reported to you multiple times. I have spanish OS if it can help.

ThePromidius avatar Dec 30 '21 10:12 ThePromidius

Please take it up. Start with running the unit tests for Parsers

majora2007 avatar Dec 30 '21 12:12 majora2007

Just came across this and I thought it could've been something to do with us in Europe using a comma for decimal numbers and not a full stop (e.g. $5.30 vs €5,30). As my System language is English (US) but my Country/Region (Locale) is set to Dutch I thought to test it.

On my end it parses and shows up as Issue 1.1 (Comic) or Chapter 1.1 (Manga) in the series overview. However, when I checked 'details' of the book it actually showed Chapter 11 instead of Chapter 1.1 in the details only.

I ran another test with another series and compared it with the same series on my server and it is different!

maybe_also_locale_issue The left is on my Linux Server in Docker, I believe everything is set to English. On the right is localhost on my Windows 11 system set to English US language with Dutch Region (locale).

ocgineer avatar Aug 26 '22 13:08 ocgineer

This is a big revelation, I looked a bit into it, but didn't see anything easy to implement for culture aware regex, since my regex uses things like . directly.

majora2007 avatar Aug 28 '22 20:08 majora2007

is it the regex though? Everything gets parsed correctly, the filename actually also uses a full stop, and shows in correct order in the chapters list. It looks more like a display issue where the UI tries to display 1.1 but expects 1,1 due to region? unless it is parsing correctly on my end completely but not on the users with the italian region?

Database also has proper decimals image

ocgineer avatar Aug 29 '22 00:08 ocgineer

Oh that's interesting....because we just render it out as a string, so maybe browsers do something I'm not aware. Well this means that when I tackle localization, it will fix itself.

majora2007 avatar Aug 29 '22 00:08 majora2007

I tried this out recently after localization and after I found some other issues with browser and OS locale, and cannot reproduce. I was using Sweden locale, which also uses , instead of ., but no luck. Since this issue is quite old and I haven't heard of it since, I'm going to close it out.

majora2007 avatar Nov 11 '23 22:11 majora2007