If Lernid uses a translated "QUESTION:" it must agree with what ClassBot is looking for

Bug #808570 reported by John S. Gruber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ClassBot
New
Undecided
Unassigned
Lernid
Confirmed
Low
John S. Gruber

Bug Description

Lernid and Classbot should be harmonized when it comes to what Lernid prepends to student questions and what ClassBot is expecting.

Changed in lernid:
importance: Undecided → Medium
assignee: nobody → John S. Gruber (jsjgruber)
milestone: none → 0.8.2
Revision history for this message
Nathan Handler (nhandler) wrote :

This might be rather hard to do properly. The easiest solution would be to assume that all sessions in a classroom will be in a certain language. For example, classes in #ubuntu-classroom will be in English and classes in #ubuntu-charlas will be in Spanish. The challenging part will be if a user tries to use lernid in a classroom that uses a language lernid has not been translated to. You will want to make sure that while QUESTION is translated to the language of the classroom, all other strings should be translated to the user's preferred language.

Revision history for this message
John S. Gruber (jsjgruber) wrote : Re: [Bug 808570] Re: If Lernid uses a translated "QUESTION:" it must agree with what ClassBot is looking for

@Nathan

So is ClassBot set up the same way? (Key off the classroom name?).

Revision history for this message
Nathan Handler (nhandler) wrote :

I believe it is currently configured so that each ClassBot instance has a default language (locale) set. So ClassBot is set to English, ClaseBot is set to Spanish. These settings can then be overridden on a per-session basis in the ical event description.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

What variable do you look at on the calendar?

Revision history for this message
Nathan Handler (nhandler) wrote :

It looks for a 'Locale' field that specifies a locale name like en_US

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Nathan,

So if Lernid were to have a locale setting in the config for a default for a particular calendar (for its particular classroom), and if we override that by locale for a session in the calendar, we could match up? (Thinking ahead to the unified classroom configs/calendars from the blueprint).

That is. The current All Ubuntu Sessions (whatever we call it) would have a locale of en_US, individual sessions could have locale's that override this. The Spanish Classroom Selection would have a locale of es_?? and sessions again could override this.

Revision history for this message
Nathan Handler (nhandler) wrote :

I believe that should work. This is also assuming that the translators translate 'Question' the same way for ClassBot and Lernid.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

On Thu, Jul 14, 2011 at 11:26 PM, Nathan Handler <email address hidden> wrote:
> I believe that should work. This is also assuming that the translators
> translate 'Question' the same way for ClassBot and Lernid.

That's right.

Should we instead do some of handshake? At Lernid start and again at
session change should Lernid query ClassBot for the "word" of the
hour, perhaps (in UTF-8). I'd have to add some more private channel
handling to Lernid, and you'd have to add a query/response to
Classbot. I'd have to be able to figure out what ClassBot is called in
the channel, I guess, so I could communicate with it.

In the meantime Lernid probably should *not* translate the word
QUESTION, maybe not bother to translate the pop-over and notification
reminder, until we can work this out and be ready to do whatever we
decide.

It's not translated at this point, so there is time to work this out,
by the way. I was afraid there was a translation for Question already
out there and it wouldn't match what Classbot was doing, but no,
fortunately.

Revision history for this message
Nathan Handler (nhandler) wrote :

I can make a ClassBot command to output the current QUESTION keyword if desired. Like you said, this will require having lernid being aware of classbot's name in the channel.

Another easier approach might be to add a text input next to the normal one. It would default to having 'QUESTION' as its value. The user could then manually change the value if necessary. Combined with the checkbox idea for marking a message as a question, this would probably work.

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

Can't the ClassBot check the first word of a sentence through an array of the word QUESTION in different languages?, maybe with a small check, like it has to be all upper case word and followed with a colon ':' , just suggesting

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Nathan,

Is Coalwater's suggestion possible? That does seem simpler (though I don't know if the translation system can give you an array of possible words. Should we just key on the ":"? I assume case doesn't apply to all kinds of languages, however.

In the meantime, will all Classbot's take, literally, "QUESTION:" at all times, irrespective of locale? If so, we should probably remove the word QUESTION from being translated until we come up with a better approach.

I'm thinking Lernid should probably not continue to translate the word QUESTION according to the student's computer's locale, in any case, but what do you guys think?

Changed in lernid:
status: New → Confirmed
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Nathan,

No doubt Lernid should send the proper word for the locale--in the spirit of the rule to be "conservative in what you send", but the calendar might change while it is running, or classbot might change sessions before or after Lernid does, so there is still plenty to go wrong.

In the spirit of being "liberal in what you accept" I wonder if it wouldn't be a good idea for classbot to treat as a QUESTION any message in the chat channel that begins with "nospaceSOMEWORD:" . The danger would be false positives, but I doubt there would be many, and they could be easily disposed of with !n. This might even help out non-native speakers in a session who happen to use their native word when that isn't what is expected.

What do you think?

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

@nathan
would changing this line or somehow messing with it fix the issue we're talking about about multi-language support?
http://bazaar.launchpad.net/~classbot-dev/classbot/trunk/view/head:/classbot.pl#L104
i don't really know much Perl, I'm just guessing

Changed in lernid:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.