TranslationZed - A Project Zomboid Translation Tool v0.3
0

9 posts in this topic

Recommended Posts

For a bit, I have been working on a tool to try and make Translating Project Zomboid a little bit easier. The tool provides a couple of conveniences that users may find quite nice.

 

1. A Visual String Editor

 

The tool parses through all files that are in a "key = value" format (this means that location description files are not supported at this time) then sorts them into tables that can be edited by the user. It also checks the English files for what the current state of translations are and shows what strings have been added (green) and removed (red). After one use of the tool, a cache file is created in the language folder, which will then keep track of when English files have been modified and will show what strings have been modified (orange/yellow). Hovering over strings will allow you to see what the original version of the string was and what the updated version is, so you can decide whether it's necessary to update those translations.

 

2. Consistent Character Encodings

 

One problem that comes up surprisingly often is translation files having their character encodings changed when users saved files. This can cause problems with how languages would get rendered in game, or create problems for other translators down the road. As such this program makes sure that each language is using a consistent character encoding that will work in the game. These can be overridden should the user choose, if you believe they are in error.

 

3. Item and Recipe Translation File Generator

 

Items are ever changing, however there is no English file with item names and in fact, they are derived from the scripts in which the items are declared (this will be changing soon) as such it is often required for myself to generate a file with all the names so that users can see if there's any difference. I have now taken it out of my hands (partially at least) and have created a part of the tool that allows you to create translation files for recipes and item names quickly and easily so you can fix these problems yourself.

 

4. Unified Editor & Publisher (Coming Soon)

 

The aim of the tool is also to allow users to edit translation files but also be able to publish these changes to the Translation repository where are translations are held. This negating the need for a Git tool, or to even completely understand how git tools work, since it is one of the biggest roadblocks for people contributing. I was going to release this with this version originally, but have chosen instead to hold off. Purely because I want this to be right and used correctly from the get go, rather than changes coming in later on and causing issues.

 

If you're interested in try the tool out and providing feedback, you can find it over here: https://github.com/TheIndieStone/ProjectZomboidTranslations/releases

 

Translation files here: https://github.com/TheIndieStone/ProjectZomboidTranslations

 

TranslationZed User Guide: https://github.com/TheIndieStone/ProjectZomboidTranslations/wiki/Translatoid-User-Guide

Share this post


Link to post
Share on other sites

I'm a C# programmer and was about time to learn how to use GitHub! (I worked only with TortoiseSVN and Team Foundation Server to this day) :P

I just created my account and "forked" the master branch. I will try to help and contribute to the portuguese-brazilian translation, if I have any doubts I will post here.

 

EDIT: I noticed that several strings already translated in the PT-BR translation doesn't match the english version, regarding upper and lowercase.

Example: "Open Windows" (EN) > "Abrir janela" (the cases does not match). 

So I changed to "Abrir Janela". I did this on every string to match the upper/lowercase of the english version. However, those strings don't have the "Mark as resolved" option. It will be saved anyway or this changes will not carry over?

Also, the tutorial (Translatoid User Guide) doesn't explain how I can commit my changes to the master branch., if you could explain to me please.

 

EDIT2: Ok, I reverted all my changes and I'm translating only the green lines now. After some lines I could see that what I was doing was not necessary, and sometimes led to confusion.

Edited by ZonaryQuasar

Share this post


Link to post
Share on other sites
2 hours ago, ZonaryQuasar said:

So I changed to "Abrir Janela". I did this on every string to match the upper/lowercase of the english version. However, those strings don't have the "Mark as resolved" option. It will be saved anyway or this changes will not carry over?

 

"Mark As Resolved" is only available for what the program detects removal, addition, modification. Other strings that don't have colours can just be edited normally and any changes made to those strings will be saved to the files when you click "Save Translations"

 

2 hours ago, ZonaryQuasar said:

 

doesn't explain how I can commit my changes to the master branch., if you could explain to me please.

 

That's currently outside of the remit of the tool (since that side has been disabled) you need to push changes using the git interface to the repository. From the GitHub website you can create a pull request which will send me a notification to bring the changes into the master repository.

Share this post


Link to post
Share on other sites
19 minutes ago, Connall said:

"Mark As Resolved" is only available for what the program detects removal, addition, modification. Other strings that don't have colours can just be edited normally and any changes made to those strings will be saved to the files when you click "Save Translations"

 

Ok, good to know!

 

19 minutes ago, Connall said:

That's currently outside of the remit of the tool (since that side has been disabled) you need to push changes using the git interface to the repository. From the GitHub website you can create a pull request which will send me a notification to bring the changes into the master repository.

 

 

So, I just want to understand one thing.

I'm at this screen:

image.thumb.png.c4ce9bc7d9d1b44d7b9dcc7025787dcf.png

 

Then I clicked on the Upload files, dragged and dropped all the edited/updated .txt files (Challenge_PTBR.txt, ContextMenu_PTBR.txt, etc) there.

 

image.thumb.png.a0c508bf44017dbde6ed0e613e50dea7.png

 

If I choose the first option, it's considering my branch as the master branch, or the TheIndieStone:master as master branch? 

I think I just have to chose the second option and commit. Right?

Edited by ZonaryQuasar

Share this post


Link to post
Share on other sites
1 hour ago, ZonaryQuasar said:

 

Ok, good to know!

 

 

 

So, I just want to understand one thing.

I'm at this screen:

image.thumb.png.c4ce9bc7d9d1b44d7b9dcc7025787dcf.png

 

Then I clicked on the Upload files, dragged and dropped all the edited/updated .txt files (Challenge_PTBR.txt, ContextMenu_PTBR.txt, etc) there.

 

image.thumb.png.a0c508bf44017dbde6ed0e613e50dea7.png

 

If I choose the first option, it's considering my branch as the master branch, or the TheIndieStone:master as master branch? 

I think I just have to chose the second option and commit. Right?

 

I'm not super familiar with the GitHub web interface, however the first option merges it to master in your fork. The second option would create a new branch in your fork and make a pull request to get merged into your forks master. Nothing you do from a fork can make it's way to TheIndieStone repository, without creating a pull request specifically for that repo and even then any changes would need to be approved by me, so not like it's going to slip in there by accident. So experiment to your hearts content.

Share this post


Link to post
Share on other sites
5 hours ago, Connall said:

 

I'm not super familiar with the GitHub web interface, however the first option merges it to master in your fork. The second option would create a new branch in your fork and make a pull request to get merged into your forks master. Nothing you do from a fork can make it's way to TheIndieStone repository, without creating a pull request specifically for that repo and even then any changes would need to be approved by me, so not like it's going to slip in there by accident. So experiment to your hearts content.

 

Thanks for explaining! That's exactly what I needed to know.

Besides the new strings, I corrected a few strings in Recipes_PTBR (not new/green ones). Upper/lower case errors and typing errors as well.

But my job is far from over... IG_UI is huge!

 

Share this post


Link to post
Share on other sites

I made the pull request with my changes. Weird thing is the merge tool said I deleted 4,618 lines, but in the merge tool I could see that it was because the files on the IndieStone master branch has comments on it, while mine hasn't.

Share this post


Link to post
Share on other sites

What I suggest:

 

A Search bar. Select... where Key or Value (depending what dropdown item is selected) like `%SearchString%`.

This would make things much easier to check inconsistencias of items between files.

 

EDIT: and preferably make the list auto-refresh at each keypress

 

image.png.3c6760b373946c7101a8c111dad4f5f2.png

Edited by ZonaryQuasar

Share this post


Link to post
Share on other sites

When the tool is loading and binding the key/value table, it's ignoring initial and last whitespaces (like it is using Trim)

 

Example:

 ContextMenu_From_Ingredient = "de ",

ContextMenu_EvolvedRecipe_Spice = " como Tempero",

 

Then I save and exit the tool. When I open the tool again, it's only "de". So I have to everytime remember the values that needs a space in the end and fixing it, to prevent this:

image.png.7c2f1271a280068b72264ef58d7f2f9a.png

image.png.72d4fc07b6290312f802be7f0cb7fddb.png

 

Edited by ZonaryQuasar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0