Alternate translation tool

Discuss translation of both ReactOS and the website here.

Moderators: Moderator Team, Web Team

Post Reply
kolle_hond
Posts: 20
Joined: Wed Feb 20, 2013 11:29 am

Alternate translation tool

Post by kolle_hond »

I managed to lose all my translated files that I had created, forcing me to start from scratch.
Unfortunately I can't host a webserver on this computer due to restrictions, so I can't use the translation tool. So I started building my own tool to make/assist in translations.
The tool uses AWK, so you need to install GAWK or similar and add the directory for awk.exe to your commandline path.
It is not complete yet (it only works for certain files, it makes an assumption based on the translation being Afrikaans and it assumes that the working directory is c:\sources\reactos)
Any suggestions are welcome.

I did a full writeup on what exactly each file does, and how it is currently set up to work in the Translate_README.txt file.

The files to download from my repository https://github.com/kollehond/reactos/tr ... -translate (branch: kollehond-translate if the link somehow doesn't work) are as follows:
remDuplMissing.awk
langadd.awk
Translate.bat
translate2.awk
Translate_README.txt
wordlist.txt
translate.config (new)
directorylist_for_bat_file.txt (optional)
Lang_files_bat.xlsx (optional)

I will keep the most up-to-date version in the repository, but I am going to try and complete more of the translation before I plan on making improvements to the tool.

Happy Translating!

Edit: Update 1 - 26 September 2018
You can now specify any output language using the newly added "translate.config" file.
The translation check in the .rc files only compares to the first line that includes "#ifdef LANGUAGE", so it will duplicate the check if the language is not in the first occurrence. I will add a proper check/search at some stage to address this.
kolle_hond
Posts: 20
Joined: Wed Feb 20, 2013 11:29 am

Re: Alternate translation tool

Post by kolle_hond »

Update 2 - 27 September 2018

I made some changes in order to accommodate basically all the .rc filenames. You now just need to add the short filename (En.rc, Af.rc, etc.) in the config file. The easiest way to deal with the different filenames was for me to create seperate .awk files. Currently "translate2.awk" deals with the normal filename structure (en-US.rc), while I set up "translate3.awk" to deal with any files that are/end with the short format (En.rc or *En.rc). Same goes for "langadd.awk" and "langadd_short.awk".
The only file that I have made a record of that does not fall within these parameters is "en-US.h", but I vaguely remember one or two other files that are also needed for translation. Apart from that, the tool now spans about 171 different translation files and their configuration.

I believe it is safe to say you can now add a pretty close to complete translation for ReactOS by using the tool.

The files needed to run the tool are now:
remDuplMissing.awk
langadd.awk
langadd_short.awk
Translate.bat
translate2.awk
translate3.awk
Translate_README.txt
wordlist.txt
translate.config
karlexceed
Posts: 531
Joined: Thu Jan 10, 2013 6:17 pm
Contact:

Re: Alternate translation tool

Post by karlexceed »

Great work!
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests