XarTM - Xaraya Translation Memory

Table of contents

Installation

The program has been tested with PHP 5.2.4 (earlier PHP 5.0.4 too) and MySQL 5.0.19 and a webserver. (Apache 2 and IIS 6 have been tested). Note, that some of the XarTM files are for Web usage, while some others are for command line usage! Command line tools started from Web will display an error message.

1. Copy all files and directories to your webserver's area
mkdir /var/www/xartm
cp translationmemory-1.0/* /var/www/xartm/
2. Edit the settings in config.inc.php
Settings are documented in the file itself.
3. Set your ADOdb library's path in lib/Common.php
include_once('/usr/share/php-adodb/adodb-exceptions.inc.php');
include_once('/usr/share/php-adodb/adodb.inc.php');
4. Add your locale to db/database.sql's end if not yet there
INSERT INTO Locales (Name) VALUES ("nl_NL.utf-8");
INSERT INTO Locales (Name) VALUES ("ph_PH.utf-8");
5. Create an empty database and populate it from db/database.sql
mysqladmin -p create xartm
mysql -p xartm <db/database.sql
6. Install your current translations in the latest Xaraya
Make sure you use the most complete translation pack of your language
7. Generate ALL SKELETONS using the Xaraya Translations module
This is the same as you usually did when using the original module
8. Import the desired locale by import.php (displays help if no arguments given)
php import.php Xaraya hu_HU.utf-8

Notes about importing a locale

Generating the skels is very important, even if you don't have existing translations, because this program imports and works with those skeleton files only. The translation work in XarTM is always stored in the database, and you must export it to get your translated Xaraya locale files!

You can reduce the language pack and database size, if you set generate references to 0 (no references) in the configuration of the Xaraya Translations module, before generating skels.

If you have older backups of your Xaraya locale files, it is a good idea to import some of them first. Import your latest translations after the old backups, and last, import the current Xaraya release's all generated skels, if those also contain your latest translations. This way you can have all older translations of the strings in the translation memory.

Example

  1. Import old locale files backup, let's say you have a file from 04/14/2005.
  2. Import another old backup, you found another zip from 01/25/2006.
  3. Import your current file from Xaraya language downloads.
  4. Install that package in the new Xaraya release, generate all skels, and import those at the end.

Step 3 will make sure that strings lost at skel generation (4) will be available for reuse.

Importing takes long time! 0.5 to 1.5 hours or more.

Notes about updating to newer Xaraya releases

Brief

  1. Export your work from XarTM and install it in new Xaraya
  2. Go to Xaraya's Translations module and generate all skels again
  3. Run the import process again in XarTM

If you import newer skeletons, e.g. when there is a new Xaraya version and you generated all skels again over an exported language pack, the database will keep most of the old strings in "translation memory". (You may even import updated/edited translations.) New imported strings will overwrite the same English strings and their translation, the rest will be marked as dead string, useful for reuse only.

NEVER IMPORT old skeletons after you made translations in XarTM, because you will lose your work! You should import only if you exported the pack, installed it to your Xaraya and generated the skeletons over those exported files!

Upgrade to XarTM 1.0

If you used XarTM with date based alpha revisions, before 1.0, you must add one column to the database by a little SQL script and initialize its values. This will change the creation of "index.html" directories back to "index.html" files, as a result of a bugfix.

Errors in previous versions interpreted the empty "index.html" files (appeared in Xaraya 1.1.3) as directory. Exporting will fail if "index.html" files exist. Export will succeed if you delete the "index.html" file, but directory will be created instead. Please make sure you delete those buggy directories when upgrading.

Run the db/upgrade_1.0.sql on your database.
mysql -p xartm <db/upgrade_1.0.sql

Table of contents