plainblack.com
Username Password
search
Bookmark and Share
Subscribe

Installing the Translation Server

The goal of this page is to show you how to set up WebGUI's translation server for fixing bugs or implementing RFEs.  Instructions were developed for setting up the translation server with a source install of WebGUI. But running it inside the WRE is equally possible

The following instructions assume that you have a checkout of the tools branch and that you are executing them as root. Tools can be checked out via svn and are located under https://svn.webgui.org/plainblack/tools or manually using the web-frontend available through the same URL.

Add a new domain to the /data/domains directory:

mkdir /data/domains/translation.localdomain
chown apache:apache /data/domains/translation.localdomain
cd /data/domains/translation.localdomain

Note that files do not necessarily have to belong to the apache user. Which user is appropriate depends on the configuration of your server. Just make sure the cgi script will have write access to language files later on.


Put a copy of the translation server script into this new directory.

cp /from/whereever/translationserver.cgi ./translationserver.cgi

Edit the file and change line 15:

my $wgi18neditRoot = "/data/domains/translation.localdomain/";

to

my $wgi18neditRoot = "/data/domains/translation.localdomain/";

Otherwise the script will terminate with an error message saying that it cannot find the configuration file.

Make directories to hold the config file and the translated languages

mkdir etc
mkdir languages
chown apache:apache etc languages
chmod g+s etc language

Optionally, check out language files via svn using the following line

cd language
svn co https://svn.webgui.org/plainblack/translations/<Language>

You can use the web-frontend to find out which languages are available.


Download a copy of the i18n.conf file from this article, adjust it to suit your install, and put it into the etc/ directory
.

i18n.conf

cp /from/whereever/i18n.conf etc/i18n.conf
chown apache:apache i18n.conf

vim i18n.conf


Take care of DNS so that you can access the translation server.  On my server, this is done in the hosts file.

vim /etc/hosts

127.0.0.1 translation.localdomain translation


Configure Apache to respond to requests for that server:

Add the following section to your httpd.conf file (or whatever it is called in your distribution). If you are using the wre, create a file translation.localdomain.modproxy under /data/wre/etc and fill it with the content below.

<VirtualHost *:80>
    ServerName translation.localdomain
    ServerAlias translation
    DocumentRoot /data/domains/translation.localdomain
    Alias /extras /data/WebGUI_HEAD/www/extras
    <Location />
        DirectoryIndex translationserver.cgi
        AddHandler cgi-script .cgi .pl
                Options +ExecCGI +Indexes
    </Location>
</VirtualHost>

Restart your server so Apache can pick up the new configuration

service httpd restart

or

. /data/wre/sbin/setenvironment.sh
wreservice.pl --restart web

when using the wre


Final notes:

  • The translation server is a CGI script.  You do not need to restart apache everytime you make a change like you do with WebGUI.
  • You should NEVER, EVER make SVN language commits from your server back to the webgui.org SVN.  This is because while the CGI will make commits, it does not, and cannot ever merge.
  • While it is possible to translate earlier versions of WebGUI, there is no mechanism to automatically handle transferring data from one translation to another.  Please do not stop using i18n.webgui.org, for the benefit of the community at large.
  • Bug fixes and RFEs for the translation server do not have to follow the WebGUI release schedule.  However, after changes have been accepted back into SVN, it may take a while for them to show up on i18n.webgui.org.

Keywords: i18n server translation

4bernd: "Very helpful article! I got the translation server to work on my notebook by following the instructions. I have also added a few lines regarding installation using the wre. When I get to it, I will try to polish this article a bit."
Search | Most Popular | Recent Changes | Wiki Home
© 2023 Plain Black Corporation | All Rights Reserved