Jump to content

TranslationZed - A Project Zomboid Translation Tool v0.9


Connall

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/TranslationZed-User-Guide

Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
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!

 

Link to comment
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
Link to comment
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
Link to comment
Share on other sites

On 7/15/2019 at 3:02 AM, ZonaryQuasar said:

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

 

 

Fixed in 0.4 available here: https://github.com/TheIndieStone/ProjectZomboidTranslations/releases/tag/0.4

 

It should fix the issue, you should delete the cache file in your languages translation folder since it might cause strings to be marked as modified when they have not been.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks @Connall

By the way, I don't want to bother you, but that suggestion that I made about the filter box, would be really really useful for the translation, since we have to translate the same word (specially items) on multiple files. 

I will upload a new version for the pt-br translation today, but it's still a work in progress.  On my free time at work I'm also translating the pzwiki website.

 

Just a curiosity, when this new translations merge into the game?

Link to comment
Share on other sites

On 8/1/2019 at 5:14 PM, ZonaryQuasar said:

Thanks @Connall! 

By the way, I don't want to bother you, but that suggestion that I made about the filter box, would be really really useful for the translation, since we have to translate the same word (specially items) on multiple files. 

I will upload a new version for the pt-br translation today, but it's still a work in progress.  On my free time at work I'm also translating the pzwiki website.

 

Just a curiosity, when this new translations merge into the game?

 

I'll be working on it tomorrow I think, I'll probably be looking to merge the translation in today. :)

Link to comment
Share on other sites

35 minutes ago, Connall said:

 

I'll be working on it tomorrow I think, I'll probably be looking to merge the translation in today. :)

 

Sweet! But I think my question wasn't very clear. What I mean is, if someone buys the game today and download it from Steam, it will contain the updated translations on the https://github.com/TheIndieStone/ProjectZomboidTranslations/ branch?

Link to comment
Share on other sites

On 8/5/2019 at 3:57 PM, ZonaryQuasar said:

 

Sweet! But I think my question wasn't very clear. What I mean is, if someone buys the game today and download it from Steam, it will contain the updated translations on the https://github.com/TheIndieStone/ProjectZomboidTranslations/ branch?

 

Honestly couldn't say, depends when the build gets distributed out to the wider public. I'm somewhat removed on knowing when a build goes out when.

Link to comment
Share on other sites

On 8/1/2019 at 5:14 PM, ZonaryQuasar said:

Thanks @Connall! 

By the way, I don't want to bother you, but that suggestion that I made about the filter box, would be really really useful for the translation, since we have to translate the same word (specially items) on multiple files. 

I will upload a new version for the pt-br translation today, but it's still a work in progress.  On my free time at work I'm also translating the pzwiki website.

 

Just a curiosity, when this new translations merge into the game?

 

https://github.com/TheIndieStone/ProjectZomboidTranslations/releases/tag/0.6

 

New update, search box and fixes.

Link to comment
Share on other sites

  • Connall pinned this topic
  • 1 month later...

I am a little bit confused about the "Item and Recipe Translation File Generator". After I added /media/scripts folder, and press create recipe translation or item translation, what should I expect to see and which tab I should go to continue the translation of item name?

Link to comment
Share on other sites

  • 10 months later...
  • 2 months later...

Another little feature I want to suggest is making the editor pass to the next string when pressing ENTER on a completed one.

I mean: the process of translating with this tool involeves a lot of clicking! I could translate a lot faster if I could navigate the columns and rows with only my keyboard.

I suggest to add some kind of keyboard navigation, if not with the arrow keys just passing to the next string when pressing enter would be very cool.
I'm working on italian translation now, almost finished the UI but I could be much faster :)

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Hi there! Can you help me with more detailed guide on installing this tool on Linux?

Maybe I could figure it out by myself, but I think that this information potentially can help to other translators like me.

 

At the main README, the following is written:

Quote

"...the program can be launched on different platforms with OpenJDK8 and OpenJFX8 by navigating to the folder and starting it with java -jar translatoid.jar or similar command".

 

I downloaded an archive of the translatoid, but there is no info, how to start the program, from which directory, there is even no `translatoid.jar` file, I found it only in the TranslationZed archive.

When I launch the command in the `TranslationZed/app/` directory, I get this error

Error: Could not find or load main class translatoid.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

So I've tried to put contents of this dir to the `translatoid-0.10/src/translatoid/` and launch the command here – no difference.

 

Hope you'll help me find out.

Link to comment
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
×
×
  • Create New...