filter-subs icon indicating copy to clipboard operation
filter-subs copied to clipboard

Chinese, and Japanese

Open dgoryeo opened this issue 10 months ago • 2 comments

Just came across this repo. Would it work for Chinese and Japanese language subs? I'm guessing it needs some changes to work for those languages. Any pointers to which areas might need change? Thanks

dgoryeo avatar Apr 17 '24 12:04 dgoryeo

So, filter-subs works mostly through regex, of which there are a few patterns that match based on alphanumeric characters, e.g. the replace names regex matches using ([A-Z0-9 ][A-Z0-9' ]*: *|[A-Z]{1}[a-z]+ *: *|^[A-Za-z]+: *).

I think a good starting place would be to write some test cases, you can see here for some examples of what that looks like.

In terms of the code, if you can find an analogous regex pattern to use instead of the alphanumerics then it would be quite straight forward to either include that outright, or include it with an optional language flag. If you search within this file for all of the instances of A-Z and a-z that should probably be all of the locations that you'd need to change.

If you have any further questions and I'd be happy to help.

m-lyon avatar Apr 21 '24 21:04 m-lyon

Thanks @m-lyon , much appreciaed!

dgoryeo avatar Apr 21 '24 23:04 dgoryeo