History: The Lojban MOO: Inheritance vs. Multilingualism

Preview of version: 5

Design discussion


What follows is something of a dumping ground for thoughts. It'll probably be incomplete, and if you don't understand it, don't worry.

We're looking at completely redoing the way the multilingualism is done in
Mooix. Specifically, instead of having xml files that each contain all
languages, we're going to have separate files for translations into each
language. So that instead of having one name, you'd have name.en, name.jbo,
name.es, or whatever else.

One advantage is that it would be faster than splitting the xml. Another
advantage comes from the fact that language packs could be made much more
easily (so you could download an entire language and add it to your MOO,
without it breaking anything that currently exists). It also makes it much
clearer which fields are subject to translation (so you won't be like me,
with an editor of "<lang code='en'>vim</lang><lang code='jbo'>vim</lang>".

So far the chief difficulty seems to be with inheritance.

In the following, we have two users, John (who language is Lojban, "jbo"),
and Ed (whose language is English, "en"). Ed creates a Meep, and gives it a
description in English. Finally, John derives his own mipri from Ed's Meep,,
but doesn't change anything in it. So we've got:

/usr/lib/mooix/contrib/animal/description.en:              An animal.
/var/lib/mooix/contrib/animal/description.jbo:             .i danlu
/var/lib/mooix/users/ed/portfolio/Meep1/description.en:     A meep!


It seems desirable that both John and Ed see the Meep described as "A meep!"
(even though for John that's not his own language), instead of John seeing
".i danlu" (which just means "[It's an] animal").

In addition, we want John to be able to create a descendant of Ed's meep, with properly translated messages, like:

/var/lib/mooix/users/ed/portfolio/Meep2/description.jbo:     .i me la mip


Here's a picture of this case:

Image

What inheritance strategy provides this? We want John looking at the first Meep to see English (the wrong language for him) and we want Ed looking at the second Meep to see English (the correct language for him).

More interestingly, what inheritance strategy handles that and the following case?

Image

/usr/.../room/description.en:              A room.
/var/.../room/description.jbo:             .i kumfa
/var/lib/mooix/users/ed/portfolio/My_Room contains no description* files at all.


We want both John and Ed looking at My Room to see their own languages (jbo and en, resp.).

Some Possible Strategies

Normal Inheritance, User's Language


In this case, the bottom-most definition in the user's language prevails.

The Good


Both John and Ed looking at Meep2 or My Room see the correct messages in their own language.

The Bad

John looking at Meep 1 sees the generic ".i danlu".

Last Object Special


This is like "Normal Inheritance, User's Language" except that the
object we are actually looking at getts special dispensation: we
don't look past it for translations if we find anything at all.

The Good


John looking at Meep 1 sees the more specific (but wrong language)
"A meep!".

Both John and Ed looking at Meep2 or My Room see the correct messages in their own language.

The Bad


John looking at an unmodified child of Meep 1 sees the less specific
"An animal.". This means that a child with no modifications has
different behaviour than the parent, which is not cool.

Reverse Hierarchical


We walk up the stack, and take something from the first object with
a defined message.

A variant on this, with similar problems, is to present the first
message up the tree we find in the user's language but if there is
another message further down the tree, we present that as well in
parens or something. The idea is that the message down the tree
will be more specific. The problem is that the message down the
tree might be a direct translation, as with /usr/.../room and
/var/...room, and hence we really only want to see one of them.

There doesn't seem to be any way to distinguish between the two
cases (a message below another in a tree being a translation vs.
being a more specific message) without putting in some kind of
flagging system; I haven't thought of one that is workable.

The Good


John looking at Meep 1 sees the more specific (but wrong language)
"A meep!".

John looking at Meep 2 sees the right thing.

The Bad


Ed looking at Meep 2 sees only the Lojban message; his translation
is effectively lost unless John copies it. Copying it kind of
defeats the purpose of an object oriented system.

Same with Ed looking at My Room.

History

Advanced
Information Version
Thu 04 of May, 2006 20:14 GMT rlpowell from 64.81.49.134 19
Thu 04 of May, 2006 20:12 GMT rlpowell from 64.81.49.134 18
Thu 04 of May, 2006 18:50 GMT rlpowell from 64.81.49.134 17
Thu 04 of May, 2006 18:32 GMT rlpowell from 64.81.49.134 16
Thu 04 of May, 2006 18:25 GMT Eimi from 128.252.20.65 spelling 15
Thu 04 of May, 2006 18:22 GMT rlpowell from 64.81.49.134 14
Thu 04 of May, 2006 17:58 GMT rlpowell from 64.81.49.134 13
Thu 04 of May, 2006 17:57 GMT rlpowell from 64.81.49.134 12
Thu 04 of May, 2006 07:21 GMT rlpowell from 64.81.49.171 11
Thu 04 of May, 2006 07:20 GMT rlpowell from 64.81.49.171 10
Wed 03 of May, 2006 18:30 GMT Eimi from 128.252.20.65 9
Wed 03 of May, 2006 17:55 GMT Eimi from 128.252.20.65 8
Wed 03 of May, 2006 15:44 GMT Eimi from 128.252.20.65 7
Wed 03 of May, 2006 03:31 GMT rlpowell from 64.81.49.134 6
Wed 03 of May, 2006 03:29 GMT rlpowell from 64.81.49.134 5
Wed 03 of May, 2006 03:21 GMT rlpowell from 69.3.234.248 4
Wed 03 of May, 2006 00:58 GMT rlpowell from 64.241.242.18 3
Wed 03 of May, 2006 00:48 GMT rlpowell from 64.241.242.18 2
Wed 03 of May, 2006 00:45 GMT rlpowell from 64.241.242.18 1
Show PHP error messages