From: <ca...@pe...> - 2005-02-17 12:16:04
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pander wrote: | On Wed, 16 Feb 2005 23:08:22 +0200, Carlos Perell=F3 Mar=EDn wrote | | Pander wrote: | | | Hi all, | | | | Hi | | | I would like to propose the following internationalisation (i18n) | of | podzilla. Here are following proposals, please shoot at them ;) | | | | isn't it a lot simpler and better to just use Gettext like all other | Linux applications? | | |> Have a look at |> http://www.gnu.org/software/gettext/manual/html_mono/gettext.html I think that |> gettext is too heavy for podzilla. It will need more memory and more C= PU |> cycles for each lookup. Also since podzilla applications will not have that |> extensive translation needs. Dude, the iPod is not as slow as to think that gettext is eating too much cycles... The memory increase is there, yes, any extra library needs some extra memory, but your model needs that _all_ translations are loaded into memory all the time. Gettext only loads into memory the translations for the languages been used and I think it's possible to use mmap to reduce that memory usage, so what's the point behind thinking gettext is too memory waste? | |> I'm pretty new to the world of podzilla but performance wise I think we should |> be very careful on where to spend CPU cycles on. Anywasy, that is also part of |> the fun I think :) | You are right, but as I said, the iPod is not so slow hardware to think that gettext is going to overload the CPU, dude, the iPod decodes MP3/AAC= !!! | | Same translation format for the translator and without the need to | invent a new way to do it in our own way... | | |> Other disadvantage of gettext for podzilla is that you will have to generate |> files with translations. Anyways, advandtage of the proposal below is that it |> is very fast and it can also be replaced with a different translation techique |> at a later stage in an automated way. The proposal is a consequent way= of |> doing translations so it is an improvement anyway to the current situation. So you are assuming that translators will be happy doing their translations directly inside the podzilla source code and that they are going to understand how it works so they don't break that file, and when a new string appears is going to be easy for them to find it, translate and commit the new file... I'm a developer and my work is 100% related to translators and I could say you that if you pretend that podzilla is being used by many people that model is not going to work. Perhaps gettext is not the best solution but you should think on a system that is easy for the translators to work with. Also, it's not too hard to implement the translations handling with gettext, test and benchmark it and see if it works before assuming too much overload... | |> Perhaps there are mote suggestions? Than we can make an analysis of the pro's |> and con's of all and then go fit. | Dude, as you said this is about resources wasting, the best way to test this is doing a real test :-) Cheers. |> Regards, | |> Pander | | | Cheers. | | | 1) The integer value of variable lang should be stored in | | /etc/podzilla.conf. in ipod.h is already: | | #define LANGUAGE 30 | | It can be used with: | | ipod_get_setting(LANGUAGE)] | | | | 2) Language codes will have to be defined in ipod.h: | | static int ENGLISH =3D 0; | | static int FRENCH =3D 1; | | static int GERMAN =3D 2; | | static int DUTCH =3D 3; | | This might nog be needed but a clear order should be defined and | | extended as more languages get added. | | | | 3) In .h or better in the .c files the translation should be | | defined. Here are three simple examples: | | | | static char *lang_language[] =3D { "English", "Fran=E7ais", "Deutsch"= , | | "Nederlands" }; | | | | static char *lang_play[] =3D { "Play", "Jouez", "Abspielen", | | "Afspelen" }' | | | | static char *lang_month[][] =3D { | | { "Jan", "Feb", ..., "Dec" }, | | { "jan", "fev", ..., "dec" }, | | { "Jan", "Feb", ..., "Dec" }, | | { "jan", "feb", ..., "dec" }, | | } | | | | 4) Example usage would be like this | | | | printf(lang_play[ipod_get_setting(LANGUAGE)]); | | | | 5) System output as errors and warning should not be translated | | since that makes it easier to refer on the internet to certain issues= . | | | | Greetz, | | | | Pander | | | | | | ------------------------------------------------------- | | SF email is sponsored by - The IT Product Guide | | Read honest & candid reviews on hundreds of IT Products from real | | users. | | Discover which products truly live up to the hype. Start reading now. | | http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick | | _______________________________________________ | | iPodlinux-devel mailing list | | iPo...@li... | | https://lists.sourceforge.net/lists/listinfo/ipodlinux-devel | - ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dclick _______________________________________________ iPodlinux-devel mailing list iPo...@li... https://lists.sourceforge.net/lists/listinfo/ipodlinux-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCFIsOEuPMamD5V9cRAlGbAJ0cfqhhaDYZAfqqDFt0G78kY1KgagCfXdO5 sWdnFhckSRLnroBkhN1wX2Y=3D =3Dr0Jx -----END PGP SIGNATURE----- |