Torchmodders

Modding => Tips & Tools => Topic started by: Awkward on December 21, 2019, 09:59:00 pm


Title: [Tool] another localization tool
Post by: Awkward on December 21, 2019, 09:59:00 pm
Writing program while sit at home, sick and almost without internet.
Possible bugs and slightly slow work (every new/opening project reload it's own copy of TRANSLATION.DAT).
But looks like work "almost the same" phrases translation (another letter case, punctuation or color codes).
-----------
Last archive versions
Russian translation: https://yadi.sk/d/141x0qWQYJXfpg (https://yadi.sk/d/141x0qWQYJXfpg)
Program: https://yadi.sk/d/ylFBf1dovR9Q0g (https://yadi.sk/d/ylFBf1dovR9Q0g)
Program sources: https://yadi.sk/d/m2qOyUdM2pzifQ (https://yadi.sk/d/m2qOyUdM2pzifQ)
Different Torchlight-related things (including above) on GitHub (https://github.com/Awkward-im/Torchlight)
Title: Re: [Tool] another localization tool
Post by: Awkward on December 22, 2019, 01:32:17 pm
updated program on yandex.disk service.
introduced autoreplace not for colors only but for numbers too
Title: Re: [Tool] another localization tool
Post by: Phanjam on December 25, 2019, 07:57:42 am
Hello @Awkward firstly, welcome to torchmodders! And thank you very much for your hard work to make another tool for torchlight modders.
And of course Seasons Greetings to you!
Title: Re: [Tool] another localization tool
Post by: Awkward on December 28, 2019, 09:37:05 pm
Fixes and additions, little more translation.
Links in first post
Title: Re: [Tool] another localization tool
Post by: Awkward on December 30, 2019, 02:40:50 am
small fixes and changes in clipboard import format. now: <source text><tab><translated text>
Title: Re: [Tool] another localization tool
Post by: Phanjam on December 30, 2019, 10:02:59 pm
 Thank you @Awkward ! Happy new year!
Title: Re: [Tool] another localization tool
Post by: Awkward on December 30, 2019, 10:12:05 pm
 Happy new year to you too!
Title: Re: [Tool] another localization tool
Post by: Awkward on December 31, 2019, 04:34:42 am
Added autoreplace support for roman numbers and numbers like .75
Probably...
Title: Re: [Tool] another localization tool
Post by: Phanjam on January 01, 2020, 12:49:01 am
Added autoreplace support for roman numbers and numbers like .75
Probably...
Lol! Thanks again @Awkward  ;)
Title: Re: [Tool] another localization tool
Post by: Awkward on January 01, 2020, 03:23:26 am
np. time of time (even today) i adds some small fixes. latests was for usability, didn't uploaded yet, will do it later.
some harnd things - not always can autoreplace properly. one sources have text like +[VALUE], some just [VALUE]. in current settings sign can be lost (but records marks as PARTIAL so, it can be traced). most bad things when standard on custom translation text have errors in words, differens suffixes (like 'throw' and 'throwing') or juse a little phrase changes (like 'arrows of flame' and 'flame arrows')
VERY-VERY big wish to change sources! (yes, even in standard unpacked DATA.PAK, it have it's own problems) strange what game creators/translators didn't fix these simple things)
Title: Re: [Tool] another localization tool
Post by: Awkward on January 01, 2020, 12:55:58 pm
first try to use Yandex translation
To translate current line, press button or use hotkey Ctrl-T
Title: Re: [Tool] another localization tool
Post by: Awkward on January 03, 2020, 03:16:51 pm
Refactoring, bugfixes.
Added in test mode: string modification for comparing delete not articles only but suffixes -ed -es -ing too (suffix -s not changing yet). rules for '-' sign changed.
Translation button in editing window works now too (i hope). Maybe will change format to save additional info for translation in nearest future but not necessary.
anyway, will test yet.
Title: Re: [Tool] another localization tool
Post by: Awkward on January 05, 2020, 08:14:51 am
Do we need to ignore '-s' suffixes, articles like 'to', 'of' and 'for' and 'his'/'their' words to get more flexible translation? Many strings have difference just with them.
Title: Re: [Tool] another localization tool
Post by: Phanjam on January 05, 2020, 04:00:31 pm
I guess it would depend on whether including/excluding them makes the translation sensible or not. Maybe u can run tests and decide based on results?
Title: Re: [Tool] another localization tool
Post by: Awkward on January 05, 2020, 06:18:26 pm
i don't like too many tests :( at least, coz i don't know english too good
AND i just want MORE people join togetherfor localization. check ready translations from russian-speak people, just want to cry sometime. different packs (mods), different translations and even different source texts. crap!
Title: Re: [Tool] another localization tool
Post by: Awkward on January 05, 2020, 09:19:32 pm
Replaced article deleting by word from list deleting for text comparing. Right now, max len of word is 7 letters (look, right now it enough). you can add several files at once to Additional file list (like in Import case). Maybe that setting will be not needed and deleted in future... Plus, 1-2 fixes.
Title: Re: [Tool] another localization tool
Post by: Awkward on January 10, 2020, 08:57:50 am
Fixes, refactoring, updated russian translations. Changed format of saved projects
Title: Re: [Tool] another localization tool
Post by: Phanjam on January 11, 2020, 08:55:29 am
Hi Awkward! Is it possible to modify your program to work for other languages? Because every now and then, we see requests for help to translate TL2 into other languages (the most recent was for Portuguese)
Title: Re: [Tool] another localization tool
Post by: Awkward on January 11, 2020, 09:23:34 am
i put russian interface language file just coz i am russian. but tl2trans.pot have template for translation interface to other languages.
What about game files translation... well, i think, it must be working with them. Didn't tried (of course, can try to load french or brasilian language for example. really, don't know.

Did you tried by yourself to use it?
again... if you need program interface on another language, you can at least remove tl2trans.ru.po file from program directory.
Title: Re: [Tool] another localization tool
Post by: Phanjam on January 11, 2020, 08:00:33 pm
Thanks @Awkward ! So it might be possible, thats good news ;)
Title: Re: [Tool] another localization tool
Post by: Awkward on January 17, 2020, 10:09:18 pm
program updated (some fixes mainly)
Title: Re: [Tool] another localization tool
Post by: Awkward on January 18, 2020, 10:58:06 am
Some new fixes, especially "Replace text" function. It replaced text just in grid (on screen), not translation text
Title: Re: [Tool] another localization tool
Post by: Awkward on January 27, 2020, 06:40:48 am
"notes" form (Alt-H) added. just to keep some small notes like "standard" translation of some words/expressions. or something else.
Title: Re: [Tool] another localization tool
Post by: Awkward on January 27, 2020, 09:55:57 pm
Fixed possible crash.
Filtration code changed (slightly).
Source scan code changed . Now program read MUCH more text from *.LAYOUT files. Sorry, guys!
Title: Re: [Tool] another localization tool
Post by: Awkward on January 31, 2020, 12:07:04 pm
small refactoring - maybe will be scan files faster a little. plus, status bar indicator of that process
Title: Re: [Tool] another localization tool
Post by: Phanjam on February 01, 2020, 10:22:34 pm
Thanks for the update @Awkward
Title: Re: [Tool] another localization tool
Post by: Awkward on February 03, 2020, 02:47:39 am
Fixed error with closing/changing Tab with active editor, I hope.
Added line deleting
Added hotkeys for color info and "new line" insertion by Alt-C, Alt-U and Alt-N (for non-latin active keyboard locale mainly)
Title: Re: [Tool] another localization tool
Post by: Awkward on February 04, 2020, 11:49:43 am
Added parameter paste (Alt-V) like color info (see previous post)
Title: Re: [Tool] another localization tool
Post by: Awkward on March 02, 2020, 09:50:43 am
Updated program. Shortly:
no ref = hide columns,disable button
ref: root dir saved
config processing changed from custom to standard class
"About" text changed
'Build' (Ctrl-B hotkey) mode added. Build translation from default file and files from Import directory
Delete "Keep Space at the end" setting
Show '~' as mark if original text ends by space
Show source file with doubleclick on file/tag column (Alt-S hotkey)
Title: Re: [Tool] another localization tool
Post by: Phanjam on March 04, 2020, 02:09:07 pm
Thanks @Awkward for your continuing work!
Pls let us know about any mods you converted using your tool, so we can promote them!
Title: Re: [Tool] another localization tool
Post by: Awkward on March 04, 2020, 02:18:04 pm
What you mean g converted?
I spent time by writing program. Sometime I just trying to translate mods to Russian. I posted ghat changes on Russian forum usually. Anyway, first post have link to archive with ready translations (separate files).
Title: Re: [Tool] another localization tool
Post by: Kva3imoda on March 04, 2020, 04:15:28 pm
Yeah PJ. This utility does not convert mods, it does scraping/parsing all text information in files. After that, the program makes it possible to conveniently translate all this text and generate a translation dat-file.
Title: Re: [Tool] another localization tool
Post by: Phanjam on March 07, 2020, 02:23:39 am
Okay i get it now, thanks Kva!

@Awkward ive never used a .DAT file for languages before. What does a user have to do, so they can use these files of yours?
Title: Re: [Tool] another localization tool
Post by: Awkward on March 07, 2020, 03:23:14 am
i think, most of modders, especially who made localization, must to know.
shortly: when you produce final file, need to rename it to TRANSLATION.DAT and place to directory as in main game.
if you unpack main game PAK file by GUTS, it will be inside MEDIA direcotory..
Ummm...
for me, it
G:\Games\Torchlight 2\MEDIA\TRANSLATIONS\RUSSIAN\RATRANSLATION.DAT
before, i made empty mod, named dummy.
so, all i did, just created directories and file inside:
G:\Games\Torchlight 2\mods\dummy\media\TRANSLATIONS\RUSSIAN\TRANSLATION.DAT
then build mod and added to mod list at first position.
of course, if need to add unimplemented language, you will need to make additional file like
G:\Games\Torchlight 2\MEDIA\TRANSLATIONS\RUSSIAN.DAT
with content
[LANGUAGE]
   <STRING>DISPLAYNAME:Pусский
   <STRING>NAME:RUSSIAN
   <INTEGER>AUDIO_TRACK:3
   <STRING>TRANSLATIONFILE:MEDIA/TRANSLATIONS/RUSSIAN/TRANSLATION.dat
   <INTEGER>ID:2
   [FOLDERPAIR]
      <STRING>ORIGINAL:MEDIA/UI/
      <STRING>TRANSLATED:MEDIA/TRANSLATIONS/RUSSIAN/UI/
   [/FOLDERPAIR]
   [FOLDERPAIR]
      <STRING>ORIGINAL:MEDIA/
      <STRING>TRANSLATED:MEDIA/TRANSLATIONS/RUSSIAN/RANDOMNAMES/
   [/FOLDERPAIR]
[/LANGUAGE]

THAT JUST EXISTING GAME EXAMPLE

sorry, i not too PRO in documentation writing. I hope, Kva3imoda can describe it better.

PS. almost implemented separated code for different internet translation services, not yandex only, will add to program soon.
Title: Re: [Tool] another localization tool
Post by: Phanjam on March 08, 2020, 05:54:08 am
Ok thanks very much @Awkward that information is a good place to start already  ;D
Title: Re: [Tool] another localization tool
Post by: Awkward on March 13, 2020, 02:18:18 pm
open wrong file error messages added
scan process can be cancelled by esc
program localization moved to 'languages' directory
added changing program language on the fly
adds language code to file name at first save
several online translators added
Title: Re: [Tool] another localization tool
Post by: Phanjam on March 14, 2020, 01:26:10 am
Sounds like its becoming more packed with features! Thx for the great work @Awkward !
Title: Re: [Tool] another localization tool
Post by: Awkward on April 09, 2020, 11:54:09 pm
new update:
removed notes resort after new note adding
new button - check translation for punctuation at the end of line
Title: Re: [Tool] another localization tool
Post by: Awkward on May 12, 2020, 10:29:37 pm
fresh update:
Hint for "notes" added
"build" toolbar button created
Addon files accepts paths
exported file name finished by '_exported'
"Reopen projects at start" option added
Export don't includes non-translated lines now
ignoring source lines just with parameters without text
Parameter/color insert in edit window
Title: Re: [Tool] another localization tool
Post by: Awkward on May 30, 2020, 01:04:14 pm
New changes:

Process tag "DESCRIPTION" not as <TRANSLATE> type only but as <STRING> too
fixed possible crash on some unuseful dialog