Kpairs Theme Schema

todd rme toddrme2178 at gmail.com
Tue Sep 13 06:38:37 UTC 2011


On Mon, Sep 12, 2011 at 11:52 PM, Aleix Pol <aleixpol at kde.org> wrote:
> On Mon, Sep 12, 2011 at 10:35 PM, todd rme <toddrme2178 at gmail.com> wrote:
>>
>> On Mon, Sep 12, 2011 at 10:06 PM, Marco Calignano
>> <marco.calignano at web.de> wrote:
>> >
>> >
>> > On 09/12/2011 12:18 AM, todd rme wrote:
>> >>
>> >> On Sun, Sep 11, 2011 at 10:31 PM, Marco Calignano
>> >> <marco.calignano at web.de>  wrote:
>> >>>
>> >>> On 09/09/2011 02:04 PM, todd rme wrote:
>> >>>>
>> >>>> On Thu, Sep 8, 2011 at 10:32 PM, Marco
>> >>>> Calignano<marco.calignano at web.de>
>> >>>>  wrote:
>> >>>>>
>> >>>>> And here then another example with all changes we are discussing:
>> >>>>> zoo.game:
>> >>>>>
>> >>>>>
>> >>>>> <?xml version="1.0"?>
>> >>>>>
>> >>>>> <pairs>
>> >>>>> <title>Zoo</title>
>> >>>>> <description>Little zoo</description>    <!--todo: we'll have to
>> >>>>> figure
>> >>>>> out
>> >>>>> how
>> >>>>> to get this translated-->
>> >>>>> <author>Marco Calignano</author>
>> >>>>> <date>21/03/2012</date>
>> >>>>> <version>1.0</version>
>> >>>>>
>> >>>>>
>> >>>>> <!-- we can use the same semantics as in the elements -->
>> >>>>> <sound type='missed' src='missed.ogg' />
>> >>>>> <sound type='found' src='found.ogg' />
>> >>>>> <sound type='turn' src='turn.ogg' />
>> >>>>> <image type='back' src='zoo.svg' />
>> >>>>> <image type='trasparent_back' src='backtr.svg' />
>> >>>>> <image type='bakcground' src='all_animal.svg' />
>> >>>>>
>> >>>>> <main type='image' />
>> >>>>>
>> >>>>> <!-- now come the list of the elements -->
>> >>>>> <element>
>> >>>>> <sound src='lion.ogg' lang='en' />
>> >>>>> <video src='lion.ogv' lang='en' />
>> >>>>> <image src='lion.svg' lang='en'/>
>> >>>>> <image src='baby_lion.svg' lang='en' category='babies'/>
>> >>>>> <sound src='baby_lion.ogg' lang='en' category='babies'/>
>> >>>>> <video src='baby_lion.ogv' lang='en' category='babies'/>
>> >>>>> <image src='baby_lionit.svg' lang='it' category='babies'/>
>> >>>>> <sound src='baby_lionit.ogg' lang='it' category='babies'/>
>> >>>>> <video src='baby_lionit.ogv' lang='it' category='babies'/>
>> >>>>>
>> >>>>> <word lang='en'>lion</word>
>> >>>>> <word lang='it'>leone</word>
>> >>>>> <word lang='de'>loewe</word>
>> >>>>> </element>
>> >>>>> </pairs>
>> >>>>
>> >>>> Looking good, only a few issues:
>> >>>>
>> >>>> 1. It still says the description translation needs to be worked out.
>> >>>
>> >>> Why? the tranlation is done with the attribute 'lang'.
>> >>
>> >> The description doesn't have a "lang" attribute in that example.
>> >
>> > So we could add also an attribute 'lang' and have different descriptions
>> > for
>> > different languages
>> >
>> > Marco
>>
>> If that works I think it is fine, I just think it needs to be in there
>> somewhere and the "todo" needs to be removed.
>>
>> -Todd
>> _______________________________________________
>> kde-edu mailing list
>> kde-edu at mail.kde.org
>> https://mail.kde.org/mailman/listinfo/kde-edu
>
> To be fair, I'm not sure about the category attribute, it makes the file
> look very complex and I'm not sure there's that much benefit to it. I'd
> rather have two .game files inside the theme archive with the different
> sets.
> Regarding translation, I'm fine with the current solution, but I'd also like
> to know what you'd think about having translations in a separate file. It
> could be cleaner... for instance, we could have some zoo.theme and
> zoo.theme.fr for the french translations. That way we don't have all this
> information in the theme specification.
> What do you think?
> Aleix

If people only needed one card for the game, that would be fine.  The
problem is the game requires a pair of cards.  This would require a
new game file for every possible combination of cards.  That rapdily
becomes infeasible with just a few cards (for just 4 cards you would
require 24 files), all of which contain mostly the same data.  This
also makes it harder to make changes to the game data, since you have
to make any change to the general data in every single file, and any
change to a specific card in a large fraction of the files.

You could limit it to one card per file, but that would require
duplicating most of the game data over and over again, which would
waste a lot of time.  There is also an issue of how you match up cards
across files.  You could go by order, but that makes it hard to add
new cards to an existing file, and makes it impossible to have cases
where some categories don't have cards in a certain element.  You
could have some sort of unique identifier for each element, but then
you are back to have category names so you gain nothing.

Note that the category names are optional.  You don't need to have
them if you don't want to.  The only case where you need them is if
you have multiple cards with the same file type in a given element.

So I can see the issue, the problem is that I see no feasible,
scalable method to make it work without making things even more
complicated, and so far no one else has presented one either.

-Todd


More information about the kde-edu mailing list