Introducing ReactOS Translation Tool

Discuss translation of both ReactOS and the website here.

Moderators: Moderator Team, Web Team

User avatar
Saibamen
Posts: 212
Joined: Mon Jul 19, 2010 11:19 am
Location: Poland
Contact:

Introducing ReactOS Translation Tool

Post by Saibamen »

This tool can simplify your work with translation in ROS.

GitHub: https://github.com/Saibamen/ReactOS-Translation-Tool

[ external image ]

Features:
  • - Find missing translation RC files
    - Find missing translation strings (WIP)
Installation
  • - Upload files to a web accessible directory on your server or hosting account
    - Change the ReactOS source dir ($ROSDir) in config.php

I'm looking for contributors and ideas :)
ReactOS Forum Global Moderator
IT-Maniak.pl administrator
User avatar
EmuandCo
Developer
Posts: 4722
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo »

COOOOOL. Keep up that work, especially @ the WIP stuff :D
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

If my post/reply offends or insults you, be sure that you know what sarcasm is...
nicoalta01
Posts: 181
Joined: Tue Nov 18, 2014 4:05 pm

Re: Introducing ReactOS Translation Tool

Post by nicoalta01 »

Good!
Admin on Facebook Page ReactOS Italy http://www.facebook.com/ireactos
User avatar
EmuandCo
Developer
Posts: 4722
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo »

Threw it on a XAMPP. Looks promising. The String test will be a real pain to get working I fear ^^ Up to now it does strange stuff ^^
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

If my post/reply offends or insults you, be sure that you know what sarcasm is...
User avatar
Saibamen
Posts: 212
Joined: Mon Jul 19, 2010 11:19 am
Location: Poland
Contact:

Re: Introducing ReactOS Translation Tool

Post by Saibamen »

You tested 0.1 or revision?

Multiline strings is not fully supported in current source.
For example script thinks EmuandCo is a string in Daniel "EmuandCo" Reimer (solitaire langs) :D
ReactOS Forum Global Moderator
IT-Maniak.pl administrator
User avatar
EmuandCo
Developer
Posts: 4722
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo »

Yesterday's GIT revision I used.
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

If my post/reply offends or insults you, be sure that you know what sarcasm is...
User avatar
Saibamen
Posts: 212
Joined: Mon Jul 19, 2010 11:19 am
Location: Poland
Contact:

Re: Introducing ReactOS Translation Tool

Post by Saibamen »

New version: v0.2 :)

[ external image ]

Changelog:
  • - New bootstrap layout
    - Support for multi-line strings
    - Added ignored strings. Can be edited in config.php
    - Speedup searching missing strings
    - Increase default PHP time limit to 60 seconds
    - ReactOS favicon
ReactOS Forum Global Moderator
IT-Maniak.pl administrator
User avatar
gonzoMD
Posts: 1077
Joined: Fri Oct 20, 2006 7:49 am
Location: Germany
Contact:

Re: Introducing ReactOS Translation Tool

Post by gonzoMD »

As it's code is GPL, Victor may use parts of it for a translation status page on the new website. Would be a nice feature.
User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Introducing ReactOS Translation Tool

Post by Black_Fox »

Not only does useful things, but also looks very nice now, I should put it on my RPi2 :-) Just a quick question, could you put a small link to ISO 2-letter language codes somewhere?

EDIT: I deployed it and there are a few bugs that block me from easily using it:

- the $ROSDir handling is not clear - through experimentation and reading of Apache error logs I found out that the path must end in a backslash (which is a bad practice, the code should handle both cases, trailing backslash present or not)
- it only works with the reactos core repo (this is my fault, but it could be documented in the readme or config.php to simply prevent others from doing it). I had cloned the git mirror that has this structure inside reactos folder:

Code: Select all

reactos   (I had this in config, didn't work)
|
+-- documentation
+-- reactos    (this is the right one)
+-- rosapps
+-- rossubsys
+-- rostests
+-- wallpapers
- it can't work on my Linux server! Because paths\like\this with backslashes are used, but most OSs except Windows use paths/like/this with slashes... the searched paths (and the regexps) are hardcoded to Windows paths, though. See this StackOverflow question. The answer has the multi-platform solution, but also states that Windows should work with "/" directory separator.
- I can also see that backslashes are not escaped in strings which is dangerous... and non-issue if (forward) slashes were used instead.

My proposals:
1) Handle both the "C:\Path\" and "C:\Path" variants correctly (this is a must for user experience and just a few additional lines to write)
2) Hint in the readme that the "reactos" folder containing the base and dll directories is the right one
3) Either use the "/" path separator everywhere or use a variable separator based on OS type (see the StackOverflow question above)

one more EDIT: Here is a good list of the language codes: https://beta.wikiversity.org/wiki/List_ ... 39-1_codes
hbelusca
Developer
Posts: 1204
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Introducing ReactOS Translation Tool

Post by hbelusca »

A suggestion, if it is doable: adding a test to check whether language resource files are correctly encoded (UTF-8 w/o BOM)
User avatar
Saibamen
Posts: 212
Joined: Mon Jul 19, 2010 11:19 am
Location: Poland
Contact:

Re: Introducing ReactOS Translation Tool

Post by Saibamen »

Thanks. All proposals are completed now. I think that 0.3 come tomorrow :)

Black_Fox can you test current code in Linux?

Now working on right file encoding check. First version out, but it search only for UTF-8 BOM encoding for now.

// Edit: Checking encoding out of Beta :) It can find any other encoding than UTF-8 BOM
ReactOS Forum Global Moderator
IT-Maniak.pl administrator
User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Introducing ReactOS Translation Tool

Post by Black_Fox »

Thanks for all the changes :-) Now it should work, but doesn't find translations for anything (always all 150 missing, even for "de" or "pl"), no PHP errors in log this time. Can't say more now, leaving work, I'll try to look at it when I get home.
User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Introducing ReactOS Translation Tool

Post by Black_Fox »

Ha, found it. Sorry for double post.

index.php:78:

Code: Select all

$file = glob($regex->getPathInfo() ."\*{". $fileSearch ."}*.". $fileExt, GLOB_BRACE);
That one backslash needs to be converted as well. Same goes for diff.php:159

After these are changed, it works on my RPi properly! Thanks for a valuable tool :-)
User avatar
Saibamen
Posts: 212
Joined: Mon Jul 19, 2010 11:19 am
Location: Poland
Contact:

Re: Introducing ReactOS Translation Tool

Post by Saibamen »

0.3 out now :)

Changelog:
  • - Now working on Linux! (Thx Radek Liška)
    - Script can now find wrong encoded files!
    - Added ignored strings list from Wine (http://fgouget.free.fr/wine-po/generic.spell.ignore)
    - Massive update to our ignored strings (ReactOS.spell)
    - Prevent from add ICON and #include to translation string
    - Fix $allStrings counter
    - Add percent of translation to diff.php
    - Add ISO 639-1 code URL (Thx Radek Liška)
    - Check for slash and add it to ROSDir. Dedicated to Radek Liška :)
    - Add "All ReactOS Source dir" option to form
ReactOS Forum Global Moderator
IT-Maniak.pl administrator
User avatar
EmuandCo
Developer
Posts: 4722
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo »

So, the tool checks for strings which are 1:1 the ones in english too, right? What about stuff being missing, like newly added buttons and stuff?
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

If my post/reply offends or insults you, be sure that you know what sarcasm is...
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests