Introducing ReactOS Translation Tool

Discuss translation of both ReactOS and the website here.

Moderators: Moderator Team, Web Team

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

Introducing ReactOS Translation Tool

Post by Saibamen » Thu Aug 06, 2015 7:15 pm

This tool can simplify your work with translation in ROS.

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

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

EmuandCo
Developer
Posts: 4158
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo » Fri Aug 07, 2015 8:31 am

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

nicoalta01
Posts: 181
Joined: Tue Nov 18, 2014 4:05 pm

Re: Introducing ReactOS Translation Tool

Post by nicoalta01 » Fri Aug 07, 2015 10:16 am

Good!
Admin on Facebook Page ReactOS Italy http://www.facebook.com/ireactos

EmuandCo
Developer
Posts: 4158
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo » Mon Aug 10, 2015 7:04 pm

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 ^^
Image
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

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

Re: Introducing ReactOS Translation Tool

Post by Saibamen » Tue Aug 11, 2015 12:29 pm

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

EmuandCo
Developer
Posts: 4158
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo » Tue Aug 11, 2015 4:55 pm

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

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

Re: Introducing ReactOS Translation Tool

Post by Saibamen » Sat Aug 15, 2015 6:06 pm

New version: v0.2 :)

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

gonzoMD
Posts: 992
Joined: Fri Oct 20, 2006 7:49 am
Location: Germany
Contact:

Re: Introducing ReactOS Translation Tool

Post by gonzoMD » Sat Aug 15, 2015 8:53 pm

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.

Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Introducing ReactOS Translation Tool

Post by Black_Fox » Sun Aug 16, 2015 6:34 pm

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: 1009
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Introducing ReactOS Translation Tool

Post by hbelusca » Sun Aug 16, 2015 8:36 pm

A suggestion, if it is doable: adding a test to check whether language resource files are correctly encoded (UTF-8 w/o BOM)

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

Re: Introducing ReactOS Translation Tool

Post by Saibamen » Mon Aug 17, 2015 10:10 pm

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

Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Introducing ReactOS Translation Tool

Post by Black_Fox » Tue Aug 18, 2015 6:25 pm

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.

Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Introducing ReactOS Translation Tool

Post by Black_Fox » Tue Aug 18, 2015 9:39 pm

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 :-)

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

Re: Introducing ReactOS Translation Tool

Post by Saibamen » Wed Aug 19, 2015 1:32 pm

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

EmuandCo
Developer
Posts: 4158
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Introducing ReactOS Translation Tool

Post by EmuandCo » Wed Aug 19, 2015 9:09 pm

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?
Image
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests