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

Allow searching by foreign name #6

Closed
fenhl opened this issue Oct 1, 2016 · 4 comments
Closed

Allow searching by foreign name #6

fenhl opened this issue Oct 1, 2016 · 4 comments

Comments

@fenhl
Copy link
Contributor

fenhl commented Oct 1, 2016

It would be helpful if searching by name also worked for non-English card names, or if there were a special syntax for this.

@taw
Copy link
Owner

taw commented Oct 1, 2016

It definitely shouldn't be default, getting rid of pollution by non-English names was one of the big reasons I wrote mtg.wtf in the first place.

As for special fields with query like ru:Голем, I tried implementing just that, but I ran into a weird problem that names change from printing to printing. For example Thran Golem in Russian:

It's basically a question of treating it as per-card property (and in such case, does it have two names, most recent name only, or how does that work exactly?) or per-printing property (which would be somewhat weird).

There's also minor issues:

  • unicode - right now we force everything to ascii to save people from weirdness like this (also from AE ligature before Oracle got rid of that too). It wouldn't affect Russian/Chinese/Japanese as they use completely separate character sets, but no idea about German, French, Italian etc.
  • do we want to display those foreign names somewhere? If so, do we normalize per-card, per-printing, or how?

@fenhl
Copy link
Contributor Author

fenhl commented Oct 1, 2016

Normalizing everything to ASCII is a bad idea (in some languages, there are minimal pairs where the word means something else without the diacritics).

If someone's searching for e.g. the German version of Anger, you'll want to accept both normalized (de:Arger or de:Aerger) and exact (de:Ärger) queries, to accomodate both someone who has gotten their hands on a German card (and may not be able to type the diacritics on their keyboard) and native German speakers.

@taw
Copy link
Owner

taw commented Oct 1, 2016

We could figure out some special case for German umlauts, force normalizing everything is pretty much best strategy for English, but I'm aware it's less great for other languages.

I'll probably just add some rudimentary support for queries like de:* soon, and leave more complex issues like name changes between printing and umlauts for later.

@taw
Copy link
Owner

taw commented Oct 1, 2016

It's working now (disregarding edge cases) - http://mtg.wtf/help/syntax for some examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants