Rockbox mail archiveSubject: Language cleanup (aka lang v2 cleanup)
Language cleanup (aka lang v2 cleanup)
From: Nils <deathtoallhumans_at_gmail.com>
Date: Sun, 29 Jul 2007 16:05:00 +0200
The lang v2 cleanup patch (FS#6574) that Dan Everton posted back in January
has now gone
through 23 revisions and finally feels ready to commit. Since this is a
pretty big patch and affects
a lot of stuff in rockbox I wanted to give everyone a chance to take a look
at it and comment on it
The lang cleanup patch has been merged with FS#7215 (Make .lng and .voice
files target specific).
as they really should be committed together anyway and both patches change
things in the same
places so it was becoming a PITA to maintain them.
So what does it do?
--- Let's start with FS#7215. It changes the format header of .lng and.voice files to contain a target ID and alters respective loader code to check for the correct ID in the loaded file. .lng files are already different for different targets and .voice files will be so this avoids some potential confusion for users. What about FS#6574 then? --- Well, it does many things: 1) The start of it all was the "features" mechanism invented by Daniel Stenberg. A file named features.txt in apps/ controls which strings are included when building rockbox for a specific target. Those features are defined based on #defines in config.h and related target config-*.h files (as well as button.h). An example feature looks like this: #if defined(HAVE_DIRCACHE) dircache #endif the 'dircache' feature is included for all targets that #define HAVE_DIRCACHE And an example phrase in the .lang file looks like this <phrase> id: LANG_DIRCACHE_ENABLE desc: in directory cache settings user: <source> *: none dircache: "Directory Cache" </source> <dest> *: none dircache: "Directory Cache" </dest> <voice> *: none dircache: "Directory Cache" </voice> </phrase> <phrase> The string will only be included for targets with the 'dircache' feature. An important note about the features.txt file is that if features are enabled for new targets or defines changed around, there is a good chance that it will break binary back compatibility with .lng and .voice files 2) in english.lang * all deprecated strings have been deleted * strings that were not marked as 'deprecated' but were unused anyway have been deleted * duplicate strings have been removed * some strings have changed ID to be more logical and in some cases more generic * strings are sorted into groups of related strings to make them easier to find * lots of minor tweaks to comments 3) apps code Here most changes are because of changed string IDs but also some #ifdefs for player specific strings have been cleaned out The latest version of the patch can be found here.<http://www.rockbox.org/tracker/task/6574> What's next, then? --- The translations will need some work, all the changed IDs make translations seem worse than they are but IMHO this can wait for a while. Automatically generated voice files would be nice... the decrease in voice file size opens up possibilities for more voicing :-)Received on 2007-07-29