Rockbox mail archive
Subject: Re: .lang files / I'm out
From: Florian Mösch (fmoesch_at_web.de)
> Can the gettext file format assign an ID to the strings as well?
> Or do we have to add the string ID to a comment field?
My idea was to use the gettext style
_( "Hello World." )
in the sources which results in someting like
msgid "Hello World"
msgstr "Hallo Welt"
in the .po file. The use a simple script to translate
_( "Hello World" )
in the sources to something like
str( HELLO_WORLD )
in the .c file. It would be nice but not necessary if that step could be
reversed (i.e. automatically convert the constant back into the original
string). Another tiny script would generate the lang.h file containing
#define HELLO_WORLD "Hallo Welt"
from the .po file.
What do you think about that ?
PS: I am a grown-up, an experienced DSP software developer. I don't want
to badger the badger. I just felt that his design could be improved.
Page was last modified "Jan 10 2012" The Rockbox Crew