Caution!
Please think about your own responsibility when using the tools you find on these pages. If you are an official Opera translator, you are probably responsible on keeping some things out of public reach. You should think yourself if there is any danger in using mad.pl and off.pl tools to produce *.lng files for private or public test. I cannot be responsible about things you do with thing you find anywhere on the net. Myself, I created these tools just because I need them and I beleive(!) they are useful. Please note that the only good way of producing a public *.lng test is to ask the appropriate person at Opera Software to do this for you.
mad.pl and off.pl are Perl scripts. I run them under Linux. I have never tried running perl script on Windows.
Introduction
An Opera translator usually works on a common *.po file. Whenever the translator wants to test the translation, he/she needs to convert the *.po file into *.lng file, since Opera makes use of *.lng file. An Opera translator may also need a way to generate a file for easy spellchek. Apart of some internal Opera Software tools for Linux and Windows, these things can be done using the free mad.pl tool.
Unfortunately, the translator is not allowed to distribute the so-produced test *.lng file. The translator has to bother the appropriate Opera Software person, to send him/her the *.po file, and to wait for the answer with the *.lng for public test purposes.
So, you finaly get the public test and you can distribute the test to your testers. Now, imagine you make some additional changes... You again have to bother the Opera Software person. Here comes the off.pl tool.
Availability
The off.pl script is available for free. You can change and use it in whatever way you like to.
What does off.pl tool do?
-
off.plreads your new private translation. -
Then
off.pltool takes the already available public*.lngtest as a model. - Finally, it reproduces the public model, updating its items.
*.lng test, this way you actually should get a new, updated *.lng public test. You may have to think if it is a good or bad idea to distribute it.
How to use off.pl
The public test model should be passed to off.pl via the standard input. The updated public test is written into the standard output.
You may need to supply some options:
-
--dos - This would produce a file with DOS (Windows) formatted end-of-line. Ommiting this option would produce a file with Unix (Linux) formatted end-of-line.
-
--src=filename -
The filename should be the file name of an updated
*.lngfile. The model will be updated accoring to the translations found in this file. You cannot ommit this option, otherwise you would not get any result.
Examples of using off.pl
Using the public test file ow777_7777.lng in conjunction with a newer private test file secret.lng in order to produce an updated public test file ow777_7777_updated.lng in DOS (Windows) end-of-line format:
./off.pl --dos --src=secret.lng <ow777_7777.lng >ow777_7777_updated.lng
The same thing, but producing a Unix-like end-of-line format:
./off.pl --src=secret.lng <ow777_7777.lng >ow777_7777_updated.lng
Unicode
I don't know if and how perl scripts auch as mad.pl or off.pl are supposed to work on Unicode files. I use these scripts with legacy 8 bit encodings and use additional tools such as iconv to convert from/to Unicode. On the mad.pl page you can read how to use iconv.
