Hi Jean-Michel!

Thanks for your quick response! Thanks to your comments I have now gotten much further and succeeded in updating some of the translations in my system. I'll first respond to your message and in the end describe how far I got.

On Mon, 24 Feb 2014, Jean-Michel Philippe wrote:

Note that for real instant gratification, a quick, first step could be
to include in DDL 2.2 or 2.5 a script that just compiles Transifex PO
files into MO files in /usr/share/locales/. We would not care right now
about TS files and specific tricks, but this would still allow many
applications to be up to date with Transifex at any time, without making
a Debian package.

I'm not sure if introducing a *third* way to install message files is such a good idea. After all, there are already two parallel systems - the original Debian packages install their own message catalogs, which DDL l10n packages then override.

One option would be to have somewhere a nightly cron script that pulls updated translations from Transifex and recompiles the l10n packages, which could then be made available as a deb repository. This way an interested user could at least install updated translations the next day using apt-get upgrade.

# apt-get install subversion unaccent debhelper fakeroot python-polib
python-pip
# pip install transifex-client

Hem, I don't remember if I've written something somewhere about l10n
prerequisites? Obviously tools required to compile PO/TS files are
missing in this list. They should be in packages gettext and libqt4-dev.
You may also need the package translate-toolkit to get the command
po2ts, as well as intltool if you want to deal with application icon
files.

Thanks for the tips! Indeed libqt4-dev was the missing part. Installing it fixed the package compilation. I also found out that you need python-argparse and gcc. gettext is depended on by many other packages so it was already installed on my DDL system.

I'll save the full details to the end of this message.

I'm surprised to see that trunk/ in these three directories uses up to
1GB.

$ du -sh *
903M    lang
13M     live
103M    packages

It seems the main culprit is language-specific sound files that many applications include (gcompris, ktuberling etc). Of course, the fact that SVN stores each file twice in working directories doesn't exactly help here...

You probably don't need live/ though.

I saw this in make-l10n.sh:
LIVEDIR=../../../live/trunk/config-l10n
and then several references to $LIVEDIR so I assume something is needed from live/ as well. Anyway it's not big.

You'll probably need a DDL SVN write
access to be able to push your changes by yourself in the future. See:

https://gna.org/projects/doudoulinux/

You can create a personal branch in lang/experimental/ or
packages/experimental/ if you want to work without risking to break
something in the trunk.

Fine, but I don't have anything to commit yet (at least not much), so I'll think about this later.

3. Pull the latest translations from Transifex

$ ./transifex pull all fi

This seemed to get the latest Finnish translation updates - actually only
one change I deliberately did to gcalctool translations, the others seemed
to be already up to date in SVN. This takes a while to run.

Yes, it can last up to one or two hours if you try to get all the
languages for all the ressources.

Still more trouble with Transifex: The transifex client refused to update my po file. By enabling debug output I found out that it determined that "Local is newer than remote". I think this happened because it was quite a recent svn checkout so all timestamps were fresh. To fix this I added a --force parameter to the tx pull commands in the transifex script.

(my initial success was actually with another machine, where I was using an older transifex-client and possibly the timestamps were older as well)

BTW, what's the difference between "transifex pull" and "transifex sync"? It says somewhere that pull is deprecated and sync should be used instead. When I used sync, it seemed to get updates for all languages regardless of what I told it.

Jean-Michel doesn't sound Finnish enough? ;)

No, but if you want to sound Finnish you can introduce yourself as Jani-Mikko ;) Though I haven't actually heard of anyone with that combination of names - both are common, but separately.

Note that currently debian/changelog is not versionned, which is
probably an issue since someone rebuilding the package on his computer
may use version numbers that have already be used?

Right, have to be careful with that one. But currently I just want to make the builds work for myself so that I can get some experience with the system.

I'm pretty sure the command lrelease that compiles TS files is missing.
Install libqt4-dev and retry!

You were right.

Anyway I continued, assuming that the errors are simply due to missing
translations and not any show-stoppers.

Non blocking errors in my opinion too.

Right.

I think this error is really due to the missing command lrelease. The
package should get compiled after installing it, at least I hope so.

You were right.

No, I've never tested them on Wheezy and I'll probably won't do before
we migrate translations to Wheezy, for DDL 3.0.

OK, good to know.

I agree, this information should be made available in our developer's
section on our website. I'll create you an account as soon as possible
so that you can write a new page about how to get fresh translations
into DoudouLinux. This is an important piece of information for our
contributors (around 150 people!).

OK, I can make a HOWTO when I have it working for myself.

Here's an updated status report:

0. Install prerequisites:

# apt-get install subversion unaccent debhelper fakeroot python-argparse python-polib python-pip libqt4-dev intltool translate-toolkit gcc
# pip install transifex-client

1. Checkout DDL l10n code from SVN:

$ mkdir doudoulinux-svn
$ cd doudoulinux-svn
$ for dir in lang live packages; do mkdir $dir; svn co http://svn.gna.org/svn/doudoulinux/$dir/trunk $dir/trunk; done

2. Set up transifex connection

$ cd lang/trunk
$ ./transifex init all

3. Pull the latest translations from Transifex

$ ./transifex pull all fi

(works when I have fixed the URL problems and added --force)

4. Build the localization package

$ cd ../../packages/trunk/l10n
$ nano make-l10n.sh
(edit the AUTHOR declaration near the beginning, in order not to impersonate Jean-Michel!)
$ ./make-l10n.sh fi

output:
--cut--
*** processing language fi ***
updating 'doudoulinux-l10n-fi'
compiling PO files
compiling Songwrite PO files
compiling GmChess PO files
compiling TS files
copying extra l10n files
ERROR: no script '../../../lang/trunk/apps/work/laby/.locale.sh' for 
'../../../lang/trunk/apps/work/laby/.locale'
ERROR: no script '../../../lang/trunk/apps/work/laby/levels.orig.sh' for 
'../../../lang/trunk/apps/work/laby/levels.orig'
WARNING: no data directory 
'../../../lang/trunk/apps/education/gcompris/voices/fi', aborting…
  copying '../../../lang/trunk/apps/education/khangman/data/fi' into 
'doudoulinux-l10n/data/usr/share/kde4/apps/kvtml'
WARNING: no data directory 
'../../../lang/trunk/apps/education/childsplay_sp/lfc/fi', aborting…
WARNING: no data directory 
'../../../lang/trunk/apps/education/childsplay_sp/alphabet/fi', aborting…
WARNING: no data directory 
'../../../lang/trunk/apps/education/childsplay_sp/wordlist/fi', aborting…
WARNING: no data directory 
'../../../lang/trunk/apps/education/childsplay_sp/pongdata/fi', aborting…
WARNING: no data directory 
'../../../lang/trunk/apps/education/childsplay_sp/images/fi', aborting…
  copying '../../../lang/trunk/apps/education/ktuberling/sounds/fi' into 
'doudoulinux-l10n/data/usr/share/kde4/apps/ktuberling/sounds'
WARNING: no data directory 
'../../../lang/trunk/apps/education/pysycache/lang/fi', aborting…
WARNING: no data directory 
'../../../lang/trunk/apps/education/kanagram/data/fi', aborting…
ERROR: no script '../../../lang/trunk/apps/system/dansguardian/lists.sh' for 
'../../../lang/trunk/apps/system/dansguardian/lists'
ERROR: no script '../../../lang/trunk/apps/games/gmchess/orig.sh' for 
'../../../lang/trunk/apps/games/gmchess/orig'
WARNING: no data directory 
'../../../lang/trunk/apps/doudoulinux/doudoulinux-utils/sounds/fi', aborting…
compiling Laby translation files
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/data/usr/share/laby
processing texts.orig
processing levels.orig/0.laby
processing levels.orig/1a.laby
processing levels.orig/1b.laby
processing levels.orig/1c.laby
processing levels.orig/2a.laby
processing levels.orig/2b.laby
processing levels.orig/2c.laby
processing levels.orig/3a.laby
processing levels.orig/3b.laby
processing levels.orig/4a.laby
processing levels.orig/4b.laby
removing temp files and .svn dirs

Please check the debian/changelog file before recompiling the packages
--cut--

$ nano doudoulinux-l10n/debian/changelog
(check that it looks sane)
$ cd ..
$ ./build-debs.sh doudoulinux-l10n

Output:
--cut--
*** building custom package 'doudoulinux-l10n'
[: 250: doudoulinux-l10n: unexpected operator
dpkg-source: warning: no source format specified in debian/source/format, see 
dpkg-source(1)
dpkg-source: info: using source format `1.0'
dpkg-source: info: building doudoulinux-l10n in 
doudoulinux-l10n_2.2-4+20140224.tar.gz
dpkg-source: info: building doudoulinux-l10n in 
doudoulinux-l10n_2.2-4+20140224.dsc
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
dh_testdir
# Add here commands to compile the package.
/usr/bin/make
make[1]: Entering directory 
`/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n'
#docbook-to-man debian/doudoulinux-l10n.sgml > doudoulinux-l10n.1
touch build-stamp
dh_testdir
dh_testroot
dh_prep dh_installdirs
# Add here commands to install the package into debian/doudoulinux-l10n.
/usr/bin/make 
DESTDIR=/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n
 install
make[1]: Entering directory 
`/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n'
# copy all data files
if ! [ -d 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n
 ]; then mkdir 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n;
 fi
cp -a data/* 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n
# copy scripts
mkdir -p 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n/usr/lib/doudoulinux-l10n
cp src/update-l10n 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n/usr/lib/doudoulinux-l10n/
cp src/update-kde-settings 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n/usr/lib/doudoulinux-l10n/
mkdir -p 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n/usr/share/doudoulinux-l10n
cp gdm/locale.conf 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n/usr/share/doudoulinux-l10n/
# clean useless files
find 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n
 -depth -name .svn -exec rm -fr {}/ \;
make[1]: Leaving directory 
`/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n'
dh_testdir
dh_testroot
dh_installchangelogs dh_installdocs
dh_installexamples
dh_install 
--sourcedir=/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `doudoulinux-l10n-common' in 
`../doudoulinux-l10n-common_2.2-4+20140224_all.deb'.
dpkg-deb: building package `doudoulinux-l10n-all' in 
`../doudoulinux-l10n-all_2.2-4+20140224_all.deb'.
dpkg-deb: building package `doudoulinux-l10n-all-updates' in 
`../doudoulinux-l10n-all-updates_2.2-4+20140224_all.deb'.
dpkg-deb: building package `doudoulinux-l10n-fi' in 
`../doudoulinux-l10n-fi_2.2-4+20140224_all.deb'.
dpkg-deb: building package `doudoulinux-l10n-fi-updates' in 
`../doudoulinux-l10n-fi-updates_2.2-4+20140224_all.deb'.
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
/usr/bin/make 
DESTDIR=/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n
 clean
make[1]: Entering directory 
`/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n'
rm -fr 
/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n/debian/doudoulinux-l10n
make[1]: Leaving directory 
`/home/tux/svn/doudoulinux/packages/trunk/l10n/doudoulinux-l10n'
dh_clean *** created './l10n/doudoulinux-l10n-all_2.2-4+20140224_all.deb
./l10n/doudoulinux-l10n-all-updates_2.2-4+20140224_all.deb
./l10n/doudoulinux-l10n-common_2.2-4+20140224_all.deb
./l10n/doudoulinux-l10n-fi_2.2-4+20140224_all.deb
./l10n/doudoulinux-l10n-fi-updates_2.2-4+20140224_all.deb'
*** moved source packages to 'sources'
--cut--

5. Install the new localization package

# cd packages/trunk/l10n
# dpkg -i doudoulinux-l10n-fi-updates*.deb

6. Check that you can see updated messages in your software

Verified that gcalctool now displays my updated message. Hooray! :)

However, this did not update the icon names, on which I have done a lot of updates in Transifex in January. After some digging, I found out that I need to build updated doudoulinux-icons packages. I tried this:

$ ./build-debs.sh doudoulinux-icons

However, it didn't work. Output:
--cut--
*** building custom package 'doudoulinux-icons'
[: 250: doudoulinux-icons: unexpected operator
dpkg-source: warning: no source format specified in debian/source/format, see 
dpkg-source(1)
dpkg-source: info: using source format `1.0'
dpkg-source: info: building doudoulinux-icons in doudoulinux-icons_1.3-10.tar.gz
dpkg-source: info: building doudoulinux-icons in doudoulinux-icons_1.3-10.dsc
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
dh_testdir
# Add here commands to compile the package.
/usr/bin/make
make[1]: Entering directory 
`/home/tux/svn/doudoulinux/packages/trunk/tweaks/doudoulinux-icons'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/tux/svn/doudoulinux/packages/trunk/tweaks/doudoulinux-icons'
#docbook-to-man debian/doudoulinux-icons.sgml > doudoulinux-icons.1
touch build-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/doudoulinux-icons.
/usr/bin/make 
DESTDIR=/home/tux/svn/doudoulinux/packages/trunk/tweaks/doudoulinux-icons/debian/doudoulinux-icons
 install
make[1]: Entering directory 
`/home/tux/svn/doudoulinux/packages/trunk/tweaks/doudoulinux-icons'
# update SVN externals
if ping -c 1 svn.gna.org >/dev/null 2>/dev/null; then \
                svn update applications/; \
                svn update desktop-directories/; \
        fi
At revision 3625.
svn: REPORT of '/svn/doudoulinux/!svn/vcc/default': 200 OK (http://svn.gna.org)
make[1]: *** [install] Error 1
make[1]: Leaving directory 
`/home/tux/svn/doudoulinux/packages/trunk/tweaks/doudoulinux-icons'
make: *** [install] Error 2
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
/usr/bin/make clean
make[1]: Entering directory 
`/home/tux/svn/doudoulinux/packages/trunk/tweaks/doudoulinux-icons'
rm -fr make[1]: Leaving directory `/home/tux/svn/doudoulinux/packages/trunk/tweaks/doudoulinux-icons' dh_clean *** moved source packages to 'sources'
--cut--

I can't really see what's failing here, any ideas what's wrong?

-Osma

--
*** Osma Suominen / Osuuskunta Sange *** [email protected] ***
***      PL 197, 00131 Helsinki      ***     040 - 5255 882     ***
_______________________________________________
Doudoulinux-lang mailing list
[email protected]
https://mail.gna.org/listinfo/doudoulinux-lang

Reply via email to