Clan UFW

Warcraft 3 USEast Clan for Fate / Another
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 wcstrings (porting translations tool)

View previous topic View next topic Go down 
Go to page : 1, 2  Next
AuthorMessage
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: wcstrings (porting translations tool)   Sun Apr 25, 2010 3:00 pm

I decided to move this to a different thread.

Previous posts regarding wcstrings are listed in this first post, newest to oldest, starting from the top.

These first quoted posts are originally from http://clanufw.darkbb.com/discussion-f10/fate-another-ii-english-version-translation-team-recruitment-t712.htm

Note that the version in the download link with the "s" before the version includes the source of wcstrings (and the libraries it uses). If you do not plan on looking at the source code of wcstrings, do not download the source version (which is about 20 times larger than the binary only version).

Compiled with the GCC toolset (gcc (TDM-2 mingw32) 4.4.1)
If you use Code::Blocks, you can open the workspace file present in the source distribution to easily make changes and recompile wcstrings. Make sure wcstrings is the currently selected project, that the build target is "All", then use "Build Workspace".

Quote :
First experimental version of wcstrings (the name I have given to the translation porting tool) is complete.
mediafire.com d3z

Supported operations include:

compare (c/C): takes in two map files and attempts to output the additions/removals/changes in regards to the objects from map A to map B

transfer (t/T): takes in three map files, the first being the old source map, the second being the translated map, and the third being the newest non-translated map. Moves over all translations in the object files (abilities / units / items / upgrades / buffs) to the newer map, provided they did not become outdated. This modifies the third map you put in, it is recommended you back it up before doing this operation.

extract (e/E): takes in a map file and a filename to output to; runs through the map's .j and .wts files and gathers all strings into a single file you may modify; the format is similar to as follows:
Code:
t["|c00808080Select방식으로만 캐릭터를 고릅니다."] = "|c00808080Select방식으로만 캐릭터를 고릅니다."; -- << Translation would go on the right
t["|c00808080Random으로만 캐릭터를 선택합니다."] = "|c00808080Random으로만 캐릭터를 선택합니다.";
t["|c00808080Free로 아무 방식이나 고를 수 있습니다."] = "|c00808080Free로 아무 방식이나 고를 수 있습니다.";

The strings file generated can then be utilized with the transfer strings command below to apply any translations you make in the strings file to the map itself

transfer strings (j/J/l/L): takes in a map file and the strings file you receive from the above command; places in translated strings where applicable in the .j and .wts files. This command modifies the map you enter. You may want to back it up first.

update strings (u/U): takes in a map file and the strings file received from the extract command above; searches through the map's .j and .wts strings for any strings that are not currently in the strings file. Adds new strings to the strings file.

generate strings from a source map and a translated map (g/G): this command is meant to be used if you already translated part of a map's .j file and/or .wts file manually. It allows one to generate a strings file (similar to the above extract command) that contains the translations already done in the map. This command only works if the source map and translated map have their strings in the same positions relative to other strings. If you did not add or remove strings, and you did not change the placement of any strings in either map (modifying the contents of each string is obviously fine, though), this command should work. If you ran an optimizer or some other such tool on either map, expect this command to fail.







Here is some example output demonstrating the object transfer command, string extraction, and string importation:

The first command loops through the objects in map FateAnother2v11kr.w3x, checks the same objects in map FateAnother2v12ir.w3x, and if the objects have string matches (ability descriptions / etc remained the same between the two versions), the translation in map fateanother2v10kre2.w3x is used.

The second command simply extracts the strings in the .j and .wts files and places them in "out1"

The third command takes the translations in "out1", then uses those translations on FateAnother2v12ir.w3x (of course, this requires modifying the strings file output in the second command)
Quote :

C:\www\C\codeblock\projects\wcstrings\bin\release>wcstrings t FateAnother2v11kr.w3x fateanother2v10kre2.w3x FateAnother2v12ir.w3x
Opened file [fateanother2v10kr.w3x]
Loading [scripts\war3map.j]... done (944568 extracted)
Loading [war3map.j]... not found
Loading [war3map.wts]... done (23169 extracted)
Loading [war3map.w3u]... done (92148 extracted)
Loading [war3map.w3a]... done (646973 extracted)
Loading [war3map.w3t]... done (15427 extracted)
Loading [war3map.w3h]... done (16199 extracted)
Loading [war3map.w3q]... done (19927 extracted)

Parsing units
Parsing abilities
Parsing items
Parsing buffs
Parsing upgrades

Opened file [fateanother2v10kre2.w3x]
Loading [scripts\war3map.j]... done (972623 extracted)
Loading [war3map.j]... not found
Loading [war3map.wts]... done (750 extracted)
Loading [war3map.w3u]... done (88283 extracted)
Loading [war3map.w3a]... done (598562 extracted)
Loading [war3map.w3t]... done (18483 extracted)
Loading [war3map.w3h]... done (15975 extracted)
Loading [war3map.w3q]... done (19927 extracted)

Parsing units
Parsing abilities
Parsing items
Parsing buffs
Parsing upgrades

Opened file [FateAnother2v12ir.w3x]
Loading [scripts\war3map.j]... done (961854 extracted)
Loading [war3map.j]... not found
Loading [war3map.wts]... done (23140 extracted)
Loading [war3map.w3u]... done (98027 extracted)
Loading [war3map.w3a]... done (669251 extracted)
Loading [war3map.w3t]... done (22044 extracted)
Loading [war3map.w3h]... done (16188 extracted)
Loading [war3map.w3q]... done (20000 extracted)

Parsing units
Parsing abilities
Parsing items
Parsing buffs
Parsing upgrades

Building trees ... done

Searching through units
Searching through abilities
Searching through items
Searching through buffs
Searching through upgrades
Translating units
Translating abilities
Translating items
Translating buffs
Translating upgrades
Opened file [FateAnother2v12ir.w3x]
Updating [war3map.w3u]... done
Updating [war3map.w3a]... done
Updating [war3map.w3t]... done
Updating [war3map.w3h]... done
Updating [war3map.w3q]... done
FateAnother2v12ir.w3x updated

C:\www\C\codeblock\projects\wcstrings\bin\release>wcstrings e FateAnother2v12ir.w3x out1
Opened file [FateAnother2v12ir.w3x]
Loading [scripts\war3map.j]... done (961854 extracted)
Loading [war3map.j]... not found
Loading [war3map.wts]... done (23140 extracted)
Loading [war3map.w3u]... done (98027 extracted)
Loading [war3map.w3a]... done (669262 extracted)
Loading [war3map.w3t]... done (22044 extracted)
Loading [war3map.w3h]... done (16188 extracted)
Loading [war3map.w3q]... done (20000 extracted)


C:\www\C\codeblock\projects\wcstrings\bin\release>wcstrings l FateAnother2v12ir.w3x out1
Opened file [FateAnother2v12ir.w3x]
Loading [scripts\war3map.j]... done (961854 extracted)
Loading [war3map.j]... not found
Loading [war3map.wts]... done (23140 extracted)
Loading [war3map.w3u]... done (98027 extracted)
Loading [war3map.w3a]... done (669262 extracted)
Loading [war3map.w3t]... done (22044 extracted)
Loading [war3map.w3h]... done (16188 extracted)
Loading [war3map.w3q]... done (20000 extracted)


Loading translations in "out1" ... done

Applying translations... done
Opened file [FateAnother2v12ir.w3x]
Updating Scripts\war3map.j... done
Updating war3map.wts... done
FateAnother2v12ir.w3x updated

Quote :
I finished coding the comparison part of the tool. Note that this simply notifies the user of which abilities/items/units had their strings changed from version to version, and if an ability/item/unit was either added or removed from version to version.

Here's example output, with comparisons between FateAnother2v12br.w3x and FateAnother2v12gr.w3x

With the below output, there are 11 abilities that would need a Korean/English person to hand-edit them (10 relevant abilities were changed, 1 ability was added).

Code:
C:\www\C\codeblock\projects\EMS\wcstrings\bin\lateral>wcstrings c FateAnother2v12br.w3x FateAnother2v12gr.w3x
Opened file [FateAnother2v12br.w3x]
  Loading [scripts\war3map.j]... done (952839 extracted)
  Loading [war3map.j]... not found
  Loading [war3map.w3u]... done (95404 extracted)
  Loading [war3map.w3a]... done (668238 extracted)
  Loading [war3map.w3t]... done (15558 extracted)

Parsing units
Parsing abilities
Parsing items

Opened file [FateAnother2v12gr.w3x]
  Loading [scripts\war3map.j]... done (961046 extracted)
  Loading [war3map.j]... not found
  Loading [war3map.w3u]... done (95404 extracted)
  Loading [war3map.w3a]... done (673248 extracted)
  Loading [war3map.w3t]... done (15576 extracted)

Parsing units
Parsing abilities
Parsing items

Building trees ... done

Searching for removed abilities
Searching for changed abilities
  Ability [A01O] was changed
    Conflicting modification IDs were...
      abufA1, abufA2, abufA3, abufA4, abufA5, atarA1, atarA2, atarA3, atarA4, atarA5
  Ability [A01R] was changed
    Conflicting modification IDs were...
      abufA1, abufA2, abufA3, abufA4, abufA5, atarA1, atarA2, atarA3, atarA4, atarA5
  Ability [A070] was changed
    Conflicting modification IDs were...
      aub1A1
  Ability [A07V] was changed
    Conflicting modification IDs were...
      aub1A1
  Ability [A05F] was changed
    Conflicting modification IDs were...
      aub1A1, aub1A2, aub1A3, aub1A4, aub1A5
  Ability [A011] was changed
    Conflicting modification IDs were...
      aartA0
  Ability [A060] was changed
    Conflicting modification IDs were...
      aub1A1
  Ability [A05U] was changed
    Conflicting modification IDs were...
      aub1A1, aub1A2
  Ability [A08K] was changed
    Conflicting modification IDs were...
      aub1A1
  Ability [A08S] was changed
    Conflicting modification IDs were...
      arutA0, aub1A1, aub1A2, aub1A3, aub1A4, aub1A5
  Ability [A06L] was changed
    Conflicting modification IDs were...
      arutA0
  Ability [A0AD] was changed
    Conflicting modification IDs were...
      aub1A1
  Ability [A0BK] was changed
    Conflicting modification IDs were...
      aub1A1
Searching for added abilities
  Ability [A0BI] was added
Searching for removed units
Searching for changed units
Searching for added units
Searching for removed items
Searching for changed items
Searching for added items

C:\www\C\codeblock\projects\EMS\wcstrings\bin\lateral>

Note that this will even check that useless strings have changed (useless strings being things such as the ability's targets, buff targets, button textures, and so on).

The strings you actually care about translating are things with an ID like aub1 and arut (these refer to the tooltip and research tooltips respectively). Things like abuf and atar can be ignored completely.

Probably will modify the program to return only relevant string conflicts eventually.

Everything not appearing in the "changed" list that was translated would be able to be moved over between versions automatically with no problems. Things that have a "change" can only have the strings that weren't changed transferred over, possibly resulting in a partial translation of an ability/item/unit.


Example changes between versions

Code:

  Ability [A070] was changed
    Conflicting modification IDs were...
      aub1A1

Here's what change that's actually referring to:

Quote :
|c0080ffff속성 습득 포인트: 10

|c00ff8080주변 적의 이동속도와 공격속도를 30%씩 감소시킨다.

becomes

Quote :
|c0080ffff속성 습득 포인트: 10

|c00ff8080주변 적의 이동속도와 공격속도를 30%씩 감소시키며 마안의 외부적 이펙트가 없어진다.

between the two versions I checked.

Code:
Ability [A01O] was changed
    Conflicting modification IDs were...
      abufA1, abufA2, abufA3, abufA4, abufA5, atarA1, atarA2, atarA3, atarA4, atarA5

Refers to...

Quote :

Level 1 - Stats - Buffs = None
Level 2 - Stats - Buffs = None
Level 3 - Stats - Buffs = None
Level 4 - Stats - Buffs = None
Level 5 - Stats - Buffs = None
. . .
Level 1 - Stats - Targets Allowed = None
Level 2 - Stats - Targets Allowed = None
Level 3 - Stats - Targets Allowed = None
Level 4 - Stats - Targets Allowed = None
Level 5 - Stats - Targets Allowed = None

becoming

Quote :

Level 1 - Stats - Buffs = B00K
Level 2 - Stats - Buffs = B00K
Level 3 - Stats - Buffs = B00K
Level 4 - Stats - Buffs = B00K
Level 5 - Stats - Buffs = B00K
. . .
Level 1 - Stats - Targets Allowed = Enemy
Level 2 - Stats - Targets Allowed = Enemy
Level 3 - Stats - Targets Allowed = Enemy
Level 4 - Stats - Targets Allowed = Enemy
Level 5 - Stats - Targets Allowed = Enemy

between versions.



Suggestions as to how to output the conflicts are welcome, of course.

Probably would be a good idea to show the conflicting strings themselves in the lists above.

Quote :
Close to identical to each other, you say. Between a translated and untranslated map, not only are they close to identical, they are identical, with the strings being the only necessary difference. In my previous post I gave no intention of "unprotecting" a map or using any other such tool. Using automated programs to do that task is just asking for a butchery.

As for differences between an old untranslated version and a new untranslated version, how much really changes?

In order for two maps of Fate to not be "close to identical" to each other with just object ID and string comparison, that would mean the Korean makers would have to change every object ID or every description/name/tooltip every version. I haven't really checked, but I'm pretty sure this is wasted effort on their part since not much changes in these sectors between versions (based solely on how the abilities work).

Also, I did not give a bunch of specifics as to how such string comparison would work for no reason.

For one thing, ability/item/unit IDs are not very likely to change between versions (my BPA command in TFTLocal hasn't been modified for over 10 Fate versions, yet it still announces the proper hero Archer is targeting based solely on the unit ID).

Comparisons for ability/item/unit strings would first build a tree (or three) or their respective IDs, then compare strings between two versions (if you understand the format of the respective WE files, this is easy). Ability/unit/item IDs not found in one map but present in the other would simply be notified to the person running the tool.

You might be worrying about the map's .j file, though. I did mention this would probably be the hardest thing to run a string comparison / transfer tool on, since the .j file is the most likely of things to change between map versions (and there are no anchors like object IDs present). However, just like object IDs, most strings probably don't change either. For this reason, building a hash table of Korean strings along with their English translations would serve to pin point every string in the .j file that has already been translated.

Strings that don't have a matching hash / translation would simply be listed to the user running the tool.

The ideas as I've listed them are not difficult at all for a programmer to implement, so long as the data formats for the ability/item/unit data files are known (which they are). All the program I'm detailing would do is compare known data and transfer known data to known locations.

The point of the tool is not to automate the translation process. It's to reuse translations as much as possible with no analysis and copy and paste effort from the person updating the translation to a new version. As I mentioned before, even with the tool, hand edits will be necessary, but likely this will be much simpler with a list like...
Quote :

210 abilities were copied over with no incident
80 units were copied over with no incident
40 items were copied over with no incident
Ability [XXXX:Unlimited Blade Works] changed its name/description/tooltip
New ability [XXXX:'Avenger's Newest Attribute'] present in map B but not in map A
Ability [XXXX blah] is present in map A but not in map B (removed ?)

Strings from the .j file most likely would be placed into a .txt file with the string itself (for the translator to translate) and the ID of the string.

Quote :

STRING_001 {
Korean text
}

STRING_002 {
Korean text
}

Kind of like the .wts file, only this would hold every map string in the .j file. Furthermore, the user would be able to throw this text file back into the program to have it update all of those strings in the .j file (the locations of the strings to replace would be stored in a database).


On another note, I have no intention of "unprotecting" the map. The required files can be extracted and re-imported with no "unprotection".

Honestly, I feel anyone hoping to translate a map still in development would think of ways to reduce the workload of switching to a newer untranslated version.

The point of the tool I have in mind is to not start on square one every time a new version of Fate is released. Most likely someone who can read Korean and English will have to do a lot of copying and pasting for even just a minor version release, which they most likely would not want to do, which most likely would mean translated versions not up to date with the Korean version.

(I have to do something similar to this to update TFTLocal upon every Wc3 patch, which I do not look forward to doing. I wish people would stop introducing game breaking hacks so Blizzard would stop patching, geez)

The tool is basically meant to handle the "copy and paste" part of transfer.

Although, for updating object IDs / translations, it may be easy to use the object hack part of Grimoire to simply add in object additions with the proper IDs. Regardless, the person doing this will still have to check every object ID for changes and every description for changes (something the tool would do).

The tool would basically attempt to organize an update process into these steps:
1) Compare old translated version to new untranslated version and note any changes
2) Transfer old translated strings into new version
3) Hand edit the things the tool couldn't handle (new abilities / new Korean text in description/name/tooltips, etc)
4) Instruct the tool to copy over all old English translations into byte-for-byte string matches in the untranslated map
5) Instruct the tool to build a text file of all strings in the untranslated map
6) The Korean/English fluent person hand translates all the things untranslated in the text
7) Instruct the tool to re-import the text file and replace all strings found in the map based on string position
8) The Korean/English fluent person would then translate the loading screen or whatever

Well, update the map some other way I guess?

Quote :
Most likely I could help with any of your demands not related to translation.

Although I do not think removing protection from a map is necessary - I could simply extract ability, item, unit, and other such data into a blank map that you can modify and save to have the WE generated updated files, which can they be re-imported into the official map itself.

Perhaps as a side project, I could code up something to help make updating translations a simple task. Such a program might do things such as:
- allow the user to specify two maps as input
- with two input maps, allow the user to instruct the program to compare ability/item/unit/etc data between the two maps and discover differences (most likely a byte-for-byte comparison, which means there might not have been any substantial change - but it would allow the user to focus his attention to areas of translation that may need updating);
ability/item/unit IDs present in one map and not the other would also be noted;
- with two input maps, allow the user to instruct the program to copy ability/item/unit data from one map to the other map (this copying would likely function on ability/item/unit IDs matching between the two maps; again, abilities/items/units present in one and not the other might be noted)

The comparative function of the program would be used between two Korean versions of the map (the version translated and the newest released version). This would allow translators to quickly find areas that might need updated translations and note them.

Then the copy over command could be utilized to handle the brunt of the translation process again. Most likely some hand editing will be required of someone if there are differences between maps, however.

In the simplest case, assuming no major changes between Fate versions, the process might be as simple as...

shell> program -e "fateanother_oldver" "fateanother_newver"
"Examine" differences... perhaps no differences are noted, in which case...

shell> program -c "fateanother_oldengver" "fateanother_newver" "fateanother_newengver"
"Copy" string data from input one to input two, forming a new output file input three

Hand edit necessary things such as the loading screen, differences in abilities, and so on.

Although, handling strings directly in the .j file would be slightly more complex than anything else, I think. That might deserve a separate tool all on its own. Likely I would have to find all occurrences of strings, place them in a database somewhere, and note where (and how often) they occur (for repeat strings). Most likely I would use some form of SQL database for this. Untranslated strings could be output to a text file, where the translator could edit them into English, then request the program to import the translations back into the official .j file.

This would certainly make the initial translations easier for the .j file, though forwarding old .j file translations into new .j file translations is a potential problem. String contents and string positions can change easily in a .j file between versions, whereas with abilities/items/units, there's at least an ID one could use to forward old translations into new places.

I suppose one course of action could be to replace exact string matches in the .j file, then note strings that could not be replaced by an older translation.


Of course, this is all fantasy at the moment. Likely I wouldn't be able to start working on such a program this week, or even this month, anyway (though the advantage of having such a program wouldn't be immediately necessary on the first translation attempt anyway).


Last edited by d3z on Sun Apr 25, 2010 3:14 pm; edited 3 times in total
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Sun Apr 25, 2010 3:05 pm

I am currently considering changing the "extract" and "update strings" commands to include object strings as well (for abilities / items / upgrades / buffs / units: their descriptions / names / etc). This way, someone translating the map could run the extract or update strings command and then translate everything necessary in one file. No interaction with the World Editor would be necessary (for modifying object data). Of course, this would mean merging the "transfer" and "transfer strings" commands as well.

In addition to that, I was considering a "prune" command, that would remove strings in the strings file that are present in the strings file but not in the map checked against (thus, removing old strings from the strings file).

Feel free to offer suggestions.
Back to top Go down
View user profile
Yden

avatar

Posts : 254
Join date : 2009-08-31
Age : 33
Location : The OC

PostSubject: Re: wcstrings (porting translations tool)   Tue May 04, 2010 12:55 pm

Strange problem with I'm getting with this. The same couple of strings never seem to get ported over between daydream versions. Name strings for the prismriver sisters (all 4 of them), chen, Youmu, and Byakuren never seem to port over, their titles and store tooltips do though just the hero names (proper name I think it's under?)

mediafire.com ?mniwzg3nwmj
mediafire.com ?ez04ndy2hdz
mediafire.com ?ymzjtwudno5
Back to top Go down
View user profile http://nanoha.10.forumer.com/
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Wed May 05, 2010 2:57 pm

Yden wrote:
Strange problem with I'm getting with this. The same couple of strings never seem to get ported over between daydream versions. Name strings for the prismriver sisters (all 4 of them), chen, Youmu, and Byakuren never seem to port over, their titles and store tooltips do though just the hero names (proper name I think it's under?)

mediafire.com ?mniwzg3nwmj
mediafire.com ?ez04ndy2hdz
mediafire.com ?ymzjtwudno5

I'll take a look at it soon. Thanks for the report.

Alright, new versions have been uploaded that should resolve that issue. The problem was with how wcstrings mapped translations. wcstrings searches through all object strings in the old untranslated version and maps those strings to all the matching strings in the translated version. If a string was left untranslated, wcstrings would map the untranslated string to the untranslated string. wcstrings correctly mapped those hero names to their translations, but then it came across those hero names again in other places where they were not translated, which replaced the correct translation.

I modified wcstrings to not map a string as a translation if it is the same as the string it is supposedly translating.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Fri Jul 09, 2010 9:23 am

A new version was uploaded today.

An issue with updating the strings file via the update command (u/U) was resolved; previously, attempting to update the strings file basically resulted in a normal extraction (losing your translation progress).

After discovering this problem, I advise you back up files that will be modified by a command.
Back to top Go down
View user profile
Brogath

avatar

Rank : Dark Saber (11) Posts : 284
Join date : 2009-10-13
Age : 28
Location : Netherlands

PostSubject: Re: wcstrings (porting translations tool)   Tue Jul 27, 2010 12:51 pm

when using the 'c' command it rushes through the progress but closes the window after finishing its process, cant you add line that requests the user to press escape/enter/somethingsimilar
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Tue Jul 27, 2010 2:36 pm

Brogath wrote:
when using the 'c' command it rushes through the progress but closes the window after finishing its process, cant you add line that requests the user to press escape/enter/somethingsimilar

Might be something I will add in the future, but all of these commands are meant to be ran on the command prompt so that you can see all the output even after the program exits.

Alternatively, you can run it with redirection so that the output goes to a file...
Quote :
wcstrings c "map1_path" "map2_path" > "outputfile.txt"
Back to top Go down
View user profile
Yden

avatar

Posts : 254
Join date : 2009-08-31
Age : 33
Location : The OC

PostSubject: Re: wcstrings (porting translations tool)   Mon Aug 09, 2010 1:06 pm

The tool seems to also be parsing hotkey changes. This causes it to change they hotkeys of all skills with the same character.
Back to top Go down
View user profile http://nanoha.10.forumer.com/
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Wed Aug 18, 2010 8:54 pm

Yden wrote:
The tool seems to also be parsing hotkey changes. This causes it to change they hotkeys of all skills with the same character.

Ah, I had not thought of that possible problem. For the object data translation porting, wcstrings considers every string type it finds in the object data, and there are quite a lot of those.

I may add support for a blacklist or something similar to get around the problem you mentioned. Thanks for the report.
Back to top Go down
View user profile
frankiethefly



Rank : Gilgamesh(2) Posts : 528
Join date : 2009-08-05

PostSubject: Re: wcstrings (porting translations tool)   Mon Aug 30, 2010 11:39 am

I am still waiting for the translation files, so I can start getting on the nerves of every korean I meet.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Tue Aug 31, 2010 2:18 pm

I have uploaded a new version of wcstrings. Now, when using the "transfer" (t/T) command, wcstrings will look for an optional file "blacklist.txt".

Within blacklist.txt you can specify modification IDs to ignore, with each modification ID on its own line.

Modification IDs are four characters long and can be found in files such as Units/UnitMetaData.slk and Units/AbilityMetaData.slk.

In AbilityMetaData.slk, the two modification IDs that I found for hotkeys were "ahky" and "auhk" for "hotkey" and "unhotkey" respectively (later I found "arhk" for research hotkey).

The blacklist.txt might look like this, then:
Code:
ahky
auhk
arhk

I have not tested this update, so feel free to respond with how it works for you.

Also, frankiethefly, if you want the strings you can just download this program and read in the first post how to use the "extract" command. Then you can just use it on the newest F/A map.

http://clanufw.darkbb.com/discussion-f10/any-koreans-interested-in-translating-t979.htm has more information on the format of the strings file. Also worth note is the fact that many useless strings / things that do not need to be translated will also be extracted into the strings file. These are usually pretty obvious (numbers, blank strings, etc).


Last edited by d3z on Tue Sep 14, 2010 7:34 pm; edited 1 time in total
Back to top Go down
View user profile
frankiethefly



Rank : Gilgamesh(2) Posts : 528
Join date : 2009-08-05

PostSubject: Re: wcstrings (porting translations tool)   Tue Aug 31, 2010 4:13 pm

Alright, I'll look into how to use this.
Back to top Go down
View user profile
Brogath

avatar

Rank : Dark Saber (11) Posts : 284
Join date : 2009-10-13
Age : 28
Location : Netherlands

PostSubject: Re: wcstrings (porting translations tool)   Tue Aug 31, 2010 7:41 pm

frankiethefly wrote:
I am still waiting for the translation files, so I can start getting on the nerves of every korean I meet.
what files would you like? raw files or the translated ones.

since my vacation is over, i wanted to restart the translation of the map (1.3b) so i can prolly provide you with anything you need given some time.

base translation seems to work pretty damn good with this tool btw, i will most likely dig deeper and see how far i can go with it Smile
Back to top Go down
View user profile
frankiethefly



Rank : Gilgamesh(2) Posts : 528
Join date : 2009-08-05

PostSubject: Re: wcstrings (porting translations tool)   Wed Sep 01, 2010 3:09 pm

Ok I read through all of this and have a basic idea how to use it. Will seperate the string file into several small bits, to make the translation easier.

Thx brograth. After talking with squally I found out that we can basically take your units and abilities translations but a special file which I have noted down at home needs to be retranslated it seems. I will send you a part of the string file, if you like to help.
Or alternatively you can take over the project of a speedy contineous translation, which will spare me a lot of time and effort I guess. Just contact me in that case. I will start the work around this week though.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Thu Sep 02, 2010 2:18 pm

I updated http://clanufw.darkbb.com/discussion-f10/any-koreans-interested-in-translating-t979.htm with more specific guidelines (and prettyful colors).

Feel free to direct any translators there before they start translating.

09-03 edit:
New version of wcstrings uploaded that reverts a change.
Back to top Go down
View user profile
frankiethefly



Rank : Gilgamesh(2) Posts : 528
Join date : 2009-08-05

PostSubject: Re: wcstrings (porting translations tool)   Fri Sep 03, 2010 7:19 am

Thanx for the guidelines. These will help a lot. I might need to look into how to display korean characters first before I continue dividing the string file.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Wed Sep 08, 2010 10:01 am

New version of wcstrings uploaded today.

With the object data transfer command, wcstrings will now attempt to parse .wts strings that are found within object data (TRIGSTR_'s).

In a separate update, wcstrings now attempts to escape backslashes and quotation marks in strings so that they are properly ported back into the map.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Sat Sep 11, 2010 7:58 pm

Updated today.

A crash occurring in the compare/transfer object data commands when not all object files are found should be resolved.

Display of modification IDs in the compare command altered slightly.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Tue Sep 14, 2010 7:38 pm

Updated.

Changed how modification IDs are decorated during parsing against the blacklist.txt file.

Modification IDs that can occur only once in an object will be the four letter ID found in the appropriate .slk file.
Modification IDs that can have multiple levels (such as cooldown in an ability) will be decorated the four letter ID, followed by a space, followed by the number (starting from 1).
Lastly, modification IDs that have both a letter association and can have multiple levels will be decorated with the four letter ID, then the letter (A through H), then the number (starting from 1).

The last case occurs for the data types in the world editor that have a letter and number following the raw field name (CTRL + D toggles raw/normal displays).

This change is temporary until I feel like improving it (a long time from now tomorrow). It does not really make sense to leave the numbers in the comparison against the blacklist.


Last edited by d3z on Thu Sep 16, 2010 7:02 am; edited 2 times in total
Back to top Go down
View user profile
frankiethefly



Rank : Gilgamesh(2) Posts : 528
Join date : 2009-08-05

PostSubject: Re: wcstrings (porting translations tool)   Tue Sep 14, 2010 9:31 pm

Minsky had the question how to open the string file I sent him. Notepad and word don't seem to work for him.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Thu Sep 16, 2010 7:00 am

Updated.

Modification ID decorations should not matter anymore for the blacklist (the modification ID should match exactly how it appears in the various meta data .slk files; four letters each).

Changed .j file priority to the one not found in /scripts.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Wed Sep 22, 2010 2:18 am

Updated.

Extracting strings from the .j and .wts files now creates two separate wcstrings files to correspond to the .j file's strings and the .wts file's strings. Now the last argument (name of strings file) will instead be a string applied before the output files. Output files have this format: [name]_strings.lua and [name]_script.lua. When trying to import strings, be sure to use [name] again.

Two new commands were added:
- a/A (extract all object data strings) will extract all of the modified strings found in each modified object. There will be a separate file for each object data file found ([name]_abilities.lua, [name]_units.lua, [name]_upgrades.lua, etc). The blacklist.txt does affect what strings will show up in the newly created files. Modification IDs are shown as LUA comments above each string entry (remember, adding these IDs to the blacklist involves leaving out the last number if there is a space between it and the modification ID).
Command format is:
Code:
wcstrings a [map_old_sourcelanguage] [map_old_targetlanguage] [map_new_sourcelanguage] [name]
Where [name] is the string that will come before each output file.
- x/X (import all object data strings)
Format:
Code:
wcstrings x [target map] [name]
Where [name] is the string you used in the previous command (a/A).

Various other changes in the background implementation were made as well.

A lot was changed in this version. Consider this version experimental. A lot of things may have been broken or may not work as expected.

As always, feel free to report any problems you might find.

By the way, I recommend using a LUA syntax highlighting editor to modify these files (the editor should also support UTF 8 without BOM format). Notepad++ is the editor I use (I run the Unicode version under Applocale).
Back to top Go down
View user profile
Brogath

avatar

Rank : Dark Saber (11) Posts : 284
Join date : 2009-10-13
Age : 28
Location : Netherlands

PostSubject: Re: wcstrings (porting translations tool)   Wed Sep 22, 2010 3:58 am

notepad++ is the only editor i currently have that is able to save any changes and still allow wcstrings to work with it.

regular notepad does not word, neither does word or open office writer with adjusted settings.
i had a few other ones. i believe i tried jasscraft as well but none of those had the wanted result/

so i just got this notepad++ and added 'microsoft applocale' to allow korean symbols to be displayed inside.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Thu Sep 23, 2010 6:59 pm

Updated.

Only change is a bug fix, in which the blacklist was not properly parsed for the newest commands in the last release.

Also, making a blacklist for the two newest commands has made me want a whitelist now more than ever. Probably will add support for one sometime.
Back to top Go down
View user profile
d3z
Fate Another Developer
avatar

Posts : 112
Join date : 2009-08-15

PostSubject: Re: wcstrings (porting translations tool)   Fri Sep 24, 2010 9:43 pm

Updated.

Modified the "extract all object data strings" command such that new strings not present in the first two maps will be placed into the strings file without a translation.

Also, when importing object data strings, wcstrings will report errors if a translated string is greater than 1023 bytes and skip translation for that string (allowing strings greater than 1023 bytes would crash wc3 on load).
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: wcstrings (porting translations tool)   

Back to top Go down
 
wcstrings (porting translations tool)
View previous topic View next topic Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» God Tool Availability In Sandbox
» Battle Report Imaging Tool
» SANKit tool
» Now I need Paint Tool Sai help???!!!
» Bug Report: Flight to AREA51 not returning "Always" "Hydraulic Tool"

Permissions in this forum:You cannot reply to topics in this forum
Clan UFW :: Warcraft 3 :: Map Making-
Jump to: