Rockbox mail archiveSubject: FS#11689 - User settings in skins, and user translation in skins
FS#11689 - User settings in skins, and user translation in skins
From: Jonathan Gordon <jdgordy_at_gmail.com>
Date: Wed, 20 Oct 2010 00:37:58 +1100
This is an idea I've had for ages which I never got around to coding.
Each time I've brought it up in IRC its had a different response so
time for some actual official discussion.
The idea behind this patch is giving themers a way to make their
themes more customisable to users without having to resort to actually
modifying the skin file. (e.g some themes have "configuration" which
is merely enabling viewports to suit the user).
The way it works is there is a skinsettings.txt file (in .rockbox/wps)
which is read which contains the users' settings (same format as .cfg
files). If a theme has any of the settings in the txt file the users
choice will be used. If it doesnt the file is simply ignored.
The changes to skins to make this work is no more difficult than
adding a bitmap strip.
To configure a setting a line like %Sl(foo, something, one, two, etc,
something, ...) is added. That says "A setting named "foo" with
default value "something" accepts the values "one", "two", "etc",
"something", .... (up to 32 values). ("something" is there twice
because it the first one is saying it is the default, the second is
where in the list it belongs.)
Then to actually get the users choice you would add %Sv(foo) which
would show the text of the value (or used in a conditional to get the
Thats basically the gist of it. Details can be fiddled with of course.
Now, separate but really the same idea is a way to allow skins to be
completely translated without needing to add more strings to the lang
files. Users would create a "skintranslation.txt" file which would be
checked at parse time and any string found in the skin would be
checked against the file. If it is there then the users string would
be used instead. i.e a lazy themer might have put "Next track:" but
the user wants it in chinese, or to just say "Next:". This would
simply allow that to happen.
I've put both ideas in one email because I really think they are the
same thing and would be very surprised to hear any opposition to one
but not the other.
So, thoughts? comments?
Received on 2010-10-19