joshmadewell/optimlol

Need to intelligently parse other languages -- "joined the room" only support english.

Closed this issue · 10 comments

Sometimes people just don't talk and we already have the player names (at least some if you load last) as the first lines of chat

Regex match log with /^\w+/gm then eliminate dupes

@cardona150 This is actually already implemented. Did you have an issue with it?

To repro go to optimlol.com, enter "Zunam has entered the room" in the chat log field, click Parse Chat Log and Zunam is not placed into the summoner fields.

Try "Zunam joined the room"

Does your client say "has entered the room"?

My client does not say "has entered the room" nor "joined the room" since I use the Latin America North client, which is in spanish. This region is claimed to be supported by the home page (it supports getting stats but not parsing chat logs? uh oh). The regex I've provided will grab summoner names regardless of localization, giving support for all regions.

I see the issue now, i did not think of this. the problem with your regex is that it matches up to the first word and if someone has a summoner like mine, "Crab Leg Warrior" this will not grab their entire name.

You are right about the regex bug, I forgot summoner names support whitespace. I will try and think of a more creative way to do this.

I'm going to make a post on league reddit asking for help from people of other regions to give me their strings. I can't really think of any way to intelligently parse this without knowing the string for each region.

LAN and LAS "Bacalaito entró a la sala." where "Bacalaito" is summoner name.

I've added the spanish version to the project. Thanks!