gettext für DM 7025 ?

  • Hello !


    Nachdem Multiboot für die DM 7025 eigentlich mehr oder weniger ein riesiges Shell script ist (über 3600 Codezeilen) mit einem winzigen python Wrapper herum (nur 1000 Codezeilen) würde ich das gettext benötigen um es Mehrsprachfähig zu machen.


    Gibt es das gettext im OE und könnte es wer für die DM 7025 compilieren ?


    Ein Dankeschön im multiboot readme ist das einzige das ich als belohnung anbieten kann.
    ------------------------------------------------


    Because my Multiboot for DM 7025 ist more or less a huge shell script (about 3600 lines of code) with a "tiny" python wrapper (only 1000 lines of code) around it I would need the gettext to make it multi language enabled.


    Is gettext available in OE and can somebody compile it for DM 7025 ?


    A thank you in multiboot's readme is the only thing I can offer as gratification.


    Ciao
    thowi

    2 Mal editiert, zuletzt von thowi ()

  • Zitat

    Original von thowi
    Gibt es das gettext im OE und könnte es wer für die DM 7025 compilieren ?


    Hi Thowi,


    ich schaue mal heute abend, ob ich das Ding kompiliert bekomme.


    Grüße,
    Andy

  • OK, it seems to work. We'll start making a German version of the script output of multiboot (multiboot.po file in english is finished and compiles with msgfmt) until next weekend and then I'll create version 7.0 which uses gettext.


    Thanks a lot


    Ciao
    thowi

    Einmal editiert, zuletzt von thowi ()

  • I now did some more tests, but there seems to be still a problem to correctly recognize the mo file from a shell script (in python it works - well at least the mo is used - only the äöü characters are missing).


    Attached is the hello.sh example included in gettext ipk - simply unpack at /media/hdd and try out. It always shows the english messages and not the included german ones !


    You can play with the environment variables in hello.sh, all combinations are producting same (english) result !


    Any idea what is done wrong - or does somebody have a working example for a shell script usage of gettext ?


    PS: bad behaviour is the same with the 2 kits posted here and if I download gettext with ipkg install from the DMM standard image.


    Ciao
    thowi

  • Sometimes I'm too stubborn for my own good... But I got it to work at the end. Since I have absolutely no prior experience with gettext and friends, there might well be better and simpler ways of making it work.


    First I tested it on my SUSE linux box. I got it to work by changing "LANGUAGE" to "LANG", and "de" to "de_DE".


    To repeat this on the 7025, I also had to install the following packages. Some of them are probably not needed, but I got a little bit frustrated in dependancy-hell and installed all "glibc-localedata-translit-*" packages at one stage.


    And all that just to see

    Code
    root@db7025:~/hello# ./hello.sh
    Hallo Welt!
    Dieses Programm läuft mit der Prozess-Nummer 1971.

    when the English version was more understandable to me :smiling_face:

  • I already was assuming that something was missing because I had to install with ipkg -force-depends.


    Thanks for trying and testing - I'll now try to eliminate the not needed packages and then report back.


    And you even got the ä correctly (because of the iso-8850-15 charset I assume), hopefully this will now also work in python (there the mo files were found und used except the äöü problem).


    Because then multiboot will soon be multilanguage - main problem migth be that if too many big addons need to be installed that it will be too big for flash, but this should be solveable on my own.


    Thanks a lot and have a nice weekend


    PS: Hopefull I'll be able to download all the needed ipk files with ipkg install :winking_face:


    Ciao
    thowi

    3 Mal editiert, zuletzt von thowi ()

  • I tested and now the multiboot.sh shell script works too (Multiboot 7.03 kit includes these fixes and you can call it with gettext download for downloadign the ipk and install for installing them).


    Only remaining problem is that the German äöü are still not properly displayed, but I assume this has to be related to the charset used in the po file.


    As soon as I have found the right one I would be happy.


    BTW it looks like really all these ipk packages are needed (well I can ommit some, but then I need to use -force-depends when installing, but the actual space needed is OK, even for flash so I don't want to investigate and test any further).


    So now I only have to find the additional language packs for otherl anguages, but with the German template this shouldn't be too difficult.


    Ciao
    thowi


    PS: So soon the translators will be busy for multiboot and I can continue playing with the alternative bootloaders !

    2 Mal editiert, zuletzt von thowi ()