Kpairs Theme Schema
todd rme
toddrme2178 at gmail.com
Thu Sep 1 11:23:58 UTC 2011
On Thu, Sep 1, 2011 at 1:03 PM, Aleix Pol <aleixpol at kde.org> wrote:
> On Thu, Sep 1, 2011 at 8:06 AM, todd rme <toddrme2178 at gmail.com> wrote:
>>
>> On Wed, Aug 31, 2011 at 8:57 PM, Marco Calignano <marco.calignano at web.de>
>> wrote:
>> > <!-- now come the list of the elements -->
>> > <element>
>> > <sound src='lion.ogg' />
>> > <video src='lion.ogv' />
>> > <image src='lion.svg' pref='1'/>
>> > <image src='baby_lion.svg' pref='2'/>
>> > <word lang='en'>lion</word>
>> > </element>
>> > </pairs>
>>
>> Might it be a good idea to support named categories? For example:
>>
>> <sound src='lion.ogg'/>
>> <video src='lion.ogv' />
>> <image src='lion.svg'/>
>> <image src='baby_lion.svg' category='babies'/>
>> <word lang='en'>lion</word>
>> <word lang='en' category='babies'>cub</word>
>> <word lang='en' catrgory='groups'>pride</word>
>>
>> It would be optional, but if the category is specified it would be
>> used in the title. "Main" would be the one that gets the name of the
>> whole theme.
>>
>> So the titles that would be displayed for the categories each of the
>> above images uses would be, respectively:
>>
>> "Zoo sounds"
>> "Zoo videos"
>> "Zoo"
>> "Zoo babies"
>> "Zoo words"
>> "Zoo babies words"
>> "Zoo groups words"
>>
>> This would allow users to select specific pairs of categories.
>>
>> More specifically, the naming scheme for the "main" file type (image
>> in this case), would be:
>>
>> <theme title> <category (optional)>
>>
>> And the naming scheme for other file types (words, sounds, and videos
>> in this case) would be:
>>
>> <theme title> <category (optional)> <file type>
>>
>> Of course the order would need to be localizable, since it wouldn't
>> necessarily be the same in all languages. There would also need to be
>> a way to specify translations for categories, although this would
>> probably be done in the initial segment of the document rather than in
>> each entry (since the categories should be the same).
>>
>> -Todd
>
> What's the difference with this and creating a new theme?
> Aleix
The advantage is that you wouldn't have to create a separate theme for
every possible combination. With this example, to get all the
combinations you would need at least 6 themes, and the sounds and
videos would need to be duplicated in every one of those themes. And
this was just to provide examples, a real zoo theme could have even
more categories. Here is a more complete example of what you could do
with a zoo in this system:
<sound src='lion.ogg'/>
<video src='lion.ogv' />
<image src='lion.svg'/>
<image src='baby_lion.svg' category='babies'/>
<image src='steak.svg' category='food'/>
<image src='africa.svg' category='home'/>
<image src='savanna.svg' category='enivornment'/>
<word lang='en'>lion</word>
<word lang='en' category='babies'>cub</word>
<word lang='en' category='groups'>pride</word>
<word lang='en' category='sounds'>roar</word>
That would require 20 themes, each with their own copy of the video and sound.
-Todd
More information about the kde-edu
mailing list