Rockbox mail archiveSubject: Re: Announce: new version of genlang
Re: Announce: new version of genlang
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 27 May 2003 11:06:36 +0200 (CEST)
On Tue, 27 May 2003, Kjell Ericson wrote:
> TP Diffenbach wrote:
> Otherwise it seems like a cool and easy solution.
Is it? I'm not so sure this actually improves the situation.
Let me take an example and see how we would deal with it with this new
list-concept in the "language system":
We add an (imaginary) list for noise-level in english.lang:
desc: noise-level list
eng: "none", "little", "more", "annoying", "lots", "deafening"
So, in the code we can now use:
&( str( LANG_NOISELEVEL_00 ) )[ 2 ] to have immediate access to the third
list item, above seen as "more". We can pass around a pointer to a "list".
There might even be an automatic define set similar to '#define
That is just nice and neat. Makes things easier. In come the translators,
soon there are ~15 files with various translations of this list. Each works
Then, one of these supposedly sunny summer days it just rains and one of the
guys discover that "little" is not a valid level for our noise-circuit. Darn,
how silly. Well then, let's remove it...
Now, all of a sudden &( str( LANG_NOISELEVEL_00 ) )[ 2 ] becomes "annoying"
instead (for the ones using the new english) and the automatic #define
becomes set to 5 (so if the code accessed index 5 that just got illegal).
While the ones who use a previous version of the english file or a translated
file gets it all wrong.
The situation is pretty much equally bad if we want to extend the list too,
as the translations will be all messed up if the new entry isn't in the end
(or possibly first).
I'm not sure this happens a lot or that it is such a huge problem, I just
felt we need to put the light on it and consider all side-effects.
-- Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/Received on 2003-05-27