It is currently 26 Apr 2024, 10:39
   
Text Size

Manalink Translation

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Manalink Translation

Postby Varamil » 23 Jun 2012, 06:55

Hi guys,

(Edit : release here : viewtopic.php?f=85&t=7430)

Firstly I would like to say that your work is wonderful and that is exactly what I was looking for many years !

I was playing with official game since some weeks, and I've just installed CirothUngol mod and it works well.

As my official game is non-English version, have some questions about Manalink translation (in French in my case) :
  • In game message translation. I would like to come back to French messages like "Maine Phase", or "Fast Effect?...Discard Phase", ... I see that in original game, those translations are in some .txt or .cvs file. I've tried to make the same with Manalink, but it doesn't work. How can I do that ?
  • Secondly, I've the same question for Manalink menus : "Duel", "Tools", ... but also "Match parameters", "game option", ...
  • Lastly, I would like to understand how work ct_all.csv and Manalink.cvs. There is not the same number of card in both files. If I would like to translate some things on which file I have to work ? I think only into Manalink.csv for card description, but I'm not sure about name.

Thanks for information.
Last edited by Varamil on 04 Jul 2012, 21:06, edited 1 time in total.
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby stassy » 23 Jun 2012, 09:13

Les fichiers txt et cvs sont des dumps des fichiers dat extrait par Mok lorsqu'il a modifié le jeu pour passer en 1.32, donc ils n'ont aucune influence sur le jeu lorsqu'il se lance.

Normalement le fichier le plus à jour est trouvable dans le dossier magic_updater et c'est l'utilitaire csv2dat.exe qui permet de le convertir en fichier dat utilisable par Magic.exe. Pour la traduction de ce fichier, il faut traduire le csv et après convertir en dat.

Ugly Google translation powah for non froggies:

Txt files are dumps and cvs dat files extracted by Mok when he changed the game to switch to 1.32, so they have no influence on the game when it launches.

Normally the file up to date as is discoverable in the folder and it is magic_updater csv2dat.exe utility which allows to convert dat file readable Magic.exe. For the translation of this file, you must translate the csv and convert after dat.
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Manalink Translation

Postby Varamil » 23 Jun 2012, 09:49

Thanks stassy. Okay for card translation, and I've seen that I have to rename cardart also if I translate card name.

But for Magic.exe translation, Mok has removed localization and directly coded software texts into Magic.exe ?
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby stassy » 23 Jun 2012, 13:21

All the components to create Magic.exe are in the src folder and I guess Mok squeezed everything in.

I know for example that modifying default deck author name has been removed from registry and directly put into one of the c files.
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Manalink Translation

Postby Varamil » 23 Jun 2012, 14:46

Okay, thanks stassy. I will take a look on that.

Otherwise, I've worked a bit on card translation. I've created a net framework application to update easily official Manalink database and not to have to translate manually the Manalink after each update. The only thing that I suppose is the id card doesn't change between two updates.

As I'm a new user I cannot give you the link to the soft, if a moderator can add them it should be nice.

Nevertheless, please find description below :
Description

Magic_CardTranslation is an addon to Manalink 3 to allow easy translation after each card list update by Manalink.csv community.

Requirement

+ Magic_CardTranslation has been coded using Net Framework 2.0, so it should be installed on your computer to work.

For Linux OS, Mono Develop libraries should work because no special functions have been used. Note : not tested yet.

+ Manalink.csv file to patch

+ Patch file(s) : Card translation and/or Generic words for the wanted language.

Installation

No installation is required.

Usage

1. Select the path of Manalink.csv file that you want to path.

2. Select the path of Generic Words patch file and/or the path of Card Translation patch file. You can use just one of those files, but both are recommended.

3. Click to Patch button to start patch. When it's finish, the old Manalink file is backup and the new one is saved into the same folder.

Notes :
+ Card Translation is applied before Generic Words if both files are specified.

Version

v1.0 :
+ First release

License

You can use, distribute and modify this application as you want.

Generic Words Patch

This file is a list of word to translate. It goals is to look for a word into Manalink file and change it by a new word (its translation). It contains 3 columns separated by ";" :
1. Column to change (Integer). To prevent too large update, so you have to specify the column where you want that the word will be translated.

2. Old Value (Regex, String). The word or expression that you are looking for to translate. It can be a simple string or a regular expression (regex). Consequently, if you want to use special symbols (+, *, ., ...) you have to escape them using [].

3. New Value (String). The translation of the previous expression.

Notes :
+ The first line contains columns titles, so not read by the application.

+ Be careful to the order with which words are translated. For example
34;Creature;Créature
34;Legendary Creature;Créature Légendaire
doesn't work, whereas
34;Legendary Creature;Créature Légendaire
34;Creature;Créature
works. Because you update "Creature" before "Legendary Creature", and so there is no more "Legendary Creature" into the file, but "Legendary Créature".

+ Consequence of previous note, prefer start with long expression, and finish with short ones.

+ The list of interesting columns ID is :
1 : Full Name (be careful if you change it, update also the file ct_all.csv)
3 : Short Name
34: Type Text
35: Rules Text
36: Flavor Text
37: Damage Text
38: Effect Title
39: Effect Text
40: Legacy Title
41: Legacy Text

Card Translation Patch

This file is to translate a particular card field. The goal is to look for the ID card and the field column and change the whole text of this field. It contains 3 columns separated by ";" :
1. Card ID (Integer) : The card ID specified into the first column of Manalink.csv

2. Column to change (Integer) : The field column ID where the text has to be updated.

3. New value (String) : the new text that will replace original text.

Notes :
+ The first line contains columns titles, so not read by the application.

+ The list of interesting columns ID is :
1 : Full Name (be careful if you change it, update also the file ct_all.csv)
3 : Short Name
34: Type Text
35: Rules Text
36: Flavor Text
37: Damage Text
38: Effect Title
39: Effect Text
40: Legacy Title
41: Legacy Text
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby stassy » 23 Jun 2012, 18:09

What about creating a new thread here or in the root of the ML forum like PDA?
You could also attach your software zipped so we can test it out.
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Manalink Translation

Postby Varamil » 23 Jun 2012, 22:22

It's a good idea. When app will be tested a bit more and patch files will be created I will edit first post with info and files up to date.

I've not seen that we can attach directly file to a post, so pleased find now the soft in attachment.

I've also work on patch file. I'm able to translate in French automatically card types (creature, instant, ...) and I've also almost finish the translations of abilities (flying, fear, ...) and their description. I join also the actual patch file, there is some mistake but I have some ideas to solve that.

The patch is a bit long to apply (and will be more and more) due to many and many text analysis for each card, but it seems really powerful (due to regex).
Attachments
Magic_CardTranslation_v1.0.zip
App v1.0 + patch file beta
(19.81 KiB) Downloaded 369 times
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby stassy » 24 Jun 2012, 16:32

I don't see the card translation file in your archive, didn't you say both were needed?
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Manalink Translation

Postby Varamil » 24 Jun 2012, 21:36

No, both aren't needed, you can use either one of them or both. Because I think each way is able to translate completely the database. And moreover, when I've posted files, I had only worked on Generic Words.

By the way, I really improve the Generic Words file today. It seem really possible to translate automatically the file, but if it's easy to have a mixed language, it's hard (and need much time) to obtain a perfect translation.

So I start to work on the other way : card translation. I've looked for French database on the Internet, and find the French Magic Library which is a file that really looks like Manalink.csv. So I work today on the updating of Manalink using FML database.

At the beginning it was looking easy. But some "mistake" into both database generate many errors during compilation. Firstly into Manalink db there is some ";" between quotes that are not considered as separator. So I add a "clean" step in my app to replace those ";" by ",". Secondly, into FML db there was a mix of html, misplaced \r\n and multi quotes. I add also a "cleaning" step in the app.

To conclude the actual state is :
- Generic words has been improved but use for the moment only for card types
- A French db has been found and can be used to translate the most of cards (only rules texts, flavor texts generate too much error for the moment with this db)

About usage :
1. Download French Magic Library from their website (google) - it's a .mm file
2. Open this file and suppress all \r\n (but no \n alone) into this file (you can use notepad++ to do that). It's not yet coded
3. Open my soft, specify Manalink.csv path, for Generic Words use the last file (in next upload), and for Card Translation use FML cleaned file (see step 2).
4. Then patch ! (long but should work).

I finish packaging file and I upload the last version.
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby stassy » 25 Jun 2012, 06:41

Are the translation mistakes from your source originate from the other database or was it from the french version of gatherer?

Since the translation from english to french might add more words, do you have a screenshot of a card, let's say Jace, the Mind Sculptor, so we can see how ML handle it?
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Manalink Translation

Postby Varamil » 25 Jun 2012, 09:39

So please find last version of my app.

More details about files into zip file :
+ App : I change a bit the interface for a more understandable one (with help message). The core contains last updates presented in my last post.

+ "Manalink Already Patched using FML" folder : contains the Manalink.csv file patch using this app and the FML database (see next point).

+ "Patch using FML db" folder : contains two files. The first one is the FML database with \r\n cleaned (see previous post). The second one is generic words patch file for card types. Those both files have been used to obtain the patched Manalink.csv (see previous point).

+ "Patch using Generic Words only" folder : contains the generic words patch file which can be use for a complete and automatic translation. The result start to be good, but for the moment it's more Frenglish than French or English.

Have fun !
Attachments
Magic_CardTranslation_v1.1.zip
App v1.1 + Manalink patched + patch files
(3.95 MiB) Downloaded 344 times
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby Varamil » 25 Jun 2012, 10:21

Sorry stassy, I haven't seen your last post.

So please find attached some card picture with French texts. About text length, as you can extend the text box, I think it's not a real problem. About Jace, the Mind Sculptor, how you can looking for a card using Manalink ? I've read that function exist but I haven't found yet how to do that.

When I say "mistakes" I would say :
  • With my app, I open Manalink.cvs and split each line using a ";" separator. But into the files there is some ";" between quotes that have not to be considered as separator like :
    "Choose one - Destroy target creature; or deals 3 damage to target player"
    Here the ";" is not a csv separator. So I clean firstly the Manalink.csv file replacing those kind of ";" by ",". I have to do that because split() function of net framework doesn't make the difference between separator and quoted separator.
  • Moreover, during Manalink.csv conversion, quotes have a meaning, and non closed quote generate a fatal error.
  • Lastly from FML database, there is many html character code (like é for é, or « for «) where the ";" generate the same kind of problem as previously. There is also some anarchic quoting (multi quoting, non closed quote) which generate also fatal error during Manalink.csv conversion to Cards.dat. And this problem of quoting into FML database happen more often into flavor text than rules text that why Ive only work on the last one for the moment (and it's also the most important).

From my point of view FML database is not the database we can wish (many coding mistake, not sorted, all card haven't been translated), but it still a big work from those guys, and allow us to save much time even we have to use some tummies.
Attachments
Pictures.zip
Cards picture with French rule text
(117.11 KiB) Downloaded 350 times
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby stassy » 25 Jun 2012, 13:02

Nice, now all is missing should be lore and UI, however for the background image, some image editing software will be required if you want it to be fully translated...or you could ask Sarlack to make the edit :D
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Manalink Translation

Postby Varamil » 25 Jun 2012, 16:00

I'll take a look on sources about UI translation.
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Re: Manalink Translation

Postby Varamil » 26 Jun 2012, 17:28

Looking for better database, I've found Getherer (the original source is often the best ^^) and also (on this forum) a soft to download all data from this website in the wanted language !

So I'll make an update of my app to be able to translate Manalink card using database.

About Manalink GUI, I haven't find any source file that can I study and translate.

Last thing, if I have easily card name translation it seems a big work to update Manalink : have to update both database (ct_all and Manalink) and the harder update all card picture names.
Varamil
 
Posts: 16
Joined: 23 Jun 2012, 06:35
Has thanked: 1 time
Been thanked: 2 times

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 37 guests


Who is online

In total there are 37 users online :: 0 registered, 0 hidden and 37 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 37 guests

Login Form