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

Use language-specific version of card image. #418

Closed
lodici opened this issue Aug 3, 2015 · 7 comments
Closed

Use language-specific version of card image. #418

lodici opened this issue Aug 3, 2015 · 7 comments

Comments

@lodici
Copy link
Member

lodici commented Aug 3, 2015

See forum post from @ShawnieBoy.

There could be a simpler solution:

Having a look at magiccards.info they are thankfully well structured for other languages. Having an option on the downloads for different languages, and then a string replacement from the script file for "/en/" to the chosen language:

Grabbing an image file at random - Scion of Ugin

http://magiccards.info/scans/en/dtk/1.jpg
http://magiccards.info/scans/de/dtk/1.jpg
http://magiccards.info/scans/ru/dtk/1.jpg

For some of the earlier sets this may not match as well due to some translations not existing (at a guess).

If a non-English language is chosen I would assume that also having an English version may not be required so could replace the English versions as the filenames will be the same.

(Also scaring me with the side-project of in-game created cards!)

@lodici
Copy link
Member Author

lodici commented Aug 4, 2015

@ShawnieBoy is the following pseudo code what you are getting at? Assume I am using the Russian UI...

  • if the download url pulled from the card script is magiccards.info then
    • replace the /en/ part of the url with /ru/.
    • attempt to download, if fail then down original en edition instead.

This is doable but I think the results could be very patchy. The first three cards I randomly selected ( Æther Membrane, Pelakka Wurm and Fault Riders) would all have failed to download the appropriate translated image - they do exist but with different numbers and/or edition codes.

@lodici
Copy link
Member Author

lodici commented Aug 5, 2015

I did some tests on 100 cards for ru (russian), pt (portuguese) and de (german). The results were poor to say the least with pt having a 70% fail rate, ru 68% and de 43%.

@lodici
Copy link
Member Author

lodici commented Aug 5, 2015

Tried with 1000 cards for ru - 63% fail rate.

@lodici
Copy link
Member Author

lodici commented Aug 5, 2015

Of course it is better than nothing I guess.

@ShawnieBoy
Copy link
Member

Sorry PC inoperative at the moment.

The fail rate is most likely due to using the most recent versions of card printings. Some editions/special sets may not have translations. I'm thinking the Duel Deck series and probably Commander, Planechase and Archenemy - There's probably going to be gaps with older cards that haven't been printed in particular languages as well.

Sent from my iPhone

On 5 Aug 2015, at 09:29, lodici notifications@github.com wrote:

Of course it is better than nothing I guess.


Reply to this email directly or view it on GitHub.

@lodici
Copy link
Member Author

lodici commented Jan 10, 2017

Can download non-english card images so I think this can be closed.

@lodici lodici closed this as completed Jan 10, 2017
@ShawnieBoy
Copy link
Member

Would be interesting to see how the stats improve once I've completed re-parsing all the scripts files (I sure hope they improve! Not a small job)

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

No branches or pull requests

2 participants