rayantony / torchat

Automatically exported from code.google.com/p/torchat
0 stars 0 forks source link

Make the string "delayed" in offline messages translatable #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
So far the word "delayed" is hard coded into the offline messages. I think it 
would be favourable to have this string translated and shown in the client 
language.

I worked a bit on this issue and with the included patch (diff against r533) it 
works only for showing the unsent offline messages locally.

Sending those messages still includes the string "delayed" hard coded. I guess 
instead of sending the string "delayed" hard coded to the recipient, an offline 
message could include a trigger. This trigger would then cause the recipient 
client to add the string "delayed" in the client language before displaying 
such offline messages.

What do you think about it?

Original issue reported on code.google.com by erik.est...@googlemail.com on 8 Mar 2011 at 5:40

Attachments:

GoogleCodeExporter commented 9 years ago
I'm aware of this problem and I'm still pondering what would be the best 
solution. The "trigger" could be an entirely new message class, this would be 
the cleanest solution. 

The compatibility problem could be solved in the following way:

When the client (an older client) receives a message class that it does not 
recognize it will ignore it and reply with not_implemented and the name of the 
unknown message, this could be used as trigger to sent it again, this time in 
the old format as a normal chat message with "[delayed]" in the text itself.

This method of probing the protocol capabilities is currently my favorite 
approach to this (and similar problems) and it would be quite robust, even with 
other client implementations that use different version numbering or are lying 
about their version numbers (I have already seen a half finished C++ 
implementation from somebody floating around somewhere that simply hardcoded 
"version 0.9.9.277" into the handshake.)

Original comment by prof7...@gmail.com on 8 Mar 2011 at 6:44

GoogleCodeExporter commented 9 years ago
I've been thinking through your idea of a new message class and the 
compatibility solution. Using a new class as a trigger was what I was thinking 
of too, but I didn't come up with an actual implementation yet. And I really 
like the not_implemented message; it's making compatibility solutions much 
easier :)

Are you already working on this solution or planning to do so? I could try to 
implement it, if you don't mind.

Original comment by erik.est...@googlemail.com on 10 Mar 2011 at 2:40

GoogleCodeExporter commented 9 years ago
the not_implemented messages exist already, they just don't do anything yet and 
I have not yet started working on the offline message class.

Original comment by prof7...@gmail.com on 10 Mar 2011 at 3:57

GoogleCodeExporter commented 9 years ago
Yeah, I've seen the not_implemented messages already :) I'll start coding the 
offline message class this week and will keep you updated about the progress.

Original comment by erik.est...@googlemail.com on 14 Mar 2011 at 3:46