Opened 10 years ago

Last modified 10 years ago

#8505 new patch

multi-language status message

Reported by: Xytovl Owned by: deryni
Milestone: Patches Needing Improvement Component: XMPP
Version: 2.5.2 Keywords: status message, multi-language
Cc:

Description

According to http://www.ietf.org/rfc/rfc3921.txt a presence can have multiple <status> with different xml:lang attributes. However pidgin only reads the last one, if should select the right one.

We could also modify the status message editor in order to have multi-language support

Attachments (1)

multilanguagestatus.patch (1.9 KB) - added by Xytovl 10 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by datallah

I think this would be a UI nightmare.

comment:2 follow-up: Changed 10 years ago by deryni

Picking the 'correct' status message is certainly something that could be done. But allowing the status editor to support setting such a thing is unlikely to happen.

What client is sending multiple localized status messages? Are these messages free-form or 'stock'?

comment:3 in reply to: ↑ 2 Changed 10 years ago by Xytovl

Replying to deryni:

Picking the 'correct' status message is certainly something that could be done. But allowing the status editor to support setting such a thing is unlikely to happen.

for the status editor, is it the kind of things that can be done through plugins ?

What client is sending multiple localized status messages? Are these messages free-form or 'stock'?

As far as I know, there is no client that uses multiple localized messages, I have tried the feature by sending it through the xmpp console. The rfc says the messages are free-form, here is an example taken from the rfc :

<presence xml:lang='en'>

<show>dnd</show> <status>Wooing Juliet</status> <status xml:lang='cz'>Ja dvo&#x0159;&#x00ED;m Juliet</status>

</presence>

comment:4 Changed 10 years ago by deryni

At the moment, no plugins can't easily affect the status editor window. (They can if they grab the GtkWidget:s themselves but nothing official.)

Yes, I'm aware of how it is supposed to look, I was mostly curious if any client actually used it as it has always struck me as rather useless except in very *very* specific stock message scenarious (and even then mostly for services and not clients).

Changed 10 years ago by Xytovl

comment:5 in reply to: ↑ description Changed 10 years ago by Xytovl

Here is a patch that implements selection of the right status message, it works this way:

  • the languages are taken with g_get_language_names()
  • if there is an exact match between one of the languages and the xml:lang it gives the status message a score according to the position in the language list
  • if no exact match is found the status has the worst score

the best language is saved (the others are ignored), if there is no match, the status with no xml:lang is saved.

I have only tested it on Linux, I have no other OS to see what g_get_language_names() returns...

comment:6 Changed 10 years ago by rekkanoryo

  • Milestone set to Patches Needing Review
  • Type changed from enhancement to patch

comment:7 Changed 10 years ago by QuLogic

FYI, g_get_language_names requires GLib 2.6.

comment:8 Changed 10 years ago by rekkanoryo

  • Milestone changed from Patches Needing Review to Patches Needing Improvement

We currently still support glib 2.0.0, so the patch would need to be reworked to account for that if it's to have a chance of being accepted.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!