Thursday, 31 May 2007

svn-buildpackage advice

A word of advice: if you use svn-buildpackage with a custom builder, such as pdebuild, always use --svn-no-links unless you want all your packages to suddenly become native packages!

PO compendium, next step, use it :-)

I have just enabled creation of "LATEST" links for PO compendiums. The result is that now you can use an automated tool or kbabel to get the latest compendium made from po-debconf translations of packages in unstable.

So your compendium will be in the place like http://i18n.debian.net/~eddyp/compendiums/po/$LANG/compendium-$LANG-LATEST.po

I have took a series of screenshots that show how to configure kbabel in order to use the compendium, but I didn't managed to write some explanations, too.

Screenshots are here (just pick them in order, and you'll probably understand).

The most important are the first 3.

An explanation about step 3, if you defined the language code properly, then you can use the flexible approach:




Otherwise, you need to use a hard coded URL.

Wednesday, 30 May 2007

Compendiums - enabled for all languages (po-debconf)

I just enabled compendium creation for all languages which had po-debconf translations in Debian.

See (a little) more details in the announce.

Tuesday, 29 May 2007

po compendiums, just wait a little

It seems that my idea caught Javier's attention and he is already asking to use the scripts for Spanish.

As I have said before, those scripts will work for all languages in due time. Currently, as a test, they are running (or they should starting from tomorrow morning) only for the po material for the languages fr, de, ro and vi.

I intent to make compendiums for po-debconf material, po material[*] separately and another one made from all of them.

Stay tuned. Of course, a proper annoucement on debian-i18n@l.d.o will be done when I'll have something pretty ok.

Meanwhile, unpatient souls can take a peak at the current results

(I just enabled es, just for fun; es is broken, too?!? - or maybe the scripts are doing something wrong :-P - curious people can check, the logs are available.)


[*] which is more tricky since there is a need to merge fr_FR with fr/fr_CA with fr, de_DE with de, de_AT with de... and so on, but zh_TW does not have a zh to be merged with. Also the ll_CC strings should have higher precedence than ll strings.

Friday, 25 May 2007

PO compendiums, 1st step

This is just a proof of concept. And I think those are simple po files not po-debconf files. Anyway, I'll polish the scripts a little more and then migrate it on i18n.debian.net[*]. Of course, this will be done for all languages when the scripts are more stable.

[*] thanks to Christan Perrier, I have access to that machine now

Thursday, 24 May 2007

Is not "my feature, or else"

Thijs, my post was more like "Hey Mozilla, I know you are busy and all, but, it would be nice to fix some bugs and maybe add some features from time to time.... come on, 7 years to start fixing[*] a bug is waaaaaaay(maybe enough to make your users go away) to much. That's why you suck!".

BTW Thijs, have you read at least the Reply-To-List thread in their bugzilla? Or the huge pile (now 126 open issues) of "keyboard shortcut" problems they have? I am saying that there is a lot of endless discussion around the subject until someone really tackles it. As an example, the real solution for (probably) most of those 126 keyboard issues would be to allow keyboard shortcut redefinition.

So this was mostly about response time, be it bug or feature, although the title was not so well chosen.

[*] note that the patch is from a first time contributor

Dear lazyweb, how can I customize ...

Dear layweb, I know that somebody from the kernel team (iirc) posted an article/mail about how to make a customized version of the Debian linux-image package, but I can't find it anymore.

For short, I want to produce a slightly modified linux-image-2.6.18-4-amd64 package. Which is the right source I want?

Is

apt-get source linux-image-2.6.18-4-amd64

what I want or is it

apt-get install linux-source-2.6.18
?

I am confused. Help would be appreciated.

DebConf7 plane ticket 2

I forgot to say, I payed for it yesterday. Now I have to buy another suitcase since the one I bought 2 years ago was ruined by the people which do the luggage handling on the Otopeni port, when I returned from Spain in September last year.

Wednesday, 23 May 2007

Mozilla feature request response time...

I wonder how hard is to actually allow people to define their keyboard shortcuts and close all those keyboard shortrcut releated issues. There has been 3 years since this bug is open and still, no released version of thunderbird/icedove with working shortcut for select thread.


Well, I guess hopes aren't high since, for yet another wanted feature, direct Maildir support, the issue is waiting for 7 (yes, seven) years and still nothing happened.

Mozilla sucks big time.

Tuesday, 22 May 2007

gettext: lesson 2

The first lesson was about wrong assumptions that people do when it comes to i18n. This article is mostly targeted at developers which want to support i18n properly, in particular, plural forms.

This is my second n?getetxt lesson.
This is about making your update-po target to include all the strings you want localized in the pot file.

Probably, at some point you, as a developer have written something like:

print("You won %d point%s", points, points>1?"s":"" ) ;


Well, is nice and dandy that you want to make the proper choice of words when you have more than one point. I appreciate that, but you are doing it wrong. There is a tool for that, as I explained before.

Now, lesson 2.

You have understood what you have to do, but you just hate typing ngettext/gettext all over the place, so you probably defined something like:

#define _(X) gettext(X)
#define _n(sg,pl,n) getext(sg,pl,num)

So now you can write trhis piece of code:

print(_n("You won %d point", "You won %d points", points), points ) ;

The problem: how to convince xgettext to add those strings to the pot file?

Nothing simpler... just add _n as an additional keyword when invoking xgettext... but you have to specify that this is a definition for ngetetxt, so, you will end up having in your update-po target something like this:

xgettext ../src/*.c --keyword=_ --keyword=_n:1,2


TADA!

Monday, 21 May 2007

I lost a big chunk of my todo list...

I don't want to get into the details, but I lost a big chunk of my to do list due to an unexpected power problem. So, if I promised/told you that I will take care of an issue and I will not do it, please remind me.

What I didn't lost and concerns others:
- tdebs wiki page update (Hi Chealer)
- po-debconf translation compendium for Romanian
- some aspell-ro related stuff
- naughtysvn coding: adding update command
- apt-zip - update support merge
- ppp-udeb - integrate with netcfg
- d-i documentation addition: new language process: X layout selection (Hi bubulle)
- svn-bp: bug squashing party
- gnome-screensaver translation
- NM (Hi Christian)

Friday, 18 May 2007

DebConf7 plane tickets

I got the confirmation mail with the flight details. Monday or Tuesday I'll go and pay for it.

Debconf7, here I come

Since I never got managed to reemit my credit card, I was forced to reserve my plane ticket to DebConf7 via phone.

The good news is that, this time I was able to find e-car.ro which apparently has some better search engine since I still found some cheaper (not much) flights than I did in January (I have a printout of the flight I thought of initially).

The price now is NOT a lot bigger than the one I found in January. Back then it was about 400€, now I'll have to pay around 425€[*]. Is not the same set of flights, but I don't mind.

So, now I have these flights:
  • BUH - EDI, 16th of June :
    • KL1358 OTP, 06:00 - AMS, 07:50
    • KL1279 AMS , 09:25 - EDI, 09:55
  • EDI - BUH, 24th of June:
    • KL1276 EDI, 06:00 - AMS, 08:35
    • KL1389 AMS, 09:35 - OTP, 13:20
I would have liked to have a wider window at return, between the flights, but, although there was some flight that left from AMS at 13:00, it was not possible to couple with that flight and keep a low fare :-( . So, my visit to Amsterdam must wait for another occasion.

So,
  1. if anybody else will be on any of these flights, I would welcome company.
  2. Helooooo, DebConf
Now I'll just have to have the confirmation mail and go myself to do the payment at e-car. Fortunately e-car is somewhere in the center of Bucharest, in the Roman Plaza (Piața Romană).

[*] If this sounds like a contradiction with the previous, is not. Now I found some of the previousely found flights and some new cheaper ones (all "now" prices), but since the booking is done later, all "now" prices are bigger than "January" prices. So if I had done the same booking back in January, I would have payed less; but back then I didn't found the flights I booked now.

(Not) Getting Carbide C++ to run on your amd64 Debian Etch. But you get CodeWarrior!

A while ago I decided I wanted to make a couple of nice little apps for my Nokia 6600.
  • Bluetooth AutoOff - disable Bluetooth and/or hide it after a configurable period of time
  • PicGodfather - automatically change the template by which photos are named in the camera app, based on date (I can't think of another reasonable schema)
After my successful adventure with pys60 I decided/realized that the Python API does not contain appropriate functions for what I need in my apps, so I decided to setup the development environment for C++ with Carbide C/C++ (the recommended IDE for S60 development for Nokia).

Of course, the IDE is a Windows application and the reason for which Nokia doesn't provide an IDE for Linux (is expected since they are developing maemo and are so into OS) eludes me.
On top of that, I have an Debian Etch amd64 installation[1], so that's more fun.

Fortunately, thanks to Robert Millan and Ove Kaaven, wine is installable from unstable on amd64 and a chroot is not needed[2] anymore.


Now let's see the dependency tree:
  • Carbide
    • ActivePerl
      • ScriptHost
        • mfc42.dll
    • correct mix of native and built-in dlls in wine configuration
Yes, that is all ... summarized. And you can imagine I went though leaps and bounds and wasted a night with this to find out the hard way.

If you don't care about the reasons/story, you can skip to the paragraph where I ran into license issues.

So, first Carbide needs Active Perl. Not any version, but ActivePerl-5.6.1.635. You will find out after you install Carbide c++.

Active Perl, by default, will refuse to install in wine. It relies on some Script Host support.
Good news: it is available on Microsoft's support pages. Bad news: the file is not provided until you go through some crazy scheme[3] to certify you have a genuine Windows installation.

Of course, the genuine stuff failed to work in wine, duh, but having a windows XP OS in qemu was really useful... to try to go further.

Now that I mentioned the Windows XP machine in qemu you might be wondering 'why didn't you installed Carbide c++ in there and start hacking in qemu?' . Well, I wish it was that simple! Believe it or not, the installation in the Windows virtual machine failed in a muuuuch earlier stage it initially did in Wine! It failed in the unpacking phase of the installation, while in Wine that part worked without problems (default config is for Windows XP emulation). Talk about irony!

After a while of trying, I took the risky path (maybe I should install an antivirus, as suggested by wine) and downloaded the kit for the script host stuff from some site on the net (shhh!). Good. I don't remember if I used cabextract or if it worked quite straight forward, but the special configuration entry in Wine Configurator suggests otherwise.

Back to Active-Perl. Now we can try again to install it.

wine msiexec ActivePerl-5.6.1.635-MSWin32-x86.msi

Guess what? The installation failed now, too. After some time of poking, I realised the bastard was looking for mfc42.dll in the installation. There was no word about that in the error message, only in the wine logs there were some hints. No wonder Windows users learn very early to ignore error messages (the error message was plain uninformative).

Where to get mfc42.dll from? The virtual machine! I tried to send them via email, but the link was too slow. Now I realised I could have used winscp, but I didn't thought of that at the time.

The rescue did come this time from M$, but with some effort. It appears that mfc42.dll is by default present on XP, so you only find it for download in some kit (vc6redistsetup_enu.exe) for Windows 9x. That works (lost some time to figure that out, too) since the kit contains a mix of 9x, NT and independent dlls. I think this installation didn't work and I had to cabextract the files by hand and copy them in system32. I registered the mfc42.dll module, after copying it in windows/system32.

wine msiexec /y mfc42.dll

Well, now I have everything installed Carbide should start... Well, no! License issues! I got a message about not having a license for the installation. Ain't that great? I just installed the thing and is the free/handicapped version. What gives? Well, in Carbide C++ 1.2, the Express part of the kit is broken and doesn't install the license file.

So, I installed the professional version since it had a longer trial period, hoping that now I'll be able to see the IDE and start working.

After this, I tried several times to start Carbide itself, but it failed at different points in time. I "just"[4] configured wine for this app to set the order to 'native,builtin' for msvcrt, ole32, oleacc and shdocw and got further.

Hopeless attempts follow....

At this point I got stuck. There was still some error from ole32.dll (apparently), but I couldn't go further.

I tried to install the 1.1 trial version. Got stuck. In any way I couldn't start Carbide c++ :-(( .

GRAND FINALE!

In the end, I also tried the deprecated CodeWarior. Guess what? It installed and ran immediately. Although I am not sure if any of the previous poking had anything to do with it.



[1] I have some packages from unstable
[2] although I had one, I wanted to get rid of it, since gnash started to perform better in the latest versions - still not satisfactory, but OK
[3] some browser plugin WPGInstall.exe, iirc and some app which should send your privat^W^W^Wanalise your system to generate some code that should identify your system as genuine
[4] this also took me some time... start, identify the dll, change the order, restart...

Wednesday, 16 May 2007

bluetooth fun with my Nokia 6600

I just started poking with my Nokia 6600 and python for S60. From the highlights of the evening (I just started, so I needed to set things up).
  • 'obexpushd -B' is good for receiving all the images and videos stored on the phone and taking space
  • 'obexftp -b "phonename" -p somefile' - is the way to send files to the phone (I installed pyS60 on the phone, whoohoo)
  • nothing works unless you use hcitool dev and hciconfig reset before using any of the above
  • it is really useful if you have tried a couple of days ago to make it easier for your father to receive via Bluetooth on the laptop files sent from the phone and realised the former (since gnome in Etch doesn't have any graphical means to start an obexpushd server)
Now I would really like to know how to start a serial terminal server that listens on Bluetooth to be able to start the bluetooth console in a manner similar to the Windows or Mac method.

Update: After digging and trying different things I got to a message which put me on the right track. After a while I got the magic formula:

bounty:/home/eddy/usr/lib/linux_and_other_oses/series 60/devel/python# rfcomm listen 0 3
Waiting for connection on channel 3
Connection from 00:60:57:BB:B6:C5 to /dev/rfcomm0
Press CTRL-C for hangup


The 1 means to create a /dev/rfcomm1 device; the 3 is the channel on which the Bluetooth console tries to connect (try once and you will see it).

After that, the hint in the Mac tutorial, so I typed:

bounty:/home/eddy$ screen /dev/rfcomm0
help
Traceback (most recent call last):
File "", line 1, in ?
NameError: name 'help' is not defined
>>>

Victory! Now I can actually start to program.

Update2:
Oh, yes, I remembered I should write something like "How to connect PyS60 Bluetooth console and Linux" so is easier to spot. I tried to add myself a link to the proper page, but I couldn't make an account because of the broken capthca.

Tuesday, 1 May 2007

„I assume that you are subscribed.”

How hard would it be not to have to write this in a message to a ML?

Just add X-Maybe-CC and put the name in there, send to the list and the mailing list software will CC the person in question no matter if the person is listed or not. Obviously, if that address is listed, the mail will be sent only once.

Would that be that hard to implement?

I'll bite

You are wikipedia.org You are a know-it-all.  You are trustworthy, most of the time.  You are  versatile and useful.  You like volunteering.  You are free.
Which Website are You?