Re: [SliTaz] Requirement Translation Files

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


Hi Gabriel!

This work is very time-consumed, and I will not send you any .po or .pot files.

I hope this small tutorial I wrote for you will help you in your work.
Let's go!


Get the SliTaz-3.0 image
------------------------

Get the SliTaz-3.0 ISO file from here (probably you need both
"slitaz-3.0.iso" and "slitaz-3.0.md5" files):

http://mirror.slitaz.org/iso/3.0/

Check your downloaded image using MD5 sum:

    md5sum -c slitaz-3.0.md5

Open ISO in your preferred application (I use "ISO Master" on SliTaz).
Extract "/boot/rootfs.gz" from ISO.


Extract the SliTaz-3.0 image
----------------------------

Make separate working folder. Put "rootfs.gz" here to not mess with
the other files.

File named "rootfs.gz" really is CPIO-archive compressed by LZMA
regardless of the name :) So, rename it:

    mv rootfs.gz rootfs.cpio.lzma

Now extract it as LZMA archive. I prefer to do it in the terminal,
but you are free to use your preferred archiver, for example, PeaZip
or 7Zip:

    lzcat rootfs.cpio.lzma > rootfs.cpio

Now we have "rootfs.cpio". Next, extract it as CPIO archive. I still
prefer to use terminal:

    cpio -idmF rootfs.cpio

Some warnings may be here because it can't correctly extract /dev
folder on non-native filesystem.

And now we finished with SliTaz-3.0 filesystem fully extracted here,
on your previously created working folder: /bin, /dev, /etc, /home,
/lib...


Determine the versions of the applications
------------------------------------------

You need translations NOT for ANY version of the application.
You need translations for EXACT version of each application. Why?

Developers are free to add new phrases, as well as remove old ones
from version to version. At the same time the most strings aren't
changed from version to version. But if you want perfect result,
please use the translations provided for the exact version or each
application.

So, how to determine versions? Go working folder where SliTaz-3.0
is extracted. Next go to:

    var -> lib -> tazpkg -> installed

Here you'll find a 202 folders: one for each package installed on
SliTaz-3.0. Examine them all. Some applications are supported
translations, some not. Some applications are already translated:
you can find translation files in the working folder:

    usr -> share -> locale -> pt -> LC_MESSAGES

So, return to version determine. For example, I want the package
"alsaplayer". Open the file in the text editor:

    var -> lib -> tazpkg -> installed -> alsaplayer -> receipt

Here we can read:

    . . .
    PACKAGE="alsaplayer"
    VERSION="0.99.80"
    . . .
    TARBALL="$PACKAGE-$VERSION.tar.gz"
    . . .

Now you know that version of alsaplayer installed in the SliTaz-3.0
is "0.99.80", and source files you can find in the tarball named
"alsaplayer-0.99.80.tar.gz" (later about it).

Next example is for "isomaster":

    PACKAGE="isomaster"
    VERSION="1.3.5"
    TARBALL="$PACKAGE-$VERSION.tar.bz2"

So, sources are in the "isomaster-1.3.5.tar.bz2" file.


Getting packages sources
------------------------

SliTaz want to be the small by removing any file that not need to
run the application. Unfortunately, in some cases it includes the
removal of documentation (that help you use the program) and
translations (that help you understand the program).

But thanks to SliTaz developers you can easy download source of
any package (of any SliTaz) here:

http://mirror.slitaz.org/sources/

For example, alsaplayer sources you will find here:

http://mirror.slitaz.org/sources/packages-3.0/a/

(file "alsaplayer-0.99.80.tar.gz", you remember)


Get the alsaplayer pt_BR translation
------------------------------------

Download source tarball "alsaplayer-0.99.80.tar.gz".

Extract it. Strange, but I failed to extract it in the easy way.
It revealed that this "*.tar.gz" archive is extra-compressed
using "gz". So, I renamed it to "alsaplayer-0.99.80.tgz.gz" and
extracted it with the two steps without any additional problem.

In the sources you, probably, will find the folder named "po",
and there you, probably, will find pt_BR translation. OK, go there!

Folder "po" ... found!

pt_BR ... not found!

But, thanks gods :) we can find here template for translation:
"alsaplayer.pot". You can make your own pt_BR translation based on
this template.

What about any newer tarballs (with newer translations that we can
use to simplify the translation process)? Current SliTaz right now
use "alsaplayer-0.99.81", and here still no pt_BR translation.
Project is frozen and not developed any more: no new versions, and
no new translations...


Get the isomaster pt_BR translation
-----------------------------------

Download source tarball "isomaster-1.3.5.tar.bz2".

Extract it. Extracted without any problem.

Folder "po" ... found!

pt_BR ... found!

Compile this "pt_BR.po" file as "isomaster.mo" and put to your
SliTaz-3.0 locale folder: /usr/share/locale/pt_BR/LC_MESSAGES.
That's all!


Good luck!
----------

Repeat the process with the rest of the packages. Note, some
packages are not intended to be translated.

-- 
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/