Jump to content

Translation Tool


knarox

Recommended Posts

Hi everyone,

 

i wrote a translation tool and want to share not only the program with you - the c# source code you will get too :).

 

The program reads the two translation files:

  • Localisation.txt
  • Localisation - Quests.txt

 

By the way it can read all txt/csv files with have a header and data seperated by comma;

The program reads the file and shows all entries in a list and the fields on the right in textboxes to edit.

 

All graphics are made by myself - hope i can bring some 7d2d feeling in the program :)

 

 

 

First a pic:

Screen_LanguageEditor_web.thumb.jpg.f3fddddb7e43e8e3dde3370be4c7e2fb.jpg

 

SourceCode and Program:https://www.sendspace.com/filegroup/0rP2wbWrta%2BifXhqbFLl7g

 

How to install:

Download the "7D2Die Translator" and extract the file where ever you want. Its only important, that the "pics" folder is at the same location as the exe-file. Then start the translator.

 

How to use:

1. Open the language file Localisation.txt or Localisation - Quests.txt by clicking on the "..." button on the right. NOTE: Standard location is c:\Program Files\steam\steamapps\common\7 Days To Die\Data\Config

2. After the file is loaded you can edit the entries.

2.1 NOTE: Only edit the values in the language section

3. Save it by clicking on "File" and then "Save"

4. Done :)

 

Adding a new language:

1. Start programm

2. Click "File" -> "add new Language"

2.1 if no file is selected the programm ask you to open the localization file

3. Give your language a name

4. Click "adding new language"

5. Done :)

---

 

 

Actual version: 26.01.2018 10:44:42

 

UPDATE:

- added possibility to ad a new languages

 

UPDATE 2:

- Fixed: not saving correct when search was used

- Fixed: When file was loaded and then new file-choose-dialog was opend again, but aborded the program has and empty list

- Changed: you dont need the pics folder now. You can delete it or rename to start the program without background blood pic.

 

UPDATE3:

- Fixed: you dont have to save each time. Only one time at the end by using save from the menu.

 

UPDATE 4:

- Added: Possibility to add new entries

 

UPDATE :26.01.2018 10:44:42

- changed: Button "add a new entry" location is now allways on button

- fixex: Crash when their is now pair of "-characters: displaying the line in the file where the error happens

- changed: way of versioning: in stead of x.y its now the building timestamp

 

UPDATE :18.02.2018 09:09:00

- changed: background image deactivated. Add a picture (.png) with the name "background" to it to have one.

- added: new tab that shows errors that happens while loading file.

- little prerformance teak

---

 

This maybe strange but now i have translation tool for easy translation but i dont know where to change the language in game :D - any hints?

 

For a update in the future i would like to add new languages to the file but i cant test it when i dont know where to change the language in game.

 

---

 

Maybe you can give me some feedback.

 

greeting

knarox

Screenshot2_web.jpg.d805ecbccb92d20f53b99e86d730b166.jpg

Screen_LanguageEditor.jpg.de02e75048ac3b951905f471e73cb9d6.jpg

Link to comment
Share on other sites

Could not start

 

Hi Knarox,

 

your translation tool sounds pretty cool.

But unfortunately I can not start it.

While trying to start nothing happens. Although the Windows Explorer works, but unfortunately without success. Also start as admin makes no difference.

Any idea why this may be?

Still needs some program be installed?

 

I used Windwos 10 operating system.

 

thank you

Link to comment
Share on other sites

bug report for use in A14.6 version.

when renaming - "Wood" to "woodPlank". After save - file was an incomplete piece, starting with "Wood". :confused:

 

Should be fixed now - thx for your feedback! :)

Link to comment
Share on other sites

UPDATE2:

- Fixed: not saving correct when search was used

Yes, i was used search. I check - work properly now!

 

If i edit and switch to another line - it seems the previous is lost ( I save after edit every line, for confidence), it's feature which confuses me.

 

I don't use your program for its intended purpose.

Here are some ideas:

- for convenience, the save button can be put on the panel.

- if you add the ability "add line" to Localization.txt, with parameters - it will be the Modding Tools ! :)

 

Thank you!

Link to comment
Share on other sites

Yes, i was used search. I check - work properly now!

 

If i edit and switch to another line - it seems the previous is lost ( I save after edit every line, for confidence), it's feature which confuses me.

 

I don't use your program for its intended purpose.

Here are some ideas:

- for convenience, the save button can be put on the panel.

- if you add the ability "add line" to Localization.txt, with parameters - it will be the Modding Tools ! :)

 

Thank you!

 

Update three contains that you dont have to save everytime. Every changes will be noted and saved. At the end you have to save.

So you load the file. Edit it as much as you want without saving. At end you save and all changes are save to file.

:)

 

So i think we dont need the extra save-button right?

 

Last purpose i dont get it.

With new line you mean a new line right side of the program right? For example there are "Key, Source, Context, English, Fraincais, German". So you want to add there for example "spain" - so that you have: "Key, Source, Context, English, Fraincais, German, Spain" - right? - if this is the case, you can just use the option "add new language" unter "File" -> "add new language" and this will add you that "line".

Link to comment
Share on other sites

Thanks again!

 

Last purpose i dont get it.

With new line you mean a new line right side of the program right? For example there are "Key, Source, Context, English, Fraincais, German". So you want to add there for example "spain" - so that you have: "Key, Source, Context, English, Fraincais, German, Spain" - right? - if this is the case, you can just use the option "add new language" unter "File" -> "add new language" and this will add you that "line".

clarify:

this possibility could be introduced for modders that add new items and blocks. They are not listed in Localization.txt. therefore, in Localization.txt I manually added lines like these:

stick,item,item,,Stick,,
stickDesc,item,item,,Sticks - great for building tools !.,,

or

sharpstone,item,item,,Sharpstone,,
sharpstoneDesc,item,item,,Sharpstone - for your StoneAxe better than simple dumbStone!!!.,,

 

This feature can be useful for adding new quests, who is doing it...maybe...

 

 

PS: 20 years ago I coded in ASSM, for processors i8080, and some for i80386. That was awesome. But now the ASSM is useless...Now I envy those who can write Programs for themselves like that.

How do you use your knowledge of C# ?

Link to comment
Share on other sites

Thanks again!

 

 

clarify:

this possibility could be introduced for modders that add new items and blocks. They are not listed in Localization.txt. therefore, in Localization.txt I manually added lines like these:

stick,item,item,,Stick,,
stickDesc,item,item,,Sticks - great for building tools !.,,

or

sharpstone,item,item,,Sharpstone,,
sharpstoneDesc,item,item,,Sharpstone - for your StoneAxe better than simple dumbStone!!!.,,

 

This feature can be useful for adding new quests, who is doing it...maybe...

 

 

PS: 20 years ago I coded in ASSM, for processors i8080, and some for i80386. That was awesome. But now the ASSM is useless...Now I envy those who can write Programs for themselves like that.

How do you use your knowledge of C# ?

 

 

Sorry that i dont get it right - maybe it was too late yesterday.

Clear and logical that you meant it that way. And the good news: i added this feature.

 

ASSM its assembler programming or? So you have to look always on your stack and popping :).

I am happy not to program in this way - is to hardware close for me.

I am working as a programmer in a small company and writing my first programs.

Link to comment
Share on other sites

And again, Thank You!

 

You almost finished writing the program for me, I hope what I asked will be helpful for others!

 

ASSM its assembler programming or? So you have to look always on your stack and popping :).

I am happy not to program in this way - is to hardware close for me.

Yes, it was Assembler...Interrupts, the stack, working with registers...A lot of work - the result is not enough... :)

 

now I dive into work for my Mod :)

I do this now and your program helps me. Thank!

Link to comment
Share on other sites

The program feels better now and have good nice features :)

I was not thinking of the modding aspect, that why i dont have a option to add new entities, but now its in :)

 

Why you say "almost finished" you missed something else?

 

Your mod looks good and like a lot of work - i wish you good look with it! And i am happy that at least one person is using my little program :) - you dont know how to change the language in game or found a configfile where you can change it?

Link to comment
Share on other sites

aaaa....language translation...

I wanted to say - "almost only for me" :)

 

you dont know how to change the language in game or found a configfile where you can change it?

I always thought that it depends on the steam-client or in the registry...perhaps,this cannot be done because no translation has , in Localization.txt - English only. On that switch ?

(I saw "language" parametr in the registry)

 

 

PS: you know what utility edit - Assembly-CSharp.dll ? Using "ILSpy" I can see them , but can't edit.

Link to comment
Share on other sites

Yes i saw, that no translation exits - only english. There is just the structure done but not filled.

Thats i thought "oh its empty but a simple csv-file - would be more easy with a tool" :)

 

Now the translation tool is ready but without a solution to change the language... at least you can you my tool to edit all other stuff in it and not only the translation.

 

Good implementation would be the the game reads always the english part if the choosen language not fill with some text.

So if you use a "german" version, but not all is translated the not translated will be shown in english - maybe with a hint, that the translation isnt complete.

 

EDIT

 

yes its seems in some dll but we need a language switcher in a configfile or something thats easy to edit. Or later in game.

 

EDIT2

yes i found it in the regestry:

Language_h3872303031

 

0000 45 6e 67 6c 69 73 68 00 English.

0008

 

 

EDIT3

tried to edit it into German, but the game change it after launching.

I think this i somehow the option to edit.

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 5 weeks later...
I uploaded it again. Nice to see that my program is still useful :)

Check the updated link in the first post.

 

This app is awesome. Thank you knarox.

I have been using it to add descriptions for 'custom' items that I have created vs. manually editing the loc/quests files.

Another thing that i did with my A15 loc/quests files is that i removed all the "not my native" languages and I did notice an improvement in menu responce speed. It was just an experiment at first but I had a theory and wanted to prove it to myself and I was right (partially).

 

By removing all the text that was "not needed" aka french, german, spanish and klingon (haha) the game does not have to 'read' all of that extra text/characters to get to its/your desired output, therefore reducing menu delay.

 

The results were pretty amazing and very noticable. I will say this though, the localization file is huge and it takes a long time to completely 'clean' the file properly. So I also used a search/replace (via notepad++ and a bit of wildcard * factoring) for sections that has similar phrasing.

 

I have yet to tackle my A16 files but it is an 'optimization' that I will be getting to shortly.

As always if your gonna try this ... BACKUP the file(s) first.

 

Once again, Thanx for the great program.

Link to comment
Share on other sites

...

By removing all the text that was "not needed" aka french, german, spanish and klingon (haha) the game does not have to 'read' all of that extra text/characters to get to its/your desired output, therefore reducing menu delay.

You mean that it will reduce the lag for mods who have a lot of recipes ?

Link to comment
Share on other sites

You mean that it will reduce the lag for mods who have a lot of recipes ?

 

Yes, thats what I noticed... its not a huge difference but as the localization file get "fuller and fuller" the game routines have to 'read' thru all those extra letters to get to what you are looking for/at

 

example

cambelsSoup,item,food,kgnone,cambels soup,Cambel Soup tastes really really really really really really really really really really good.,,,,

vs.

cambelsSoup,item,food,kgnone,cambels soup,Cambel Soup tastes good.

 

so you see my thinking/theory as to why omitting/removing un-needed values will speed up the display

 

on a lighter note... if I spoke Klingon then all my menus would be in Klingon, but alas, I only speak english

Link to comment
Share on other sites

yeah i have not done "major" testing

I just pulled out languages that I cant read and slimmed down some of the descriptions, as Ive played long enough to know what certain items and blocks do... in reality I could probably blank/erase 90% of the file and still be able to play

 

side note :: this is all just me "messing" with things to optimize gameplay for my old-a$$ PC... like 10 year old mobo and cpu... so i try every thing i can to squeeze performance from the game

I should have been a data-analyist/consolidator

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...