|
Rockbox mail archiveSubject: Re: .lang filesRe: .lang files
From: Paul Suade <paul.suade_at_laposte.net>
Date: Wed, 18 Sep 2002 15:41:32 +0200 ----- Original Message ----- From: "Nielsen Linus (ext)" <Linus.Nielsen_at_elema.siemens.se> To: <rockbox_at_cool.haxx.se> Sent: Wednesday, September 18, 2002 1:31 PM Subject: RE: .lang files > > > Personally, I would prefer to have a string which could be > > > automagically translated in a ID, but such a thing demands > > > some tools to do so. > > Why is it important to autogenerate the ID's? > say, you write in your source : _lang_("Hello World\n"), which is quite more readable than a macro. Before really compiling the source, you preprocess it with a special tool will transform it in a ID in a temporary source like : _msgstr_(MSGID__HELLO___WORLD_092_N). You have the best : a precompile-time readable and modifiable string and a postcompile-time id so your runtime translation is more efficient. Another possibility : you have a .lang file which give us the tuple (id,eng,new), so your tool can be able to process any "_lang_(<eng>)" in _msgstr_(<id>) or something alike, where _msgstr_(<msgid>) should return <new>. > > So a "Hello World\n" will become MSGID__HELLO___WORLD_092_N. > > > > Identifiers generated this way can be easily converted back to the > > original string but are still good readable. > > Why would we want to convert it back again? > > /Linus honestly I don't care about reversibility : it is only I don't like ID macros. Received on 2002-09-18 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |