It is currently 05 Jun 2020, 23:15
   
Text Size

Downloader for localised text (discontinued)

Moderators: Xander9009, CCGHQ Admins

Downloader for localised text (discontinued)

Postby thefiremind » 23 Apr 2012, 13:17

I don't know how many modders will actually use this, but since I made it, I thought: why not sharing?

I started to think about a full localisation of my DLC, and with this I mean inserting the localised text for all the languages (when available, and English for replacing unavailable ones). I also know a site where you can browse cards in all available languages: magiccards.info. But it would take an enormous time to enter the name of every card in that site and copy and paste each sentence in my cards' XML files. So I coded a software that makes it a bit faster.

"Localised" was born! Here is a screenshot (click to enlarge):
Image

What does this software do? You write the name of a card (it must be the exact English name!), click on Go or press Enter, and it will query magiccards.info for the localised text you need, presenting it in an "XML-friendly" way. It's much faster to copy and paste from this format rather than directly from the site, isn't it?

But the power of this software doesn't end here. Try to run the program with the -batch parameter. You will be asked for a directory. Choose the directory where the XML files of your DLC's cards are (unpacked, of course). Click OK and see what happens... all the names of the cards are automatically retrieved, searched, and the information is saved in a Batch subdirectory inside the directory where the program runs. You just wait for it to end, and the XML code is ready for copy and paste!

The software has some limitations:
1) It can't divide the abilities separated by "commaspace". So, for example, Akroma, Angel of Wrath will have all her abilities condensed into 1. There's no way I could solve this, but this happens only for static keyword abilities, and you can find their separated translations in the core cards.
2) This doesn't depend on the software, but be aware that magiccards.info doesn't update all the wordings for languages other than English, so you will often find the old wordings on the translations ("in play" instead of "on the battlefield", and so on).
3) It won't find any localised text for tokens.
4) Sometimes the translations will be scrambled: parts of an ability text will appear in another ability. This happens when the number of <BR><BR> differs in one or more translations (I count the occurrences of that sequence in order to know how many abilities I have to retrieve).

I used the Lucida Unicode font inside the application (for proper display of Japanese characters). I zipped a copy of that font together with the executable, in case you miss it.

I wrote and compiled the software on C++ Builder 6 with the TNT components (for Unicode characters). I don't think that many people here have the necessary equipment for recompiling, but I attached the source, too, in case you want to see it. Some files are automatically generated (that's the nice thing about this platform).

Let me know if there's something wrong. You are allowed to ask for other features (will there be someone with such interest in this? :shock:), but I can't promise I'll add them. I'll be busy using the software for my DLC! :lol:

UPDATE: I updated the program so that now it retrieves the additional 3 languages introduced in DotP2013. Please forgive me if I don't update the source ZIP, but I swear I just added the languages without modifying the general structure, so it's nothing really new.
Attachments
Localised.zip
Version 1.1.0.1
(715.69 KiB) Downloaded 475 times
Source.zip
(34.25 KiB) Downloaded 393 times
Last edited by thefiremind on 04 Jul 2014, 08:29, edited 4 times in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times

Re: Downloader for localised text

Postby sadlyblue » 23 Apr 2012, 17:09

Thanks.
Looks like a great software to use.
I'll start using it.
sadlyblue
 
Posts: 175
Joined: 06 Feb 2012, 13:18
Has thanked: 18 times
Been thanked: 16 times

Re: Downloader for localised text

Postby Eglin » 23 Apr 2012, 19:34

Nice job. I'm always interested in seeing source. I'd also be interested in seeing some way to automatically merge the new strings with the old ones.
User avatar
Eglin
Programmer
 
Posts: 190
Joined: 01 Mar 2012, 14:44
Has thanked: 36 times
Been thanked: 21 times

Re: Downloader for localised text

Postby thefiremind » 23 Apr 2012, 20:10

Eglin wrote:Nice job. I'm always interested in seeing source. I'd also be interested in seeing some way to automatically merge the new strings with the old ones.
I attached the source.
About your request, I already thought about that, but I can't divide the abilities when they are in a single line, so I wouldn't know how to merge them properly. This was born as a help, not as a complete automation. The big work is when you have a bunch of cards to localise: once you have to localise only the cards that you make in the future, you'll open the XML files one by one anyway. :wink:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times

Re: Downloader for localised text

Postby pcastellazzi » 25 Apr 2012, 10:35

Awesome! As a side note, one thing that is always a mess with custom dlc's is the multiverse id. From magiccard you can easily extract it from the link pointing to gatherer (Gatherer Card Rulings on the site)
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: Downloader for localised text

Postby thefiremind » 25 Apr 2012, 11:56

pcastellazzi wrote:Awesome! As a side note, one thing that is always a mess with custom dlc's is the multiverse id. From magiccard you can easily extract it from the link pointing to gatherer (Gatherer Card Rulings on the site)
I never used the official multiverse ID's... I use my DLC number + progressive number. This way all modders can make their own versions of the same card and they won't interfere. Actually, I don't know if the multiverse ID is really used by the game, but why risking? :lol:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 717 times


Return to Utilities

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 2 guests

Login Form